fix: System was allowing to save payment schedule amount less than grand total (#45322)

* fix: System was allowing to save payment schedule amount less than grand_total

* style: After run pre-commit
This commit is contained in:
Diógenes Souza
2025-01-22 09:22:26 -03:00
committed by GitHub
parent 05579959f2
commit b26f0b6633

View File

@@ -2435,10 +2435,15 @@ class AccountsController(TransactionBase):
) )
if ( if (
flt(total, self.precision("grand_total")) - flt(grand_total, self.precision("grand_total")) abs(
flt(total, self.precision("grand_total"))
- flt(grand_total, self.precision("grand_total"))
)
> 0.1 > 0.1
or flt(base_total, self.precision("base_grand_total")) or abs(
- flt(base_grand_total, self.precision("base_grand_total")) flt(base_total, self.precision("base_grand_total"))
- flt(base_grand_total, self.precision("base_grand_total"))
)
> 0.1 > 0.1
): ):
frappe.throw( frappe.throw(