From 607b5d4985d3129c90c26d5932f51c6e5db14097 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 5 Oct 2017 15:57:58 +0530 Subject: [PATCH] [Fix] Negative qty issue in POS (#11070) * [Fix] Negative qty issue in POS * Update point_of_sale.js --- erpnext/selling/page/point_of_sale/point_of_sale.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index 726e80f28df..6601b9f47c7 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -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); }