revert: use + flt(value) instead of direct increment

(cherry picked from commit 112b4c705b)
This commit is contained in:
Abdeali Chharchhoda
2024-11-25 16:17:03 +05:30
committed by Mergify
parent 49dad1a456
commit b65e16a91b

View File

@@ -556,9 +556,7 @@ erpnext.PointOfSale.Controller = class {
const item_row_exists = !$.isEmptyObject(item_row);
const from_selector = field === "qty" && value === "+1";
if (from_selector) {
value = flt(item_row.qty) + 1; // increase qty by 1 UOM
}
if (from_selector) value = flt(item_row.qty) + flt(value);
if (item_row_exists) {
if (field === "qty") value = flt(value);