diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php
index d9737fa0a94..da301f7e4f6 100644
--- a/htdocs/fourn/class/fournisseur.product.class.php
+++ b/htdocs/fourn/class/fournisseur.product.class.php
@@ -569,7 +569,7 @@ class ProductFournisseur extends Product
$this->fourn_multicurrency_tx = $obj->multicurrency_tx;
$this->fourn_multicurrency_id = $obj->fk_multicurrency;
$this->fourn_multicurrency_code = $obj->multicurrency_code;
- if ($conf->barcode->enabled) {
+ if (!empty($conf->barcode->enabled)) {
$this->fourn_barcode = $obj->barcode; // deprecated
$this->fourn_fk_barcode_type = $obj->fk_barcode_type; // deprecated
$this->supplier_barcode = $obj->barcode;
@@ -686,7 +686,7 @@ class ProductFournisseur extends Product
if ($prodfourn->packaging < $prodfourn->fourn_qty) $prodfourn->packaging = $prodfourn->fourn_qty;
}
- if ($conf->barcode->enabled) {
+ if (!empty($conf->barcode->enabled)) {
$prodfourn->supplier_barcode = $record["barcode"];
$prodfourn->supplier_fk_barcode_type = $record["fk_barcode_type"];
}
diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php
index 875f55b6fe4..d5c9ec4966b 100644
--- a/htdocs/product/inventory/inventory.php
+++ b/htdocs/product/inventory/inventory.php
@@ -342,13 +342,13 @@ if ($object->id > 0)
if ($permissiontoadd)
{
/*
- if ($conf->barcode->enabled) {
+ if (!empty($conf->barcode->enabled)) {
print ''.$langs->trans("UpdateByScaningProductBarcode").'';
}
- if ($conf->productbatch->enabled) {
+ if (!empty($conf->productbatch->enabled)) {
print ''.$langs->trans('UpdateByScaningLot').'';
}*/
- if ($conf->barcode->enabled || $conf->productbatch->enabled) {
+ if (!empty($conf->barcode->enabled) || !empty($conf->productbatch->enabled)) {
print 'id.'&action=updatebyscaning" class="butAction">'.$langs->trans("UpdateByScaning").'';
}
} else {