fix: invalid conditional statement

This commit is contained in:
Saqib Ansari 2020-05-13 22:02:56 +05:30
parent 2b8f307ffe
commit 13096cdbfe

View File

@ -1037,7 +1037,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"