From 65c3e2c40eaeba7238f5201ff52495b0222ed8b3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Jun 2024 19:46:11 +0200 Subject: [PATCH] Fix regression --- htdocs/product/admin/price_rules.php | 2 +- htdocs/product/card.php | 2 -- htdocs/product/list.php | 4 ++-- htdocs/product/price.php | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php index cd499559fd7..87a33052cbb 100644 --- a/htdocs/product/admin/price_rules.php +++ b/htdocs/product/admin/price_rules.php @@ -168,7 +168,7 @@ for ($i = 1; $i <= $produit_multiprices_limit; $i++) { echo $langs->trans('SellingPrice').' '.$i; // Label of price $keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i; - if (!empty(getDolGlobalString('$keyforlabel'))) { + if (getDolGlobalString($keyforlabel)) { print ' - '.$langs->trans(getDolGlobalString($keyforlabel)); } ?> diff --git a/htdocs/product/card.php b/htdocs/product/card.php index c7235dcd684..f362e851eb4 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1673,8 +1673,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio } // Note (private, no output on invoices, propales...) - //if (!empty(getDolGlobalString('MAIN_DISABLE_NOTES_TAB'))) available in create mode - //{ print ''.$langs->trans("NoteNotVisibleOnBill").''; // We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF. diff --git a/htdocs/product/list.php b/htdocs/product/list.php index d7c09a7b180..fceb1781b51 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -296,8 +296,8 @@ if (getDolGlobalString('PRODUIT_MULTIPRICES')) { $produit_multiprices_limit = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); for ($i = 1; $i <= $produit_multiprices_limit; $i++) { $keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i; - if (!empty(getDolGlobalString('$keyforlabel'))) { - $labelp = $i.' - '.$langs->transnoentitiesnoconv(getDolGlobalString('$keyforlabel')); + if (getDolGlobalString($keyforlabel)) { + $labelp = $i.' - '.$langs->transnoentitiesnoconv(getDolGlobalString($keyforlabel)); } else { $labelp = $langs->transnoentitiesnoconv("SellingPrice")." ".$i; } diff --git a/htdocs/product/price.php b/htdocs/product/price.php index c71a853e535..c8cc90fb249 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1089,7 +1089,7 @@ if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUS print ''; } else { print $langs->trans("SellingPrice").' '.$i; - if (!empty(getDolGlobalString('$keyforlabel'))) { + if (getDolGlobalString($keyforlabel)) { print ' - '.$langs->trans(getDolGlobalString($keyforlabel)); } } @@ -1122,7 +1122,7 @@ if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUS // Price by quantity if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { // TODO Fix the form included into a tr instead of a td print ''.$langs->trans("PriceByQuantity").' '.$i; - if (!empty(getDolGlobalString('$keyforlabel'))) { + if (getDolGlobalString($keyforlabel)) { print ' - '.$langs->trans(getDolGlobalString($keyforlabel)); } print '';