fix: Sales and Purchase Invoice Status, Payment Reconciliation Credit/Debit Note (#19388)
This commit is contained in:
@@ -49,7 +49,8 @@ status_map = {
|
||||
["Submitted", "eval:self.docstatus==1"],
|
||||
["Paid", "eval:self.outstanding_amount==0 and self.docstatus==1"],
|
||||
["Return", "eval:self.is_return==1 and self.docstatus==1"],
|
||||
["Debit Note Issued", "eval:self.outstanding_amount < 0 and self.docstatus==1"],
|
||||
["Debit Note Issued",
|
||||
"eval:self.outstanding_amount <= 0 and self.docstatus==1 and self.is_return==0 and get_value('Purchase Invoice', {'is_return': 1, 'return_against': self.name, 'docstatus': 1})"],
|
||||
["Unpaid", "eval:self.outstanding_amount > 0 and getdate(self.due_date) >= getdate(nowdate()) and self.docstatus==1"],
|
||||
["Overdue", "eval:self.outstanding_amount > 0 and getdate(self.due_date) < getdate(nowdate()) and self.docstatus==1"],
|
||||
["Cancelled", "eval:self.docstatus==2"],
|
||||
@@ -118,7 +119,6 @@ class StatusUpdater(Document):
|
||||
|
||||
if self.doctype in status_map:
|
||||
_status = self.status
|
||||
|
||||
if status and update:
|
||||
self.db_set("status", status)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user