fix: POS items added to cart despite low qty (#29126)

This commit is contained in:
Subin Tom
2022-01-04 19:14:40 +05:30
committed by GitHub
parent f4db474be0
commit 19bb01c973

View File

@@ -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'
});