List supplier barcode

This commit is contained in:
Francis Appels 2020-11-20 17:16:49 +01:00
parent 6976471988
commit 064b5acff5
2 changed files with 7 additions and 7 deletions

View File

@ -674,8 +674,8 @@ class ProductFournisseur extends Product
}
if ($conf->barcode->enabled) {
$prodfourn->barcode = $record["barcode"];
$prodfourn->fk_barcode_type = $record["fk_barcode_type"];
$prodfourn->supplier_barcode = $record["barcode"];
$prodfourn->supplier_fk_barcode_type = $record["fk_barcode_type"];
}
if (!empty($conf->dynamicprices->enabled) && !empty($prodfourn->fk_supplier_price_expression)) {

View File

@ -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->fourn_barcode : '').'"></td>';
print '<td><input class="flat" name="barcode" value="'.($rowid ? $object->supplier_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->fourn_fk_barcode_type : $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE), 'fk_barcode_type', 1);
print $formbarcode->selectBarcodeType(($rowid ? $object->supplier_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->barcode;
print $productfourn->supplier_barcode;
print '</td>';
}
// Barcode type
if (!empty($arrayfields['pfp.fk_barcode_type']['checked'])) {
print '<td class="center">';
$productfourn->barcode_type = !empty($productfourn->fk_barcode_type) ? $productfourn->fk_barcode_type : 0;
$productfourn->barcode_type = !empty($productfourn->supplier_fk_barcode_type) ? $productfourn->supplier_fk_barcode_type : 0;
$productfourn->fetch_barcode();
print $productfourn->barcode_type_label ? $productfourn->barcode_type_label : ($productfourn->barcode ? '<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>' : '');
print $productfourn->barcode_type_label ? $productfourn->barcode_type_label : ($productfourn->supplier_barcode ? '<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>' : '');
print '</td>';
}