mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-19 23:12:13 +00:00
fix: Re-open allows SO's to be over credit limit
(cherry picked from commit 5eed781263)
This commit is contained in:
@@ -496,6 +496,10 @@ class SalesOrder(SellingController):
|
|||||||
def update_status(self, status):
|
def update_status(self, status):
|
||||||
self.check_modified_date()
|
self.check_modified_date()
|
||||||
self.set_status(update=True, status=status)
|
self.set_status(update=True, status=status)
|
||||||
|
# Upon Sales Order Re-open, check for credit limit.
|
||||||
|
# Limit should be checked after the 'Hold/Closed' status is reset.
|
||||||
|
if status == "Draft" and self.docstatus == 1:
|
||||||
|
self.check_credit_limit()
|
||||||
self.update_reserved_qty()
|
self.update_reserved_qty()
|
||||||
self.notify_update()
|
self.notify_update()
|
||||||
clear_doctype_notifications(self)
|
clear_doctype_notifications(self)
|
||||||
|
|||||||
Reference in New Issue
Block a user