mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
use barcode iso supplier_barcode
This commit is contained in:
parent
9936d8c559
commit
57705e225b
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -725,7 +725,7 @@ END;
|
|||
// Option to define a transport cost on supplier price
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans('BarcodeValue').'</td>';
|
||||
print '<td><input class="flat" name="barcode" value="'.($rowid ? $object->supplier_barcode : '').'"></td>';
|
||||
print '<td><input class="flat" name="barcode" value="'.($rowid ? $object->barcode : '').'"></td>';
|
||||
print '</tr>';
|
||||
$formbarcode = new FormBarCode($db);
|
||||
|
||||
|
|
@ -733,7 +733,7 @@ END;
|
|||
print '<tr>';
|
||||
print '<td>'.$langs->trans('BarcodeType').'</td>';
|
||||
print '<td>';
|
||||
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 '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
|
@ -1071,16 +1071,16 @@ END;
|
|||
// Barcode
|
||||
if (!empty($arrayfields['pfp.barcode']['checked'])) {
|
||||
print '<td align="right">';
|
||||
print $productfourn->supplier_barcode;
|
||||
print $productfourn->barcode;
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Barcode type
|
||||
if (!empty($arrayfields['pfp.fk_barcode_type']['checked'])) {
|
||||
print '<td class="center">';
|
||||
$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 ? '<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>' : '');
|
||||
print $productfourn->barcode_type_label ? $productfourn->barcode_type_label : ($productfourn->barcode ? '<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>' : '');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user