feat(sales order on hold): check status of sales order to validate entry
This commit is contained in:
parent
8f0660ab31
commit
e17b7095bf
@ -257,11 +257,11 @@ class SellingController(StockController):
|
||||
so_warehouse = so_item and so_item[0]["warehouse"] or ""
|
||||
return so_qty, so_warehouse
|
||||
|
||||
def check_close_sales_order(self, ref_fieldname):
|
||||
def check_sales_order_on_hold_or_close(self, ref_fieldname):
|
||||
for d in self.get("items"):
|
||||
if d.get(ref_fieldname):
|
||||
status = frappe.db.get_value("Sales Order", d.get(ref_fieldname), "status")
|
||||
if status == "Closed":
|
||||
if status == "Closed" or status == "On Hold":
|
||||
frappe.throw(_("Sales Order {0} is {1}").format(d.get(ref_fieldname), status))
|
||||
|
||||
def update_reserved_qty(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user