Skip to content

Commit

Permalink
fix: Re-open allows SO's to be over credit limit
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Jul 1, 2024
1 parent 188f0e0 commit 5eed781
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions erpnext/selling/doctype/sales_order/sales_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ def check_modified_date(self):
def update_status(self, status):
self.check_modified_date()
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.notify_update()
clear_doctype_notifications(self)
Expand Down

0 comments on commit 5eed781

Please sign in to comment.