';
$out .= ' ';
+ $out .= '';
$out .= '';
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index f175cb083ff..015a33b202f 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -259,11 +259,13 @@ ShowAllBatchByDefault=By default, show batch details on product "stock" tab
CollapseBatchDetailHelp=You can set batch detail default display in stocks module configuration
ErrorWrongBarcodemode=Unknown Barcode mode
ProductDoesNotExist=Product does not exist
-ErrorSameBatchNumber=Same batch number found in inventory list
+ErrorSameBatchNumber=Several record for the batch number were found in the inventory sheet. No way to know which one to increase.
ProductBatchDoesNotExist=Product with batch/serial does not exist
ProductBarcodeDoesNotExist=Product with barcode does not exist
WarehouseId=Warehouse ID
WarehouseRef=Warehouse Ref
SaveQtyFirst=Save the real inventoried quantities first, before asking creation of the stock movement.
InventoryStartedShort=Started
-ErrorOnElementsInventory=Scan was aborted due to following barcode or batch number on error
\ No newline at end of file
+ErrorOnElementsInventory=Operation canceled for the following reason:
+ErrorCantFindCodeInInventory=Can't find the following code in inventory
+QtyWasAddedToTheScannedBarcode=Success !! The quantity was added to all the requested barcode. You can close the Scanner tool.
\ No newline at end of file
diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php
index c467b4367df..658a521fcc1 100644
--- a/htdocs/product/inventory/inventory.php
+++ b/htdocs/product/inventory/inventory.php
@@ -343,10 +343,15 @@ if (empty($reshook)) {
$result = $tmp->create($user);
if ($result < 0) {
if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
- setEventMessages($langs->trans("DuplicateRecord"), null, 'errors');
+ $langs->load("errors");
+ setEventMessages($langs->trans("ErrorRecordAlreadyExists"), null, 'errors');
} else {
dol_print_error($db, $tmp->error, $tmp->errors);
}
+ } else {
+ // Clear var
+ $_POST['batch'] = '';
+ $_POST['qtytoadd'] = '';
}
}
}
@@ -606,18 +611,28 @@ if ($object->id > 0) {
print '