Revert "[Fix] Payment terms validation issue" (#12098)

* Revert "test fixed (#12094)"

This reverts commit dd700a550f.

* Revert "[fix] Column Heading in received item to be billed report (#12083)"

This reverts commit 7c57b6ecd8.

* Revert "[fix] Mobile no search issue in the pos (#12090)"

This reverts commit b725affe0c.

* Revert "[Fix] Payment terms validation issue (#12092)"

This reverts commit 9b8e1cb10e.
This commit is contained in:
Nabin Hait 2017-12-19 11:31:34 +05:30 committed by GitHub
parent dd700a550f
commit f592f2c9a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -692,11 +692,9 @@ class AccountsController(TransactionBase):
if self.get("payment_schedule"):
total = 0
for d in self.get("payment_schedule"):
total += flt(d.payment_amount, d.precision("payment_amount"))
grand_total = flt(self.get("rounded_total"), self.precision("rounded_total")) \
or flt(self.grand_total, self.precision("grand_total"))
total += flt(d.payment_amount)
grand_total = self.get("rounded_total") or self.grand_total
if total != grand_total:
frappe.throw(_("Total Payment Amount in Payment Schedule must be equal to Grand / Rounded Total"))