Update card.php
$type replaced by $fk_barcode_type in $tmpcode = $modBarCodeProduct->getNextValue($object, $type); in order to set it
This commit is contained in:
parent
bcff65c3d3
commit
50461931b0
@ -1052,7 +1052,7 @@ else
|
||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||
print '<td>'.$langs->trans("BarcodeValue").'</td><td>';
|
||||
$tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode;
|
||||
if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type);
|
||||
if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $fk_barcode_type);
|
||||
print '<input class="maxwidth100" type="text" name="barcode" value="'.dol_escape_htmltag($tmpcode).'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -1491,7 +1491,7 @@ else
|
||||
print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1);
|
||||
print '</td><td>'.$langs->trans("BarcodeValue").'</td><td>';
|
||||
$tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode;
|
||||
if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type);
|
||||
if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $fk_barcode_type);
|
||||
print '<input size="40" class="maxwidthonsmartphone" type="text" name="barcode" value="'.dol_escape_htmltag($tmpcode).'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -1805,13 +1805,16 @@ else
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
|
||||
$formbarcode = new FormBarCode($db);
|
||||
}
|
||||
$fk_barcode_type='';
|
||||
if ($action == 'editbarcodetype')
|
||||
{
|
||||
print $formbarcode->formBarcodeType($_SERVER['PHP_SELF'].'?id='.$object->id, $object->barcode_type, 'fk_barcode_type');
|
||||
$fk_barcode_type=$object->barcode_type;
|
||||
}
|
||||
else
|
||||
{
|
||||
$object->fetch_barcode();
|
||||
$fk_barcode_type = $object->barcode_type;
|
||||
print $object->barcode_type_label ? $object->barcode_type_label : ($object->barcode ? '<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>' : '');
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
@ -1827,7 +1830,7 @@ else
|
||||
if ($action == 'editbarcode')
|
||||
{
|
||||
$tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode;
|
||||
if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type);
|
||||
if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $fk_barcode_type);
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user