From 0d136d68068b1f2b4028c895ad50c73b07634aff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 9 Apr 2021 12:08:56 +0200 Subject: [PATCH] Enhance barcode scanner tool --- htdocs/langs/en_US/productbatch.lang | 3 +- htdocs/product/inventory/inventory.php | 40 ++++++++++++-------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang index 26dc9650308..879368e624b 100644 --- a/htdocs/langs/en_US/productbatch.lang +++ b/htdocs/langs/en_US/productbatch.lang @@ -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 BatchLotNumberingModules=Options for automatic generation of batch products managed by lots BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers -ManageLotMask=Custom mask \ No newline at end of file +QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned +ManageLotMask=Custom mask diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 8d3378fb779..8efc5b75bb6 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -265,22 +265,9 @@ if (empty($reshook)) { $form = new Form($db); $formproduct = new FormProduct($db); -llxHeader('', $langs->trans('Inventory'), ''); +$help_url = ''; -// Example : Adding jquery code -print ''; +llxHeader('', $langs->trans('Inventory'), $help_url); // Part to show record @@ -335,7 +322,7 @@ if ($object->id > 0) { // Object card // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; /* @@ -472,26 +459,37 @@ if ($object->id > 0) { } + // Popup for mass barcode scanning if ($action == 'updatebyscaning') { + print '
'; + print ''."\n"; print '
'; print '
Barcode scanner tool...

'; - print 'Scan a product barcode
'; - print '     Qty
'; + print ' Autodetect if we scan a product barcode or a lot/serial barcode
'; + print ' Scan a product barcode
'; + print ' Scan a product lot or serial number
'; - print '
'.$langs->trans("or").'
'; + print $langs->trans("QtyToAddAfterBarcodeScan").'
'; + print ''; + + /*print '
'.$langs->trans("or").'
'; print '
'; - print 'Scan a product lot or serial number
'; print '     Qty
'; - + */ print '
'; + print '
'; + print '
'; + print ''.$langs->trans("FeatureNotYetAvailable").''; // TODO Add javascript so each scan will add qty into the inventory page + an ajax save. + print '
'; print '
'; + print '
'; }