Enhance barcode scanner tool
This commit is contained in:
parent
fe4552c3fa
commit
0d136d6806
@ -28,4 +28,5 @@ SerialNumberAlreadyInUse=Serial number %s is already used for product %s
|
|||||||
TooManyQtyForSerialNumber=You can only have one product %s for serial number %s
|
TooManyQtyForSerialNumber=You can only have one product %s for serial number %s
|
||||||
BatchLotNumberingModules=Options for automatic generation of batch products managed by lots
|
BatchLotNumberingModules=Options for automatic generation of batch products managed by lots
|
||||||
BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers
|
BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers
|
||||||
ManageLotMask=Custom mask
|
QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned
|
||||||
|
ManageLotMask=Custom mask
|
||||||
|
|||||||
@ -265,22 +265,9 @@ if (empty($reshook)) {
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formproduct = new FormProduct($db);
|
$formproduct = new FormProduct($db);
|
||||||
|
|
||||||
llxHeader('', $langs->trans('Inventory'), '');
|
$help_url = '';
|
||||||
|
|
||||||
// Example : Adding jquery code
|
llxHeader('', $langs->trans('Inventory'), $help_url);
|
||||||
print '<script type="text/javascript" language="javascript">
|
|
||||||
jQuery(document).ready(function() {
|
|
||||||
function init_myfunc()
|
|
||||||
{
|
|
||||||
jQuery("#myid").removeAttr(\'disabled\');
|
|
||||||
jQuery("#myid").attr(\'disabled\',\'disabled\');
|
|
||||||
}
|
|
||||||
init_myfunc();
|
|
||||||
jQuery("#mybutton").click(function() {
|
|
||||||
init_myfunc();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>';
|
|
||||||
|
|
||||||
|
|
||||||
// Part to show record
|
// Part to show record
|
||||||
@ -335,7 +322,7 @@ if ($object->id > 0) {
|
|||||||
|
|
||||||
// Object card
|
// Object card
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/inventory/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/product/inventory/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$morehtmlref = '<div class="refidno">';
|
$morehtmlref = '<div class="refidno">';
|
||||||
/*
|
/*
|
||||||
@ -472,26 +459,37 @@ if ($object->id > 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Popup for mass barcode scanning
|
||||||
if ($action == 'updatebyscaning') {
|
if ($action == 'updatebyscaning') {
|
||||||
|
print '<form name="barcodescanner" method="POST">';
|
||||||
|
print '<!-- Popup for mass barcode scanning -->'."\n";
|
||||||
print '<div class="div-for-modal-topright" style="padding: 15px">';
|
print '<div class="div-for-modal-topright" style="padding: 15px">';
|
||||||
print '<center><strong>Barcode scanner tool...</strong></center><br>';
|
print '<center><strong>Barcode scanner tool...</strong></center><br>';
|
||||||
|
|
||||||
print 'Scan a product barcode<br>';
|
print '<input type="checkbox" name="barcodeforautodetect" checked="checked"> Autodetect if we scan a product barcode or a lot/serial barcode<br>';
|
||||||
print '<input type="text" name="barcodeproduct" class="width200" autofocus> Qty <input type="text" name="barcodeproductqty" class="width50 right" value="1"><br>';
|
print '<input type="checkbox" name="barcodeforproduct"> Scan a product barcode<br>';
|
||||||
|
print '<input type="checkbox" name="barcodeforlotserial"> Scan a product lot or serial number<br>';
|
||||||
|
|
||||||
print '<br>'.$langs->trans("or").'<br>';
|
print $langs->trans("QtyToAddAfterBarcodeScan").' <input type="text" name="barcodeproductqty" class="width50 right" value="1"><br>';
|
||||||
|
print '<textarea type="text" name="barcodelist" class="centpercent" autofocus rows="'.ROWS_3.'"></textarea>';
|
||||||
|
|
||||||
|
/*print '<br>'.$langs->trans("or").'<br>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print 'Scan a product lot or serial number<br>';
|
|
||||||
print '<input type="text" name="barcodelotserial" class="width200"> Qty <input type="text" name="barcodelotserialqty" class="width50 right" value="1"><br>';
|
print '<input type="text" name="barcodelotserial" class="width200"> Qty <input type="text" name="barcodelotserialqty" class="width50 right" value="1"><br>';
|
||||||
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
print '<center>';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Add").'"><br>';
|
||||||
|
|
||||||
print '<span class="opacitymedium">'.$langs->trans("FeatureNotYetAvailable").'</span>';
|
print '<span class="opacitymedium">'.$langs->trans("FeatureNotYetAvailable").'</span>';
|
||||||
|
|
||||||
// TODO Add javascript so each scan will add qty into the inventory page + an ajax save.
|
// TODO Add javascript so each scan will add qty into the inventory page + an ajax save.
|
||||||
|
|
||||||
|
print '</center>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user