fix: re-calculate outstanding / write-off amount during submission

(cherry picked from commit 09c9ac1b66)
This commit is contained in:
Sagar Vora
2025-12-11 22:37:59 +05:30
committed by Mergify
parent 0e7efd75cd
commit 5bfdc010f3

View File

@@ -853,12 +853,11 @@ class calculate_taxes_and_totals:
) )
) )
if self.doc.docstatus.is_draft(): if self.doc.get("write_off_outstanding_amount_automatically"):
if self.doc.get("write_off_outstanding_amount_automatically"): self.doc.write_off_amount = 0
self.doc.write_off_amount = 0
self.calculate_outstanding_amount() self.calculate_outstanding_amount()
self.calculate_write_off_amount() self.calculate_write_off_amount()
def is_internal_invoice(self): def is_internal_invoice(self):
""" """