[hotfix] taxes and totals

This commit is contained in:
Anand Doshi 2015-04-05 20:09:09 +05:30
parent 22af7deadd
commit 731b15edf4

View File

@ -290,7 +290,7 @@ class calculate_taxes_and_totals(object):
last_tax = self.doc.get("taxes")[-1] last_tax = self.doc.get("taxes")[-1]
diff = self.doc.net_total - flt(last_tax.total / self.doc.conversion_rate, diff = self.doc.net_total - flt(last_tax.total / self.doc.conversion_rate,
self.precision("grand_total_export")) self.doc.precision("grand_total_export"))
if diff and abs(diff) <= (2.0 / 10**last_tax.precision("tax_amount")): if diff and abs(diff) <= (2.0 / 10**last_tax.precision("tax_amount")):
adjustment_amount = flt(diff * self.doc.conversion_rate, last_tax.precision("tax_amount")) adjustment_amount = flt(diff * self.doc.conversion_rate, last_tax.precision("tax_amount"))