From 5f3cea32f1d2ff8caf29f0d9331a8efd2a27e553 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 30 Dec 2022 12:45:54 +0100 Subject: [PATCH] update code toward php8 compliance --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index d9b86ae01da..2a7fb703dac 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5100,7 +5100,7 @@ abstract class CommonObject print ''.$langs->trans('PriceUHTCurrency').''; } print ''.$langs->trans('Qty').''; - if (!empty($conf->global->PRODUCT_USE_UNITS)) { + if (getDolGlobalInt('PRODUCT_USE_UNITS')) { print ''.$langs->trans('Unit').''; } print ''.$langs->trans('ReductionShort').''; @@ -5238,7 +5238,7 @@ abstract class CommonObject $this->tpl['total_ht'] = price($line->total_ht); $this->tpl['multicurrency_price'] = price($line->multicurrency_subprice); $this->tpl['qty'] = (($line->info_bits & 2) != 2) ? $line->qty : ' '; - if (!empty($conf->global->PRODUCT_USE_UNITS)) { + if (getDolGlobalInt('PRODUCT_USE_UNITS')) { $this->tpl['unit'] = $langs->transnoentities($line->getLabelOfUnit('long')); } $this->tpl['remise_percent'] = (($line->info_bits & 2) != 2) ? vatrate($line->remise_percent, true) : ' ';