Clean code

This commit is contained in:
Laurent Destailleur 2024-11-18 15:43:34 +01:00
parent 58fa1ac626
commit 5891fd3022
4 changed files with 4 additions and 4 deletions

View File

@ -3634,7 +3634,7 @@ class Facture extends CommonInvoice
$this->date_validation = $now;
$i = 0;
if (getDolGlobalString('INVOICE_USE_SITUATION')) {
if (getDolGlobalInt('INVOICE_USE_SITUATION')) {
$final = true;
$nboflines = count($this->lines);
while (($i < $nboflines) && $final) {

View File

@ -64,7 +64,7 @@ if ($user->socid) {
$object = new Facture($db);
// Load object
if ($id > 0 || !empty($ref)) {
$ret = $object->fetch($id, $ref, '', 0, (getDolGlobalString('INVOICE_USE_SITUATION') ? $conf->global->INVOICE_USE_SITUATION : 0));
$ret = $object->fetch($id, $ref, '', 0, getDolGlobalInt('INVOICE_USE_SITUATION'));
}
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
$hookmanager->initHooks(array('invoicecontactcard', 'globalcard'));

View File

@ -55,7 +55,7 @@ $action = GETPOST('action', 'aZ09');
$object = new Facture($db);
// Load object
if ($id > 0 || !empty($ref)) {
$object->fetch($id, $ref, '', 0, (getDolGlobalString('INVOICE_USE_SITUATION') ? $conf->global->INVOICE_USE_SITUATION : 0));
$object->fetch($id, $ref, '', 0, getDolGlobalInt('INVOICE_USE_SITUATION'));
}
$permissionnote = $user->hasRight('facture', 'creer'); // Used by the include of actions_setnotes.inc.php

View File

@ -181,7 +181,7 @@ class pdf_octopus extends ModelePDFFactures
// for retro compatibility
if (getDolGlobalString('INVOICE_USE_SITUATION_RETAINED_WARRANTY') && !getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY')) {
// before it was only for final situation invoice
$conf->global->INVOICE_USE_RETAINED_WARRANTY = $conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY;
$conf->global->INVOICE_USE_RETAINED_WARRANTY = getDolGlobalString('INVOICE_USE_SITUATION_RETAINED_WARRANTY');
$conf->global->USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL = 1;
}