Debug v17

This commit is contained in:
Laurent Destailleur 2023-02-19 16:42:01 +01:00
parent c3da1554a7
commit 2cafd2cbc4
4 changed files with 10 additions and 5 deletions

View File

@ -261,7 +261,7 @@ class RemiseCheque extends CommonObject
$this->errno = $this->db->lasterrno(); $this->errno = $this->db->lasterrno();
} }
if (!$this->errno && !empty($conf->global->MAIN_DISABLEDRAFTSTATUS)) { if (!$this->errno && (getDolGlobalString('MAIN_DISABLEDRAFTSTATUS') || getDolGlobalString('MAIN_DISABLEDRAFTSTATUS_CHEQUE'))) {
$res = $this->validate($user); $res = $this->validate($user);
//if ($res < 0) $error++; //if ($res < 0) $error++;
} }

View File

@ -984,8 +984,13 @@ if (!$error && $massaction == 'validate' && $permissiontoadd) {
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) { if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09'); $newlang = GETPOST('lang_id', 'aZ09');
} }
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) { if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && property_exists($objecttmp, 'thirdparty')) {
$newlang = $objecttmp->thirdparty->default_lang; if ((property_exists($objecttmp, 'socid') || property_exists($objecttmp, 'fk_soc')) && empty($objecttmp->thirdparty)) {
$objecttmp->fetch_thirparty();
}
if (!empty($objecttmp->thirdparty)) {
$newlang = $objecttmp->thirdparty->default_lang;
}
} }
if (!empty($newlang)) { if (!empty($newlang)) {
$outputlangs = new Translate("", $conf); $outputlangs = new Translate("", $conf);

View File

@ -438,7 +438,7 @@ class Don extends CommonObject
} }
} }
if (!$error && !empty($conf->global->MAIN_DISABLEDRAFTSTATUS)) { if (!$error && (getDolGlobalString('MAIN_DISABLEDRAFTSTATUS') || getDolGlobalString('MAIN_DISABLEDRAFTSTATUS_DONATION'))) {
//$res = $this->setValid($user); //$res = $this->setValid($user);
//if ($res < 0) $error++; //if ($res < 0) $error++;
} }

View File

@ -498,7 +498,7 @@ class Project extends CommonObject
} }
} }
if (!$error && !empty($conf->global->MAIN_DISABLEDRAFTSTATUS)) { if (!$error && (getDolGlobalString('MAIN_DISABLEDRAFTSTATUS') || getDolGlobalString('MAIN_DISABLEDRAFTSTATUS_PROJECT'))) {
$res = $this->setValid($user); $res = $this->setValid($user);
if ($res < 0) { if ($res < 0) {
$error++; $error++;