From b2ac773ccaed48debc724beadb40843e7e471461 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 24 Mar 2022 13:35:32 +0530 Subject: [PATCH] fix: Ignore for Purchase Invoices (cherry picked from commit d3fd2fd2c535733939ed69439301033052f45712) --- erpnext/controllers/taxes_and_totals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 884deb302c..22aa6677b6 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -678,7 +678,7 @@ class calculate_taxes_and_totals(object): self.doc.precision("base_change_amount")) def calculate_write_off_amount(self): - if self.doc.write_off_outstanding_amount_automatically: + if self.doc.get('write_off_outstanding_amount_automatically'): self.doc.write_off_amount = flt(self.doc.outstanding_amount, self.doc.precision("write_off_amount")) self.doc.base_write_off_amount = flt(self.doc.write_off_amount * self.doc.conversion_rate, self.doc.precision("base_write_off_amount"))