fix: invalid conditional statement

This commit is contained in:
Saqib Ansari
2020-05-13 22:02:56 +05:30
parent b47f5830f4
commit 12739ec464

View File

@@ -997,7 +997,7 @@ class PurchaseInvoice(BuyingController):
if self.docstatus == 2:
status = "Cancelled"
elif self.docstatus == 1:
elif outstanding_amount > 0 and due_date < nowdate:
if outstanding_amount > 0 and due_date < nowdate:
self.status = "Overdue"
elif outstanding_amount > 0 and due_date >= nowdate:
self.status = "Unpaid"