From 2ee72e2fdf46f8b07b9521cd95db68414e38e7c4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 8 May 2019 02:02:07 +0200 Subject: [PATCH] Update html.form.class.php --- htdocs/core/class/html.form.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 987331d1e0c..1ad6017b9d4 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2085,7 +2085,7 @@ class Form $selectFields.= ", idprodcustprice, custprice, custprice_ttc, custprice_base_type, custtva_tx"; } // Units - if($conf->global->PRODUCT_USE_UNITS) { + if (! empty($conf->global->PRODUCT_USE_UNITS)) { $sql .= ', u.label as unit_long, u.short_label as unit_short'; $selectFields .= ', unit_long, unit_short'; } @@ -2127,7 +2127,7 @@ class Form $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."product_customer_price as pcp ON pcp.fk_soc=".$socid." AND pcp.fk_product=p.rowid"; } // Units - if($conf->global->PRODUCT_USE_UNITS) { + if (! empty($conf->global->PRODUCT_USE_UNITS)) { $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_units u ON u.rowid = p.fk_unit"; } // Multilang : we add translation @@ -2392,7 +2392,7 @@ class Form if ($outbarcode) $opt.=' ('.$outbarcode.')'; $opt.=' - '.dol_trunc($label, $maxlengtharticle); // Units - if($conf->global->PRODUCT_USE_UNITS) { + if (! empty($conf->global->PRODUCT_USE_UNITS)) { $opt .= ' (' . $objp->unit_short . ')'; }