diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index eeb90929fc7e4f14a37a1b0c9b67497e8ee20e0e..e95a849dbee0b833d7ea0e58d5d254a3a898dc75 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -946,12 +946,11 @@ class calculate_taxes_and_totals: ) ) - if self.doc.docstatus.is_draft(): - if self.doc.get("write_off_outstanding_amount_automatically"): - self.doc.write_off_amount = 0 + if self.doc.get("write_off_outstanding_amount_automatically"): + self.doc.write_off_amount = 0 - self.calculate_outstanding_amount() - self.calculate_write_off_amount() + self.calculate_outstanding_amount() + self.calculate_write_off_amount() def is_internal_invoice(self): """