Commit 2e14ec78 by Alexis Aoun

fix: met une valeur vide lors du scan d'un produit deja processed

parent e29b2ce7
......@@ -86,9 +86,10 @@ function select_product_from_bc(barcode) {
if (found.data == null) {
$.each(list_processed, function(i, e) {
if (e.product_id[0] == p.data[barcodes['keys']['id']]) {
found.data = JSON.parse(JSON.stringify(e));
found.place = 'processed';
if (e.product_id[0] == scannedProduct.data[barcodes['keys']['id']]) {
foundProduct.data = JSON.parse(JSON.stringify(e));
foundProduct.data.product_qty = null;
foundProduct.place = 'processed';
}
});
}
......@@ -864,6 +865,8 @@ function editProductInfo (productToEdit, value = null, batch = false) {
// If 'value' parameter not set, get value from edition input
if (value == null) {
newValue = parseFloat(document.getElementById('edition_input').value.replace(',', '.'));
if (!newValue.isFinite())
newValue = 0;
}
$.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