diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt
index 477d129d459..d4e37e32629 100644
--- a/build/makepack-howto.txt
+++ b/build/makepack-howto.txt
@@ -8,12 +8,13 @@ This files describe steps made by Dolibarr packaging team to make a
beta version of Dolibarr, step by step.
- Check all files are commited.
-- Update version/info in ChangeLog.
-To generate a changelog of a major new version x.y.0 (from develop repo), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
-To generate a changelog of a major new version x.y.0 (from x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
+- Update version/info in ChangeLog, for this you can:
+To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
+To generate a changelog of a major new version x.y.0 (from a repo on branch x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
-- To know number of lines changes: git diff --shortstat A B
-- Update version number with x.y.z-w in htdocs/filefunc.inc.php
+Recopy the content of the output file into the file ChangeLog.
+- Note: To know number of lines changes: git diff --shortstat A B
+- Update version number with x.y.z-w in file htdocs/filefunc.inc.php
- Commit all changes.
- Run makepack-dolibarr.pl to generate all packages.
@@ -24,7 +25,6 @@ To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dol
(/home/dolibarr/wwwroot/files/lastbuild).
- Post a news on dolibarr.org/dolibarr.fr + social networks
-- Send mail on mailings-list
***** Actions to do a RELEASE *****
@@ -32,12 +32,13 @@ This files describe steps made by Dolibarr packaging team to make a
complete release of Dolibarr, step by step.
- Check all files are commited.
-- Update version/info in ChangeLog.
-To generate a changelog of a major new version x.y.0 (from develop repo), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
-To generate a changelog of a major new version x.y.0 (from x.y repo), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
+- Update version/info in ChangeLog, for this you can:
+To generate a changelog of a major new version x.y.0 (from a repo on branch develop), you can do "cd ~/git/dolibarr; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent develop) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
+To generate a changelog of a major new version x.y.0 (from a repo pn branch x.y), you can do "cd ~/git/dolibarr_x.y; git log `diff -u <(git rev-list --first-parent x.(y-1).0) <(git rev-list --first-parent x.y.0) | sed -ne 's/^ //p' | head -1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
-- To know number of lines changes: git diff --shortstat A B
-- Update version number with x.y.z in htdocs/filefunc.inc.php
+Recopy the content of the output file into the file ChangeLog.
+- Note: To know the number of lines changes: git diff --shortstat A B
+- Update version number with x.y.z in file htdocs/filefunc.inc.php
- Commit all changes.
- Run makepack-dolibarr.pl to generate all packages.
@@ -52,4 +53,3 @@ To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dol
on server to point to new files (used by some web sites).
- Post a news on dolibarr.org/dolibarr.fr + social networks
-- Send mail on mailings-list
diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index d10e789f39c..e58cf45dd7e 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -435,7 +435,8 @@ foreach ($configfileparameters as $key => $value) {
if (empty($valuetoshow)) {
print img_warning("EditConfigFileToAddEntry", 'dolibarr_main_instance_unique_id');
}
- print ' ('.$langs->trans("HashForPing").'='.md5('dolibarr'.$valuetoshow).')';
+ print '';
+ print '
=> '.$langs->trans("HashForPing").'
'.md5('dolibarr'.$valuetoshow).'
'."\n";
} elseif ($newkey == 'dolibarr_main_prod') {
print ${$newkey};
diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php
index 9bf7dd7c117..81ba8e3b09d 100644
--- a/htdocs/api/class/api_documents.class.php
+++ b/htdocs/api/class/api_documents.class.php
@@ -611,6 +611,16 @@ class Documents extends DolibarrApi
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$object = new FactureFournisseur($this->db);
+ } elseif ($modulepart == 'commande' || $modulepart == 'order') {
+ $modulepart = 'commande';
+
+ require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
+ $object = new Commande($this->db);
+ } elseif ($modulepart == 'commande_fournisseur' || $modulepart == 'supplier_order') {
+ $modulepart = 'supplier_order';
+
+ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
+ $object = new CommandeFournisseur($this->db);
} elseif ($modulepart == 'project') {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$object = new Project($this->db);
@@ -669,7 +679,7 @@ class Documents extends DolibarrApi
}
// Special cases that need to use get_exdir to get real dir of object
- // If future, all object should use this to define path of documents.
+ // In future, all object should use this to define path of documents.
if ($modulepart == 'supplier_invoice') {
$tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier');
}
diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php
index 8ca3272dd78..0c61cf0a3c2 100644
--- a/htdocs/compta/bank/card.php
+++ b/htdocs/compta/bank/card.php
@@ -778,13 +778,13 @@ if ($action == 'create') {
print '';
if ($conf->prelevement->enabled) {
- print '
";
if (!empty($conf->banque->enabled)) {
+ // Bank account
print '
'.$langs->trans("BankAccount").'
';
print img_picto('', 'bank_account', 'pictofixedwidth');
- $form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 1); // List of bank account available
+ $form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 1, '', 0, 'maxwidth500 widthcentpercentminusx'); // List of bank account available
print '
';
diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php
index 33c000e4475..16d8a919dbe 100644
--- a/htdocs/install/fileconf.php
+++ b/htdocs/install/fileconf.php
@@ -615,12 +615,13 @@ jQuery(document).ready(function() {
function init_needroot()
{
+ console.log("init_needroot force_install_noedit=");
/*alert(jQuery("#db_create_database").prop("checked")); */
if (jQuery("#db_create_database").is(":checked") || jQuery("#db_create_user").is(":checked"))
{
jQuery(".hideroot").show();
+ if (empty($force_install_noedit)) { ?>
jQuery(".needroot").removeAttr('disabled');
}
diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql
index 070f3a2c5da..4add688b880 100644
--- a/htdocs/install/mysql/migration/repair.sql
+++ b/htdocs/install/mysql/migration/repair.sql
@@ -559,6 +559,13 @@ DELETE FROM llx_rights_def WHERE module = 'hrm' AND perms = 'employee';
-- Sequence to fix the content of llx_bank.amount_main_currency
+-- Note: amount is amount in currency of bank account
+-- Note: pamount is always amount into the main currency
+-- Note: pmulticurrencyamount is in currency of invoice
+-- Note: amount_main_currency must be amount in main currency
-- DROP TABLE tmp_bank;
-- CREATE TABLE tmp_bank SELECT b.rowid, b.amount, p.rowid as pid, p.amount as pamount, p.multicurrency_amount as pmulticurrencyamount FROM llx_bank as b INNER JOIN llx_bank_url as bu ON bu.fk_bank=b.rowid AND bu.type = 'payment' INNER JOIN llx_paiement as p ON bu.url_id = p.rowid WHERE p.multicurrency_amount <> 0 AND p.multicurrency_amount <> p.amount;
-- UPDATE llx_bank as b SET b.amount_main_currency = (SELECT tb.pamount FROM tmp_bank as tb WHERE tb.rowid = b.rowid) WHERE b.amount_main_currency IS NULL;
+-- DROP TABLE tmp_bank2;
+-- CREATE TABLE tmp_bank2 SELECT b.rowid, b.amount, p.rowid as pid, p.amount as pamount, p.multicurrency_amount as pmulticurrencyamount FROM llx_bank as b INNER JOIN llx_bank_url as bu ON bu.fk_bank=b.rowid AND bu.type = 'payment_supplier' INNER JOIN llx_paiementfourn as p ON bu.url_id = p.rowid WHERE p.multicurrency_amount <> 0 AND p.multicurrency_amount <> p.amount;
+-- UPDATE llx_bank as b SET b.amount_main_currency = (SELECT tb.pamount FROM tmp_bank2 as tb WHERE tb.rowid = b.rowid) WHERE b.amount_main_currency IS NULL;
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 1dc7d4e2092..0009cd00bcf 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -2234,3 +2234,4 @@ TemplateforBusinessCards=Template for a business card in different size
InventorySetup= Inventory Setup
ExportUseLowMemoryMode=Use a low memory mode
ExportUseLowMemoryModeHelp=Use the low memory mode to execute the exec of the dump (compression is done through a pipe instead of into the PHP memory). This method does not allow to check that file is completed and error message can't be reported if it fails.
+HashForPing=Hash used for ping
diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang
index 9d145ef354d..75cee952bcd 100644
--- a/htdocs/langs/en_US/withdrawals.lang
+++ b/htdocs/langs/en_US/withdrawals.lang
@@ -137,6 +137,7 @@ SEPAFRST=SEPA FRST
ExecutionDate=Execution date
CreateForSepa=Create direct debit file
ICS=Creditor Identifier - ICS
+IDS=Debitor Identifier
END_TO_END="EndToEndId" SEPA XML tag - Unique id assigned per transaction
USTRD="Unstructured" SEPA XML tag
ADDDAYS=Add days to Execution Date
@@ -154,4 +155,5 @@ ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default
ErrorICSmissing=Missing ICS in Bank account %s
TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines
WarningSomeDirectDebitOrdersAlreadyExists=Warning: There is already some pending Direct Debit orders (%s) requested for an amount of %s
-WarningSomeCreditTransferAlreadyExists=Warning: There is already some pending Credit Transfer (%s) requested for an amount of %s
\ No newline at end of file
+WarningSomeCreditTransferAlreadyExists=Warning: There is already some pending Credit Transfer (%s) requested for an amount of %s
+UsedFor=Used for %s
\ No newline at end of file
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 805d7b9e105..e2dd5f0f2b8 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -109,10 +109,11 @@ function testSqlAndScriptInject($val, $type)
// We check string because some hacks try to obfuscate evil strings by inserting non printable chars. Example: 'java(ascci09)scr(ascii00)ipt' is processed like 'javascript' (whatever is place of evil ascii char)
// We should use dol_string_nounprintableascii but function is not yet loaded/available
// Example of valid UTF8 chars:
- // utf8=utf8mb3: '\x0A', '\x0D', '\x7E'
+ // utf8=utf8mb3: '\x09', '\x0A', '\x0D', '\x7E'
// utf8=utf8mb3: '\xE0\xA0\x80'
// utf8mb4: '\xF0\x9D\x84\x9E' (but this may be refused by the database insert if pagecode is utf8=utf8mb3)
- $newval = preg_replace('/[\x00-\x09\x0B-\x0C\x0E-\x1F\x7F]/u', '', $val); // /u operator makes UTF8 valid characters being ignored so are not included into the replace
+ $newval = preg_replace('/[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F]/u', '', $val); // /u operator makes UTF8 valid characters being ignored so are not included into the replace
+
// Note that $newval may also be completely empty '' when non valid UTF8 are found.
if ($newval != $val) {
// If $val has changed after removing non valid UTF8 chars, it means we have an evil string.
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index efa14b1e582..fa69bbf0399 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -1564,8 +1564,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Quality control
if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) {
- print '
'.$langs->trans("LifeTime").'
';
- print '
'.$langs->trans("QCFrequency").'
';
+ print '
'.$langs->trans("LifeTime").'
';
+ print '
'.$langs->trans("QCFrequency").'
';
}
// Other attributes
@@ -2611,19 +2611,19 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Custom code
if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) {
- print '