Discount amount in party currency

This commit is contained in:
Nabin Hait
2015-01-12 17:35:14 +05:30
parent 024b537b7f
commit 2244ac4d52
12 changed files with 132 additions and 71 deletions

View File

@@ -295,7 +295,7 @@ class AccountsController(TransactionBase):
self.precision("tax_amount", tax))
def adjust_discount_amount_loss(self, tax):
discount_amount_loss = self.grand_total - flt(self.discount_amount) - tax.total
discount_amount_loss = self.grand_total - flt(self.base_discount_amount) - tax.total
tax.tax_amount_after_discount_amount = flt(tax.tax_amount_after_discount_amount +
discount_amount_loss, self.precision("tax_amount", tax))
tax.total = flt(tax.total + discount_amount_loss, self.precision("total", tax))