diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 093aac417d4..8d15d992ab6 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -88,7 +88,7 @@ class FormOther $stringaddbarcode = str_replace("tmphtml", $htmltoreplaceby, $stringaddbarcode); $out .= $stringaddbarcode.'
'; $out .= '
'; - $out .= ''; + $out .= ''; /*print '
'.$langs->trans("or").'
'; diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index 27feec29992..6af16bc884f 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -264,3 +264,5 @@ ProductBatchDoesNotExist=Le produit avec ce lot/série n'existe pas ProductBarcodeDoesNotExist=Le produit avec ce code-barres n'existe pas WarehouseId=ID entrepôt WarehouseRef=Réf entrepôt +ClearQtys=Reset quantities +ScanOrTypeOrCopyPasteYouBarCode=Scan your barcodes, type them or copy-paste them (use new line, tab or space or ',' or ';' as separator) \ No newline at end of file diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 9e99312ce69..72bf9ed92a4 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -567,37 +567,35 @@ if ($object->id > 0) { if ($object->status == Inventory::STATUS_VALIDATED) { print '
'; - if ($permissiontoadd) { - /* - if (!empty($conf->barcode->enabled)) { - print ''.$langs->trans("UpdateByScaningProductBarcode").''; - } - if (!empty($conf->productbatch->enabled)) { - print ''.$langs->trans('UpdateByScaningLot').''; - }*/ - if (!empty($conf->barcode->enabled) || !empty($conf->productbatch->enabled)) { - print ''.img_picto('', 'barcode', 'class="paddingrightonly"').$langs->trans("UpdateByScaning").''; - } - } else { - print ''.$langs->trans("Save").''."\n"; - } - if ($permissiontoadd && $conf->use_javascript_ajax) { - print ''.img_picto('', 'autofill', 'class="paddingrightonly"').$langs->trans('AutofillWithExpected').''; + if (!empty($conf->use_javascript_ajax)) { + if ($permissiontoadd) { + // Link to launch scan tool + if (!empty($conf->barcode->enabled) || !empty($conf->productbatch->enabled)) { + print ''.img_picto('', 'barcode', 'class="paddingrightonly"').$langs->trans("UpdateByScaning").''; + } - print ''; + // Link to autofill + print ''.img_picto('', 'autofill', 'class="paddingrightonly"').$langs->trans('AutofillWithExpected').''; + print ''; + + // Link to reset qty + print ''.img_picto('', 'eraser', 'class="paddingrightonly"').$langs->trans("ClearQtys").''; + } else { + print ''.$langs->trans("Save").''."\n"; + } } print '
'; print '
'; @@ -623,7 +621,7 @@ if ($object->id > 0) { var barcodemode = $("input[name=barcodemode]:checked").val(); var barcodeproductqty = $("input[name=barcodeproductqty]").val(); var textarea = $("textarea[name=barcodelist]").val(); - var textarray = textarea.split(/[\s,]+/); + var textarray = textarea.split(/[\s,;]+/); var tabproduct = []; errortab1 = []; errortab2 = []; @@ -813,7 +811,12 @@ if ($object->id > 0) { //Call method to undo changes in real qty print '