Payment schedule total amount validation considering write off amount
This commit is contained in:
parent
a5cc84f8af
commit
e591c85f7c
@ -695,6 +695,8 @@ class AccountsController(TransactionBase):
|
||||
total = flt(total, self.precision("grand_total"))
|
||||
|
||||
grand_total = flt(self.get("rounded_total") or self.grand_total, self.precision('grand_total'))
|
||||
if self.doctype in ("Sales Invoice", "Purchase Invoice"):
|
||||
grand_total = grand_total - flt(self.write_off_amount)
|
||||
if total != grand_total:
|
||||
frappe.throw(_("Total Payment Amount in Payment Schedule must be equal to Grand / Rounded Total"))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user