Skip to content

Commit

Permalink
revert: use + flt(value) instead of direct increment
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdeali099 committed Nov 25, 2024
1 parent e37a039 commit 112b4c7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions erpnext/selling/page/point_of_sale/pos_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 112b4c7

Please sign in to comment.