Payment Entry: Test cases and default remarks

This commit is contained in:
Nabin Hait
2016-06-30 12:37:53 +05:30
parent 13093b4b68
commit 9db1b223da
5 changed files with 186 additions and 41 deletions

View File

@@ -462,7 +462,7 @@ class AccountsController(TransactionBase):
formatted_order_total = fmt_money(order_total, precision=self.precision("base_grand_total"),
currency=advance.account_currency)
if self.currency == self.company_currency:
if self.currency == self.company_currency and advance_paid > order_total:
frappe.throw(_("Total advance ({0}) against Order {1} cannot be greater than the Grand Total ({2})")
.format(formatted_advance_paid, self.name, formatted_order_total))