From 19bb01c973d26d42a96c293c77331924c794e834 Mon Sep 17 00:00:00 2001 From: Subin Tom <36098155+nemesis189@users.noreply.github.com> Date: Tue, 4 Jan 2022 19:14:40 +0530 Subject: [PATCH] fix: POS items added to cart despite low qty (#29126) --- erpnext/selling/page/point_of_sale/pos_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index e61a634aae..ce74f6d0a5 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -643,7 +643,7 @@ erpnext.PointOfSale.Controller = class { message: __('Item Code: {0} is not available under warehouse {1}.', [bold_item_code, bold_warehouse]) }) } else if (available_qty < qty_needed) { - frappe.show_alert({ + frappe.throw({ message: __('Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2}.', [bold_item_code, bold_warehouse, bold_available_qty]), indicator: 'orange' });