[Fix] Negative qty issue in POS (#11070)

* [Fix] Negative qty issue in POS

* Update point_of_sale.js
This commit is contained in:
rohitwaghchaure 2017-10-05 15:57:58 +05:30 committed by Nabin Hait
parent f23788bb7d
commit 607b5d4985

View File

@ -222,6 +222,11 @@ erpnext.pos.PointOfSale = class PointOfSale {
}
update_item_in_frm(item, field, value) {
if (field == 'qty' && value < 0) {
frappe.msgprint(__("Quantity must be positive"));
value = item.qty;
}
if (field) {
frappe.model.set_value(item.doctype, item.name, field, value);
}