From 4438446c0a3c20266562b09e880cfca8dbfd2e63 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 May 2024 11:53:09 +0200 Subject: [PATCH] Fix warnings --- htdocs/core/class/html.formticket.class.php | 1 + htdocs/core/lib/price.lib.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 0f547980be2..f20d9ed2254 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -661,6 +661,7 @@ class FormTicket // If no socid, set to -1 to avoid full contacts list $selectedCompany = ($this->withfromsocid > 0) ? $this->withfromsocid : -1; print img_picto('', 'contact', 'class="paddingright"'); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->select_contact($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 1, 'maxwidth300 widthcentpercentminusx', true); print ' '; diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index 844c975421d..c986a67c121 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -400,7 +400,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $keyforforeignMAIN_MAX_DECIMALS_UNIT = 'MAIN_MAX_DECIMALS_UNIT_'.$multicurrency_code; $keyforforeignMAIN_MAX_DECIMALS_TOT = 'MAIN_MAX_DECIMALS_TOT_'.$multicurrency_code; $keyforforeignMAIN_ROUNDING_RULE_TOT = 'MAIN_ROUNDING_RULE_TOT_'.$multicurrency_code; - if (!empty($conf->global->$keyforforeignMAIN_ROUNDING_RULE_TOT)) { + if (getDolGlobalString($keyforforeignMAIN_ROUNDING_RULE_TOT)) { $conf->global->MAIN_MAX_DECIMALS_UNIT = getDolGlobalString($keyforforeignMAIN_MAX_DECIMALS_UNIT); $conf->global->MAIN_MAX_DECIMALS_TOT = getDolGlobalString($keyforforeignMAIN_MAX_DECIMALS_TOT); $conf->global->MAIN_ROUNDING_RULE_TOT = getDolGlobalString($keyforforeignMAIN_ROUNDING_RULE_TOT); @@ -412,9 +412,9 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt if ($multicurrency_code) { // Restore setup of currency accurency - $conf->global->MAIN_MAX_DECIMALS_UNIT = $savMAIN_MAX_DECIMALS_UNIT; // @phan-ignore-current-line PhanPossiblyUndeclaredVariable - $conf->global->MAIN_MAX_DECIMALS_TOT = $savMAIN_MAX_DECIMALS_TOT; // @phan-ignore-current-line PhanPossiblyUndeclaredVariable - $conf->global->MAIN_ROUNDING_RULE_TOT = $savMAIN_ROUNDING_RULE_TOT; // @phan-ignore-current-line PhanPossiblyUndeclaredVariable + $conf->global->MAIN_MAX_DECIMALS_UNIT = $savMAIN_MAX_DECIMALS_UNIT; // @phan-suppress-current-line PhanPossiblyUndeclaredVariable + $conf->global->MAIN_MAX_DECIMALS_TOT = $savMAIN_MAX_DECIMALS_TOT; // @phan-suppress-current-line PhanPossiblyUndeclaredVariable + $conf->global->MAIN_ROUNDING_RULE_TOT = $savMAIN_ROUNDING_RULE_TOT; // @phan-suppress-current-line PhanPossiblyUndeclaredVariable } $result[16] = $newresult[0];