mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 .= '<div class="info hideonsmartphone">'.$desc."<br></div>\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 .= '<div class="info">'.$langs->trans(getDolGlobalString('MAIN_SETUP_MODULES_INFO'))."<br></div>\n";
|
||||
}
|
||||
if ($deschelp) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 = '';
|
||||
|
||||
Reference in New Issue
Block a user