[Fix] Negative qty issue in POS (#11070)
* [Fix] Negative qty issue in POS * Update point_of_sale.js
This commit is contained in:
parent
f23788bb7d
commit
607b5d4985
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user