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) : ' ';