Commit 16a0386b by Yvon

Revert "Revert "reception: fix bug putting a product to edition and validating without change""

This reverts commit 795674e4.
parent 0ff3cd09
Pipeline #2884 failed with stage
in 1 minute 5 seconds
...@@ -1349,7 +1349,8 @@ function editProductInfo (productToEdit, value = null, batch = false) { ...@@ -1349,7 +1349,8 @@ function editProductInfo (productToEdit, value = null, batch = false) {
firstUpdate = (index == -1); //first update firstUpdate = (index == -1); //first update
if (productToEdit.product_qty != newValue) { if (productToEdit.product_qty != newValue) {
if (firstUpdate) { // If no old_qty in productToEdit, product qty wasn't edited before
if (productToEdit.old_qty === undefined) {
productToEdit.old_qty = productToEdit.product_qty; productToEdit.old_qty = productToEdit.product_qty;
} else { } else {
//if it is not the first update AND newValue is equal to the validation qty then the product is valid (qty not changed) //if it is not the first update AND newValue is equal to the validation qty then the product is valid (qty not changed)
......
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