diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php
index a310700cee4..f012be7ca71 100644
--- a/htdocs/accountancy/class/accountancyexport.class.php
+++ b/htdocs/accountancy/class/accountancyexport.class.php
@@ -1020,7 +1020,7 @@ class AccountancyExport
// We need to keep the 10 latest number of invoices doc_ref not the beginning part that is the useless almost same part
// $tab['num_piece3'] = str_pad(self::trunc($line->piece_num, 10), 10);
- $tab['num_piece3'] = substr(self::trunc($line->doc_ref, 20), -10);
+ $tab['num_piece3'] = str_pad(substr(self::trunc($line->doc_ref, 20), -10), 10);
$tab['reserved'] = str_repeat(' ', 10); // position 159
$tab['currency_amount'] = str_repeat(' ', 13); // position 169
// get document file
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 71e27fc5729..c9da7b0bf8e 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -699,7 +699,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
if ($nbmodulesnotautoenabled <= getDolGlobalInt('MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING', 1)) { // If only minimal initial modules enabled
$deschelp .= '
'.$desc."
\n";
}
- if (getDolGlobalString('MAIN_SETUP_MODULES_INFO')) { // Show a custom message
+ if (getDolGlobalString('MAIN_SETUP_MODULES_INFO')) { // Show a custom message. A good usage for SaaS with option MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING.
$deschelp .= ''.$langs->trans(getDolGlobalString('MAIN_SETUP_MODULES_INFO'))."
\n";
}
if ($deschelp) {
diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index d779f11f4d7..a45d7b9487e 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -293,7 +293,7 @@ class BOM extends CommonObject
* @param int $notrigger false=launch triggers after, true=disable triggers
* @return int Return integer <0 if KO, Id of created object if OK
*/
- public function create(User $user, $notrigger = 1)
+ public function create(User $user, $notrigger = 0)
{
if ($this->efficiency <= 0 || $this->efficiency > 1) {
$this->efficiency = 1;
@@ -553,7 +553,7 @@ class BOM extends CommonObject
* @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers
* @return int<-1,-1>|int<1,1> Return integer <0 if KO, >0 if OK
*/
- public function update(User $user, $notrigger = 1)
+ public function update(User $user, $notrigger = 0)
{
if ($this->efficiency <= 0 || $this->efficiency > 1) {
$this->efficiency = 1;
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index bb68856993e..c3ffff3ecd2 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -1994,7 +1994,7 @@ if ($action == 'create') {
if (empty($object->warehouse_id) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE')) {
$warehouse_id = getDolGlobalString('MAIN_DEFAULT_WAREHOUSE');
}
- if (empty($object->warehouse_id) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE_USER') && !empty($user->warehouse_id)) {
+ if (empty($object->warehouse_id) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE_USER') && !empty($user->fk_warehouse)) {
$warehouse_id = $user->fk_warehouse;
}
}
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 881ed15a9ee..db4c5609f22 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -1921,7 +1921,7 @@ if ($action == 'create' && $usercancreate) {
if (empty($object->warehouse_id) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE')) {
$warehouse_id = getDolGlobalString('MAIN_DEFAULT_WAREHOUSE');
}
- if (empty($object->warehouse_id) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE_USER') && !empty($user->warehouse_id)) {
+ if (empty($object->warehouse_id) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE_USER') && !empty($user->fk_warehouse)) {
$warehouse_id = $user->fk_warehouse;
}
}
diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php
index 619e4e5a8ae..67bd5da86ee 100644
--- a/htdocs/compta/facture/card-rec.php
+++ b/htdocs/compta/facture/card-rec.php
@@ -154,10 +154,14 @@ $result = restrictedArea($user, 'facture', $object->id, $objecttype);
/*
* Actions
*/
-
if (GETPOST('cancel', 'alpha')) {
- $action = 'list';
- $massaction = '';
+ if ($action != 'updateline') {
+ $action = 'list';
+ $massaction = '';
+ } else {
+ $action = '';
+ $cancel = '';
+ }
}
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
$massaction = '';