mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 16:45:02 +00:00
Merge pull request #21005 from rohitwaghchaure/qty_must_be_positive_for_stock_entry_develop
fix: stock entry qty must be positive
This commit is contained in:
@@ -177,6 +177,10 @@ class StockEntry(StockController):
|
||||
stock_items = self.get_stock_items()
|
||||
serialized_items = self.get_serialized_items()
|
||||
for item in self.get("items"):
|
||||
if item.qty and item.qty < 0:
|
||||
frappe.throw(_("Row {0}: The item {1}, quantity must be positive number")
|
||||
.format(item.idx, frappe.bold(item.item_code)))
|
||||
|
||||
if item.item_code not in stock_items:
|
||||
frappe.throw(_("{0} is not a stock Item").format(item.item_code))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user