diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php
index a7bb62c9901..d29cdb7c6bb 100644
--- a/htdocs/bom/tpl/objectline_create.tpl.php
+++ b/htdocs/bom/tpl/objectline_create.tpl.php
@@ -60,7 +60,7 @@ if ($nolinesbefore) {
print '
'.$langs->trans('AddNewLine').' ';
print '';
print ''.$langs->trans('Qty').' ';
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
print '';
print '';
@@ -109,7 +109,7 @@ $coldisplay++;
print ' ';
print ' ';
-if ($conf->global->PRODUCT_USE_UNITS)
+if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$coldisplay++;
print '';
diff --git a/htdocs/bom/tpl/objectline_edit.tpl.php b/htdocs/bom/tpl/objectline_edit.tpl.php
index 873e7d724b2..77638b875ff 100644
--- a/htdocs/bom/tpl/objectline_edit.tpl.php
+++ b/htdocs/bom/tpl/objectline_edit.tpl.php
@@ -108,7 +108,7 @@ if (($line->info_bits & 2) != 2) {
}
print ' ';
-if ($conf->global->PRODUCT_USE_UNITS)
+if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$coldisplay++;
print '';
diff --git a/htdocs/bom/tpl/objectline_title.tpl.php b/htdocs/bom/tpl/objectline_title.tpl.php
index 56e6cb59657..ad9c54a34ea 100644
--- a/htdocs/bom/tpl/objectline_title.tpl.php
+++ b/htdocs/bom/tpl/objectline_title.tpl.php
@@ -54,7 +54,7 @@ print ' '.$langs->trans('Description').' ';
// Qty
print ''.$form->textwithpicto($langs->trans('Qty'), $langs->trans("QtyRequiredIfNoLoss")).' ';
-if ($conf->global->PRODUCT_USE_UNITS)
+if (!empty($conf->global->PRODUCT_USE_UNITS))
{
print ''.$langs->trans('Unit').' ';
}
diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php
index ecaf9117aae..87c1a72789d 100644
--- a/htdocs/bom/tpl/objectline_view.tpl.php
+++ b/htdocs/bom/tpl/objectline_view.tpl.php
@@ -79,7 +79,7 @@ $coldisplay++;
echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price
print '';
-if ($conf->global->PRODUCT_USE_UNITS)
+if (!empty($conf->global->PRODUCT_USE_UNITS))
{
print '';
$label = $tmpproduct->getLabelOfUnit('long');
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index deec72912df..68582d2fb33 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -1477,7 +1477,7 @@ if ($action == 'create')
// print ' '.$langs->trans("PriceUHTCurrency").' ';
//}
print ''.$langs->trans("Qty").' ';
- if ($conf->global->PRODUCT_USE_UNITS) print ''.$langs->trans("Unit").' ';
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) print ''.$langs->trans("Unit").' ';
print ''.$langs->trans("ReductionShort").' ';
if (!empty($conf->margin->enabled) && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) print ''.$langs->trans("BuyingPrice").' ';
print ' ';
@@ -1538,7 +1538,7 @@ if ($action == 'create')
// Quantity
print ''.$objp->qty.' ';
// Unit
- if ($conf->global->PRODUCT_USE_UNITS) print ''.$langs->trans($object->lines[$cursorline - 1]->getLabelOfUnit()).' ';
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) print ''.$langs->trans($object->lines[$cursorline - 1]->getLabelOfUnit()).' ';
// Discount
if ($objp->remise_percent > 0)
{
@@ -1682,7 +1682,7 @@ if ($action == 'create')
print ' ';
// Unit
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
print '';
print $form->selectUnits($objp->fk_unit, "unit");
@@ -1706,7 +1706,7 @@ if ($action == 'create')
$colspan = 6;
if (!empty($conf->margin->enabled) && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) $colspan++;
- if ($conf->global->PRODUCT_USE_UNITS) $colspan++;
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) $colspan++;
// Ligne dates prevues
print ' ';
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index 1cd873c64c6..c25519e151f 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -625,7 +625,7 @@ abstract class CommonDocGenerator
);
// Units
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$resarray['line_unit'] = $outputlangs->trans($line->getLabelOfUnit('long'));
$resarray['line_unit_short'] = $outputlangs->trans($line->getLabelOfUnit('short'));
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 9c58ff6d232..ace39ade0ef 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -4252,7 +4252,7 @@ abstract class CommonObject
print ''.$langs->trans('PriceUHT').' ';
if (!empty($conf->multicurrency->enabled)) print ''.$langs->trans('PriceUHTCurrency').' ';
print ''.$langs->trans('Qty').' ';
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
print ''.$langs->trans('Unit').' ';
}
@@ -4395,7 +4395,7 @@ abstract class CommonObject
$this->tpl['price'] = price($line->subprice);
$this->tpl['multicurrency_price'] = price($line->multicurrency_subprice);
$this->tpl['qty'] = (($line->info_bits & 2) != 2) ? $line->qty : ' ';
- if ($conf->global->PRODUCT_USE_UNITS) $this->tpl['unit'] = $langs->transnoentities($line->getLabelOfUnit('long'));
+ if (!empty($conf->global->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) : ' ';
// Is the line strike or not
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index a1253aa578b..0c7b9d46f3c 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -2113,7 +2113,7 @@ class Form
$outarray = array();
// Units
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$langs->load('other');
}
@@ -2752,7 +2752,7 @@ class Form
$langs->load('stocks');
// Units
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$langs->load('other');
}
@@ -2761,7 +2761,7 @@ class Form
$sql .= " pfp.fk_supplier_price_expression, pfp.fk_product, pfp.tva_tx, pfp.fk_soc, s.nom as name,";
$sql .= " pfp.supplier_reputation";
// 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, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units";
}
if (!empty($conf->barcode->enabled)) $sql .= ", pfp.barcode";
@@ -2770,7 +2770,7 @@ class Form
if ($socid) $sql .= " AND pfp.fk_soc = ".$socid;
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.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";
}
$sql .= " WHERE p.entity IN (".getEntity('product').")";
@@ -2837,7 +2837,7 @@ class Form
// Units
$outvalUnits = '';
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
if (!empty($objp->unit_short)) {
$outvalUnits .= ' - '.$objp->unit_short;
}
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index 7f5a18e2521..7b50d24f557 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -166,7 +166,7 @@ class pdf_einstein extends ModelePDFCommandes
// Define position of columns
$this->posxdesc = $this->marge_gauche + 1;
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$this->posxtva = 101;
$this->posxup = 118;
@@ -490,7 +490,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars
// Unit
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
$pdf->SetXY($this->posxunit, $curY);
@@ -1207,7 +1207,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
}
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index 36374ce66b7..159ff81e33e 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -1815,7 +1815,7 @@ class pdf_eratosthene extends ModelePDFCommandes
),
'border-left' => true, // add left line separator
);
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$this->cols['unit']['status'] = true;
}
diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
index 646b4831697..b295150488b 100644
--- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
@@ -2321,7 +2321,7 @@ class pdf_sponge extends ModelePDFFactures
),
'border-left' => true, // add left line separator
);
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$this->cols['unit']['status'] = true;
}
diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php
index 66f17e21e5a..82143123c40 100644
--- a/htdocs/core/modules/product/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php
@@ -656,7 +656,7 @@ class pdf_standard extends ModelePDFProduct
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
}
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index b88a3d367dd..a5a6b850f7f 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -166,7 +166,7 @@ class pdf_azur extends ModelePDFPropales
// Define position of columns
$this->posxdesc = $this->marge_gauche + 1;
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$this->posxtva = 101;
$this->posxup = 118;
@@ -583,7 +583,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars
// Unit
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
$pdf->SetXY($this->posxunit, $curY);
@@ -1381,7 +1381,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
}
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index 91aaa9de4a4..5524460bfc8 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -1968,7 +1968,7 @@ class pdf_cyan extends ModelePDFPropales
),
'border-left' => true, // add left line separator
);
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$this->cols['unit']['status'] = true;
}
diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
index 2409ffeca54..4ea8fcc585d 100644
--- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
@@ -161,7 +161,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->posxdiscount = 162;
$this->postotalht = 174;
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$this->posxtva = 99;
$this->posxup = 114;
$this->posxqty = 130;
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
index 6c1b5aef21d..12092153e83 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
@@ -1562,7 +1562,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
),
'border-left' => true, // add left line separator
);
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$this->cols['unit']['status'] = true;
}
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
index 1595659093c..bc91d690f36 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
@@ -162,7 +162,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$this->posxdiscount = 162;
$this->postotalht = 174;
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$this->posxtva = 95;
$this->posxup = 114;
@@ -528,7 +528,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars
// Unit
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
$pdf->SetXY($this->posxunit, $curY);
@@ -1057,7 +1057,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
}
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
index 8022bcbae86..3aafb09aa86 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
@@ -159,7 +159,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$this->posxdiscount = 162;
$this->postotalht = 174;
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$this->posxtva = 101;
$this->posxup = 118;
@@ -521,7 +521,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars
// Unit
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
$pdf->SetXY($this->posxunit, $curY);
@@ -1216,7 +1216,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
}
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php
index 401e1079d35..52b50475744 100644
--- a/htdocs/core/tpl/objectline_create.tpl.php
+++ b/htdocs/core/tpl/objectline_create.tpl.php
@@ -105,7 +105,7 @@ if ($nolinesbefore) {
trans('Qty'); ?>
global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
print '';
print '';
diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php
index cb72107cb89..5f0073a57b2 100644
--- a/htdocs/core/tpl/objectline_edit.tpl.php
+++ b/htdocs/core/tpl/objectline_edit.tpl.php
@@ -189,7 +189,7 @@ $coldisplay++;
global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
$coldisplay++;
print '';
diff --git a/htdocs/core/tpl/objectline_title.tpl.php b/htdocs/core/tpl/objectline_title.tpl.php
index 1154dd61834..495e0f6ad2b 100644
--- a/htdocs/core/tpl/objectline_title.tpl.php
+++ b/htdocs/core/tpl/objectline_title.tpl.php
@@ -89,7 +89,7 @@ if ($inputalsopricewithtax) print ' '.$lang
// Qty
print ' '.$langs->trans('Qty').' ';
-if ($conf->global->PRODUCT_USE_UNITS)
+if (!empty($conf->global->PRODUCT_USE_UNITS))
{
print ''.$langs->trans('Unit').' ';
}
diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php
index 46baa6a0b83..c6ffe090c52 100644
--- a/htdocs/core/tpl/objectline_view.tpl.php
+++ b/htdocs/core/tpl/objectline_view.tpl.php
@@ -223,7 +223,7 @@ if ((($line->info_bits & 2) != 2) && $line->special_code != 3) {
} else print ' ';
print '';
-if ($conf->global->PRODUCT_USE_UNITS)
+if (!empty($conf->global->PRODUCT_USE_UNITS))
{
print '';
$label = $line->getLabelOfUnit('short');
diff --git a/htdocs/core/tpl/originproductline.tpl.php b/htdocs/core/tpl/originproductline.tpl.php
index 1b996556253..bd87008d0f8 100644
--- a/htdocs/core/tpl/originproductline.tpl.php
+++ b/htdocs/core/tpl/originproductline.tpl.php
@@ -36,7 +36,7 @@ if (!empty($conf->multicurrency->enabled))
print ' '.$this->tpl['multicurrency_price'].' ';
print ''.$this->tpl['qty'].' ';
-if ($conf->global->PRODUCT_USE_UNITS)
+if (!empty($conf->global->PRODUCT_USE_UNITS))
print ''.$langs->trans($this->tpl['unit']).' ';
print ''.$this->tpl['remise_percent'].' ';
diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php
index 0771d970985..e8e39ec2adb 100644
--- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php
+++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php
@@ -1300,7 +1300,7 @@ class pdf_standard_myobject extends ModelePDFMyObject
),
'border-left' => true, // add left line separator
);
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$this->cols['unit']['status'] = true;
}
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 4e71bceb50e..6fdfb82e354 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -1151,7 +1151,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
}
// Units
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
print ' '.$langs->trans('DefaultUnitToShow').' ';
print '';
@@ -1610,7 +1610,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
}
}
// Units
- if ($conf->global->PRODUCT_USE_UNITS)
+ if (!empty($conf->global->PRODUCT_USE_UNITS))
{
print ' '.$langs->trans('DefaultUnitToShow').' ';
print '';
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index 1f5af12d3f2..d30c10408f1 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -519,7 +519,7 @@ if ($id > 0 || $ref)
print ' ';
}
// Units
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$unit = $object->getLabelOfUnit();
if ($unit !== '') {
print ' '.$langs->trans($unit);
@@ -537,7 +537,7 @@ if ($id > 0 || $ref)
print ' ';
// Units
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$unit = $object->getLabelOfUnit();
if ($unit !== '') {
print ' '.$langs->trans($unit);
@@ -1000,7 +1000,7 @@ END;
print ' ';
print $productfourn->fourn_qty;
// Units
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$unit = $object->getLabelOfUnit();
if ($unit !== '') {
print ' '.$langs->trans($unit);
diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php
index 378376ea799..af62344296b 100644
--- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php
+++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php
@@ -1213,7 +1213,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
),
'border-left' => true, // add left line separator
);
- if ($conf->global->PRODUCT_USE_UNITS) {
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
$this->cols['unit']['status'] = true;
}