Skip to content

Commit

Permalink
Merge branch 'Dolibarr:develop' into patch-delivery-sn
Browse files Browse the repository at this point in the history
  • Loading branch information
DaBootO authored Jul 12, 2024
2 parents b068ea6 + dd40893 commit 1608dac
Show file tree
Hide file tree
Showing 272 changed files with 2,184 additions and 1,527 deletions.
53 changes: 41 additions & 12 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
How to contribute to Dolibarr
=============================

Bug reports and feature requests
--------------------------------
Send a Bug reports or a Feature request
---------------------------------------

<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help on using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.

Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
Default **language here is English**. So please prepare your contributions in English.
Issues to inform about a bug or a development trouble, like requests for a new feature, are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
Default **language here is English**. So please prepare your contributions in English (we recommand using an online translation service if you don't know English).

1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
Expand All @@ -18,39 +18,68 @@ Default **language here is English**. So please prepare your contributions in En



<a name="code"></a>Submit code
<a name="code"></a>

Submit code
---------------------

This process describes how a Developer can submit code to the project so it can be analysezd and validated by the Merger (we call this a Pull Request).

Definition:
- The Developer: is the human knowing the development language of the application that want to change some part of the code by making changement on the sources of the project.
- The Merger: is the human knowing the development and check that the code submitted for approbation is correct to validate it, in other word, the Merger is the approbator of commits.
- The Releaser: is the human that validates that there a freeze/beta version is ok to be released officialy as a stable version.


### Basic workflow

As the Developer:

1. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
2. Clone your fork.
3. Choose a branch(See the [Branches](#branches) section below).
4. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation).
5. Commit and push your changes.
6. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).

As the Merger:

7. The Merger will check and say if he approves or not the commits. During this step, the Merger can modify your own code to make it valid for appobation or ask you to make the change yourself. For this the Merger may add commits himself. Depending on the tools used (can be done from github directly orfrom an IDE), such commits may be done directly after having validating your PR (for example to complete it).

Note: Of course, the Merger, does not need to ask to himself if he is ok to validate a commit he did himself. This is a reason why the Merger can validate commits he did directly without passing by the approbation process described for the Developer.

As the Releaser:

8. A tag will be added to take a photo of the code will all the changes approved by the Merger, when he decide to do a release.


<span id="branches" name="branches"></span>

### Branches

Unless you're fixing a bug, all pull requests should be made against the *develop* branch.

If you're fixing a bug, it is preferred that you cook your fix and pull request it against an oldest version affected.

We recommend to push it into N - 2 for N the latest version available, if not possible into version N - 1, and finally into develop.
This is just a recommendation, currently, if you push a bug fix on a very old version, it is still merged and propagated into
higher versions.
This is just a recommendation, currently, if you push a bug fix on a very old version, it is still merged and propagated into higher versions.

The rule N - 2 is just a tip if you don't know which version to choose to get the best the best compromise between ease of correction
and number of potential beneficiaries of the correction.
The rule N - 2 is just a tip if you don't know which version to choose to get the best compromise between ease of correction and number of potential beneficiaries of the correction.


### General rules
Please don't edit the ChangeLog file. This file is generated from all commit messages during release process by the project manager.

- As the Developer, please don't edit the ChangeLog file. This file is generated from all commit messages during the release process by the Project releaser.

- As the Developer: Do not submit changes into files xx_XX/afile.lang. They are language files and are updated automatically by sync from Transifex. If you need to add a new language file, just add it for the en_US language.

- As the Releaser: The releaser will decide to make a new release as soon as the planning of the release is reached and the code in the branch to release reach the status "No more known serious bug known".


<a name="commits"></a>

### Commits

### <a name="commits"></a>Commits
Use clear commit messages with the following structure:

```plaintext
Expand Down
5 changes: 2 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ WARNING:
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* Prepare your module for deprecation of triggers code XXX_INSERT to support also XXX_CREATE.
* More class properties (with old name in french) are now deprecated in favor of the property name in english.

* The json emulator dol_json_encode/decode() is removed. The native json PHP module must be enabled/available (this is the case by default with most PHP installation).


***** ChangeLog for 20.0.0 compared to 19.0 *****
Expand Down Expand Up @@ -276,7 +276,6 @@ QUAL: professional identifiers - remove TODO by adding profid.lib.php
QUAL: Properties ->date_update and ->date_modification were merged
QUAL: removed duplicate language file
QUAL: Remove the external js library jstimezonedetect
QUAL: Remove use of customurl filter. Must use the USF syntax.
QUAL: Rename all input fields "tel" into "phone"
QUAL: Rename column fk_origin_line on shipment lines into fk_elementdet to match a generic use. (#28989)
QUAL: replace $conf->global with getDolGlobalString()
Expand All @@ -301,6 +300,7 @@ The following changes may create regressions for some external modules, but were
* All CLI tools (into /scripts) return a positive value to the shell if error (0 remains success) for a better
cross platform compatibility. On linux the exit(-1) was caught as 255, it may be now exit(1) so will be caught as 1.
* The parameter $filter of method fetchAll does not accept array of SQL but must be a string of an Universal Search Filter syntax.
* Remove use of customurl into $filter. Must use the USF syntax.
* Use of dol_eval with parameter $returnvalue=0 is deprecated.
* The signature for all ->delete() method has been modified to match the modulebuilder template (so first param is now always $user), except
the delete for thirdparty (still accept the id of thirdparty to delete as first parameter). Will probably be modified into another version.
Expand All @@ -316,7 +316,6 @@ The following changes may create regressions for some external modules, but were
* The signature of method fetch() of class CompanyBankAccount has been modified to match the signature of method Account->fetch()



***** ChangeLog for 19.0.2 compared to 19.0.1 *****
FIX: $object->oldcopy may be a stdClass and not original object
FIX: 16.0 - parent company gets emptied when updating a third party from the card in edit mode (#28269)
Expand Down
14 changes: 7 additions & 7 deletions build/generate_filelist_xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
exit(1);
}

require_once $path."../htdocs/master.inc.php";
Expand All @@ -51,7 +51,7 @@
if (empty($argv[1])) {
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
exit -1;
exit(1);
}


Expand Down Expand Up @@ -87,7 +87,7 @@
if (empty($release)) {
print "Error: Missing release parameter\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
exit(2);
}

$savrelease = $release;
Expand All @@ -107,21 +107,21 @@
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
exit(3);
}
} else {
$tmpverter = explode('-', DOL_VERSION, 2);
if ($tmpverter[0] != $tmpverbis[0]) {
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
exit(4);
}
}
} else {
if (!preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
exit -1;
exit(5);
}
}

Expand All @@ -147,7 +147,7 @@
$fp = fopen($outputfile, 'w');
if (empty($fp)) {
print 'Failed to open file '.$outputfile."\n";
exit(-1);
exit(6);
}

fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
Expand Down
2 changes: 1 addition & 1 deletion dev/tools/codespell/codespell-lines-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
$this->datee = $this->db->jdate($obj->datee);
$this->periode = $this->db->jdate($obj->period);
$tmp = array('id_users' => $obj->id_users, 'nom' => $obj->name, 'reponses' => $obj->reponses);
$tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0, true); // Disable hook for the moment
$tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0, 1); // Disable hook for the moment
//si les reponses ne concerne pas la colonne effacée, on concatenate
GETPOST("mouvement", 'alpha'),
GETPOSTINT("mouvement"),
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/accountmodel.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
// There is several pages
if ($num > $listlimit) {
print '<tr class="none"><td class="right" colspan="'.(3 + count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page + 1).'</span></li>');
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit ? 1 : 0), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page + 1).'</span></li>');
print '</td></tr>';
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/categories_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@
// There is several pages
if ($num > $listlimit) {
print '<tr class="none"><td class="right" colspan="'.(2 + count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page + 1).'</span></li>');
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit ? 1 : 0), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page + 1).'</span></li>');
print '</td></tr>';
}

Expand Down
3 changes: 2 additions & 1 deletion htdocs/accountancy/admin/journals_list.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2017-2024 Alexandre Spangaro <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
* Copyright (C) 2024 Frédéric France <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -494,7 +495,7 @@
// There is several pages
if ($num > $listlimit) {
print '<tr class="none"><td class="right" colspan="'.(3 + count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page + 1).'</span></li>');
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit ? 1 : 0), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page + 1).'</span></li>');
print '</td></tr>';
}

Expand Down
8 changes: 4 additions & 4 deletions htdocs/accountancy/class/accountancyexport.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Copyright (C) 2022 Lionel Vessiller <[email protected]>
* Copyright (C) 2013-2017 Olivier Geffroy <[email protected]>
* Copyright (C) 2017 Elarifr. Ari Elbaz <[email protected]>
* Copyright (C) 2017-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2017-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2017 André Schild <[email protected]>
* Copyright (C) 2020 Guillaume Alexandre <[email protected]>
* Copyright (C) 2022 Joachim Kueter <[email protected]>
Expand Down Expand Up @@ -1025,7 +1025,7 @@ public function exportQuadratus($objectLines, $exportFile = null, $archiveFileLi
$arrayofinclusion = array();
// If it is a supplier invoice, we want to use last uploaded file
$arrayofinclusion[] = '^'.preg_quote($objectFileName, '/').(($line->doc_type == 'supplier_invoice') ? '.+' : '').'\.pdf$';
$fileFoundList = dol_dir_list($objectDirPath.'/'.$objectFileName, 'files', 0, implode('|', $arrayofinclusion), '(\.meta|_preview.*\.png)$', 'date', SORT_DESC, 0, true);
$fileFoundList = dol_dir_list($objectDirPath.'/'.$objectFileName, 'files', 0, implode('|', $arrayofinclusion), '(\.meta|_preview.*\.png)$', 'date', SORT_DESC, 0, 1);
if (!empty($fileFoundList)) {
$attachmentFileNameTrunc = str_pad(self::trunc($line->piece_num, 8), 8, '0', STR_PAD_LEFT);
foreach ($fileFoundList as $fileFound) {
Expand Down Expand Up @@ -1491,7 +1491,7 @@ public function exportFEC($objectLines, $exportFile = null, $archiveFileList = a
$arrayofinclusion = array();
// If it is a supplier invoice, we want to use last uploaded file
$arrayofinclusion[] = '^'.preg_quote($objectFileName, '/').(($line->doc_type == 'supplier_invoice') ? '.+' : '').'\.pdf$';
$fileFoundList = dol_dir_list($objectDirPath.'/'.$objectFileName, 'files', 0, implode('|', $arrayofinclusion), '(\.meta|_preview.*\.png)$', 'date', SORT_DESC, 0, true);
$fileFoundList = dol_dir_list($objectDirPath.'/'.$objectFileName, 'files', 0, implode('|', $arrayofinclusion), '(\.meta|_preview.*\.png)$', 'date', SORT_DESC, 0, 1);
if (!empty($fileFoundList)) {
$attachmentFileNameTrunc = $line->doc_ref;
foreach ($fileFoundList as $fileFound) {
Expand Down Expand Up @@ -1703,7 +1703,7 @@ public function exportFEC2($objectLines, $exportFile = null, $archiveFileList =
$arrayofinclusion = array();
// If it is a supplier invoice, we want to use last uploaded file
$arrayofinclusion[] = '^'.preg_quote($objectFileName, '/').(($line->doc_type == 'supplier_invoice') ? '.+' : '').'\.pdf$';
$fileFoundList = dol_dir_list($objectDirPath.'/'.$objectFileName, 'files', 0, implode('|', $arrayofinclusion), '(\.meta|_preview.*\.png)$', 'date', SORT_DESC, 0, true);
$fileFoundList = dol_dir_list($objectDirPath.'/'.$objectFileName, 'files', 0, implode('|', $arrayofinclusion), '(\.meta|_preview.*\.png)$', 'date', SORT_DESC, 0, 1);
if (!empty($fileFoundList)) {
$attachmentFileNameTrunc = $line->doc_ref;
foreach ($fileFoundList as $fileFound) {
Expand Down
16 changes: 8 additions & 8 deletions htdocs/accountancy/customer/list.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <[email protected]>
* Copyright (C) 2013-2024 Alexandre Spangaro <[email protected]>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <[email protected]>
* Copyright (C) 2013-2021 Florian Henry <[email protected]>
* Copyright (C) 2014 Juanjo Menent <[email protected]>
* Copyright (C) 2016 Laurent Destailleur <[email protected]>
* Copyright (C) 2021 Gauthier VERDOL <[email protected]>
/* Copyright (C) 2013-2014 Olivier Geffroy <[email protected]>
* Copyright (C) 2013-2024 Alexandre Spangaro <[email protected]>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <[email protected]>
* Copyright (C) 2013-2021 Florian Henry <[email protected]>
* Copyright (C) 2014 Juanjo Menent <[email protected]>
* Copyright (C) 2016 Laurent Destailleur <[email protected]>
* Copyright (C) 2021 Gauthier VERDOL <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -232,7 +232,7 @@

$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';

llxHeader('', $langs->trans("CustomersVentilation"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-customer page-list');
llxHeader('', $langs->trans("CustomersVentilation"), $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-accountancy accountancy-customer page-list');

if (empty($chartaccountcode)) {
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
Expand Down
16 changes: 8 additions & 8 deletions htdocs/accountancy/expensereport/list.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <[email protected]>
* Copyright (C) 2013-2024 Alexandre Spangaro <[email protected]>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <[email protected]>
* Copyright (C) 2013-2014 Florian Henry <[email protected]>
* Copyright (C) 2014 Juanjo Menent <[email protected]>
* Copyright (C) 2016 Laurent Destailleur <[email protected]>
* Copyright (C) 2024 Frédéric France <[email protected]>
/* Copyright (C) 2013-2014 Olivier Geffroy <[email protected]>
* Copyright (C) 2013-2024 Alexandre Spangaro <[email protected]>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <[email protected]>
* Copyright (C) 2013-2014 Florian Henry <[email protected]>
* Copyright (C) 2014 Juanjo Menent <[email protected]>
* Copyright (C) 2016 Laurent Destailleur <[email protected]>
* Copyright (C) 2024 Frédéric France <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -225,7 +225,7 @@

$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';

llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-expensereport page-list');
llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-accountancy accountancy-expensereport page-list');

if (empty($chartaccountcode)) {
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
Expand Down
Loading

0 comments on commit 1608dac

Please sign in to comment.