Commit 050e6fc3 by Damien Moulard

Field vide lors du scan d'un produit déjà scanné

parent 56d1bbd3
Pipeline #1717 passed with stage
in 1 minute 33 seconds
...@@ -91,6 +91,7 @@ function select_product_from_bc(barcode) { ...@@ -91,6 +91,7 @@ function select_product_from_bc(barcode) {
$.each(list_processed, function(i, e) { $.each(list_processed, function(i, e) {
if (e.product_id[0] == scannedProduct.data[barcodes['keys']['id']]) { if (e.product_id[0] == scannedProduct.data[barcodes['keys']['id']]) {
foundProduct.data = JSON.parse(JSON.stringify(e)); foundProduct.data = JSON.parse(JSON.stringify(e));
foundProduct.data.product_qty = null;
foundProduct.place = 'processed'; foundProduct.place = 'processed';
} }
}); });
...@@ -941,6 +942,7 @@ function editProductInfo (productToEdit, value = null, batch = false) { ...@@ -941,6 +942,7 @@ function editProductInfo (productToEdit, value = null, batch = false) {
// If 'value' parameter not set, get value from edition input // If 'value' parameter not set, get value from edition input
if (value == null) { if (value == null) {
newValue = parseFloat(document.getElementById('edition_input').value.replace(',', '.')); newValue = parseFloat(document.getElementById('edition_input').value.replace(',', '.'));
newValue = newValue.isFinite() ? newValue : 0;
} }
$.each(list_processed, function(i, e) { $.each(list_processed, function(i, e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment