mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 11:09:17 +00:00
Validate total advance against grand total considering write off amount
This commit is contained in:
@@ -404,7 +404,7 @@ class calculate_taxes_and_totals(object):
|
|||||||
self.doc.total_advance = flt(total_allocated_amount, self.doc.precision("total_advance"))
|
self.doc.total_advance = flt(total_allocated_amount, self.doc.precision("total_advance"))
|
||||||
|
|
||||||
if self.doc.party_account_currency == self.doc.currency:
|
if self.doc.party_account_currency == self.doc.currency:
|
||||||
invoice_total = flt(self.doc.grand_total - self.write_off_amount,
|
invoice_total = flt(self.doc.grand_total - self.doc.write_off_amount,
|
||||||
self.doc.precision("grand_total"))
|
self.doc.precision("grand_total"))
|
||||||
else:
|
else:
|
||||||
base_write_off_amount = flt(self.doc.write_off_amount * self.doc.conversion_rate,
|
base_write_off_amount = flt(self.doc.write_off_amount * self.doc.conversion_rate,
|
||||||
|
|||||||
Reference in New Issue
Block a user