From 0710031b32afc9804980c99f80c371423663b7cc Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 30 Dec 2022 12:44:36 +0100 Subject: [PATCH] update code toward php8 compliance --- htdocs/contrat/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 220356310fa..ae2302b55f5 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1513,7 +1513,7 @@ if ($action == 'create') { // 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").''; @@ -1594,7 +1594,7 @@ if ($action == 'create') { // Quantity print ''.$objp->qty.''; // Unit - if (!empty($conf->global->PRODUCT_USE_UNITS)) { + if (getDolGlobalInt('PRODUCT_USE_UNITS')) { print ''.$langs->trans($object->lines[$cursorline - 1]->getLabelOfUnit()).''; } // Discount @@ -1739,7 +1739,7 @@ if ($action == 'create') { print ''; // Unit - if (!empty($conf->global->PRODUCT_USE_UNITS)) { + if (getDolGlobalInt('PRODUCT_USE_UNITS')) { print ''; print $form->selectUnits($objp->fk_unit, "unit"); print ''; @@ -1765,7 +1765,7 @@ if ($action == 'create') { if (isModEnabled('margin') && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) { $colspan++; } - if (!empty($conf->global->PRODUCT_USE_UNITS)) { + if (getDolGlobalInt('PRODUCT_USE_UNITS')) { $colspan++; }