From c99853c8d4fbf9822f547d11410a368e6a285616 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 14 May 2013 13:35:09 +0530 Subject: [PATCH] [buying] [calculation] fix in calculate outstanding amount --- controllers/buying_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/buying_controller.py b/controllers/buying_controller.py index 30c3dbbefa..209bc60b1b 100644 --- a/controllers/buying_controller.py +++ b/controllers/buying_controller.py @@ -274,7 +274,7 @@ class BuyingController(StockController): self.doc.rounded_total_import = round(self.doc.grand_total_import) def calculate_outstanding_amount(self): - if self.doc.doctype == "Purchase Invoice" and self.doc.docstatus == 0: + if self.doc.doctype == "Purchase Invoice" and self.doc.docstatus < 2: self.doc.total_advance = flt(self.doc.total_advance, self.precision("total_advance")) self.doc.total_amount_to_pay = flt(self.doc.grand_total - flt(self.doc.write_off_amount,