Skip to content

Commit

Permalink
fix: cast value to Number type
Browse files Browse the repository at this point in the history
  • Loading branch information
dj12djdjs committed May 5, 2022
1 parent 47b4251 commit 0a77c28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/public/js/utils/barcode_scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ erpnext.utils.BarcodeScanner = class BarcodeScanner {
return new Promise(resolve => {
const increment = (value = 1) => {
const item_data = {item_code: item_code};
item_data[this.qty_field] = (row[this.qty_field] || 0) + value;
item_data[this.qty_field] = Number((row[this.qty_field] || 0)) + Number(value);
frappe.model.set_value(row.doctype, row.name, item_data);
};

Expand Down

0 comments on commit 0a77c28

Please sign in to comment.