From 663d52fef120d66e62e8da9e3cf2cbb85a462c5c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Dec 2020 12:31:53 +0100 Subject: [PATCH] Fix warning --- htdocs/fourn/class/fournisseur.product.class.php | 4 ++-- htdocs/product/inventory/inventory.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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 ''.$langs->trans("UpdateByScaning").''; } } else {