diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 4f88e38e947..15a99a3f538 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -105,14 +105,9 @@ class ProductFournisseur extends Product public $fourn_multicurrency_unitprice; /** - * @var string $supplier_barcode - Supplier barcode + * @var string $fk_barcode_type - Supplier barcode type */ - public $supplier_barcode; - - /** - * @var string $supplier_fk_barcode_type - Supplier barcode type - */ - public $supplier_fk_barcode_type; + public $fk_barcode_type; /** * Constructor @@ -547,8 +542,8 @@ class ProductFournisseur extends Product $this->fourn_multicurrency_id = $obj->fk_multicurrency; $this->fourn_multicurrency_code = $obj->multicurrency_code; if ($conf->barcode->enabled) { - $this->supplier_barcode = $obj->barcode; - $this->supplier_fk_barcode_type = $obj->fk_barcode_type; + $this->barcode = $obj->barcode; + $this->fk_barcode_type = $obj->fk_barcode_type; } if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { @@ -661,8 +656,8 @@ class ProductFournisseur extends Product } if ($conf->barcode->enabled) { - $prodfourn->supplier_barcode = $record["barcode"]; - $prodfourn->supplier_fk_barcode_type = $record["fk_barcode_type"]; + $prodfourn->barcode = $record["barcode"]; + $prodfourn->fk_barcode_type = $record["fk_barcode_type"]; } if (!empty($conf->dynamicprices->enabled) && !empty($prodfourn->fk_supplier_price_expression)) { diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index f3ac7afbd58..3771c0e7a07 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -725,7 +725,7 @@ END; // Option to define a transport cost on supplier price print ''; print ''.$langs->trans('BarcodeValue').''; - print ''; + print ''; print ''; $formbarcode = new FormBarCode($db); @@ -733,7 +733,7 @@ END; print ''; print ''.$langs->trans('BarcodeType').''; print ''; - print $formbarcode->selectBarcodeType(($rowid ? $object->supplier_fk_barcode_type : $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE), 'fk_barcode_type', 1); + print $formbarcode->selectBarcodeType(($rowid ? $object->fk_barcode_type : $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE), 'fk_barcode_type', 1); print ''; print ''; } @@ -1071,16 +1071,16 @@ END; // Barcode if (!empty($arrayfields['pfp.barcode']['checked'])) { print ''; - print $productfourn->supplier_barcode; + print $productfourn->barcode; print ''; } // Barcode type if (!empty($arrayfields['pfp.fk_barcode_type']['checked'])) { print ''; - $productfourn->barcode_type = !empty($productfourn->supplier_fk_barcode_type) ? $productfourn->supplier_fk_barcode_type : 0; + $productfourn->barcode_type = !empty($productfourn->fk_barcode_type) ? $productfourn->fk_barcode_type : 0; $productfourn->fetch_barcode(); - print $productfourn->barcode_type_label ? $productfourn->barcode_type_label : ($productfourn->supplier_barcode ? '
'.$langs->trans("SetDefaultBarcodeType").'
' : ''); + print $productfourn->barcode_type_label ? $productfourn->barcode_type_label : ($productfourn->barcode ? '
'.$langs->trans("SetDefaultBarcodeType").'
' : ''); print ''; }