diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 991e3cb37cc..5f00ed6877b 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -63,7 +63,7 @@ class FormOther * @param string $jstoexecuteonadd Name of javascript function to call * @return string HTML component */ - public function getHTMLScannerForm($jstoexecuteonadd = 'barcodscannerjs') + public function getHTMLScannerForm($jstoexecuteonadd = 'barcodescannerjs') { global $langs; @@ -73,9 +73,9 @@ class FormOther $out .= '
'; $out .= '
Barcode scanner tool...

'; - $out .= ' Autodetect if we scan a product barcode or a lot/serial barcode
'; - $out .= ' Scan a product barcode
'; - $out .= ' Scan a product lot or serial number
'; + $out .= ' Autodetect if we scan a product barcode or a lot/serial barcode
'; + $out .= ' Scan a product barcode
'; + $out .= ' Scan a product lot or serial number
'; $out .= $langs->trans("QtyToAddAfterBarcodeScan").'
'; $out .= ''; @@ -88,13 +88,16 @@ class FormOther */ $out .= '
'; $out .= '
'; - $out .= ''; + $out .= ''; $out .= ''; $out .= '
'; - $out .= ''.$langs->trans("FeatureNotYetAvailable").''; - - // TODO Add call of javascript $jstoexecuteonadd so each scan will add qty into the inventory page + an ajax save. + $out .= ''; $out .= '
'; $out .= '
'; diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index efa5257498c..4396139f1f9 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -255,4 +255,9 @@ MakeMovementsAndClose=Generate movements and close AutofillWithExpected=Fill real quantity with expected quantity ShowAllBatchByDefault=By default, show batch details on product "stock" tab CollapseBatchDetailHelp=You can set batch detail default display in stocks module configuration -FieldCannotBeNegative=Field "%s" cannot be negative \ No newline at end of file +FieldCannotBeNegative=Field "%s" cannot be negative +ErrorWrongBarcodemode=Unknown Barcode mode +ProductDoesNotExist=Product does not exist +ErrorSameBatchNumber=Same batch number found in inventory list +ProductBatchDoesNotExist=Product with batch/serial does not exist +ProductBarcodeDoesNotExist=Product with barcode does not exist diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 85cd0932f46..01968855836 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -449,7 +449,7 @@ if ($object->id > 0) { print dol_get_fiche_end(); - print '
'; + print ''; print ''; print ''; print ''; @@ -537,11 +537,116 @@ if ($object->id > 0) { // Popup for mass barcode scanning if ($action == 'updatebyscaning') { + if ($permissiontoadd) { + print ''; + } include DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $formother = new FormOther($db); print $formother->getHTMLScannerForm(); } + //Call method to undo changes in real qty + print ''; print '
'; //print '
'; @@ -639,15 +744,15 @@ if ($object->id > 0) { } print ''; - print ''; + print ''; print $warehouse_static->getNomUrl(1); print ''; - print ''; + print ''; print $product_static->getNomUrl(1); print ''; if ($conf->productbatch->enabled) { - print ''; + print ''; print $obj->batch; print ''; } @@ -665,8 +770,11 @@ if ($object->id > 0) { print ''; print ''; print ''; + print '  '; print ''.img_delete().''; print ''; + $qty_tmp = price2num(GETPOST("id_".$obj->rowid."_input_tmp", 'MS')) >= 0 ? GETPOST("id_".$obj->rowid."_input_tmp") : $qty_view; + print ''; } else { print $obj->qty_view; $totalfound += $obj->qty_view; @@ -685,7 +793,7 @@ if ($object->id > 0) { print '
'; if ($object->status == $object::STATUS_VALIDATED) { - print '
'; + print '
'; } print '
';