[fix] [minor] item wise taxes

This commit is contained in:
Anand Doshi
2013-09-05 16:53:57 +05:30
parent 284275cb70
commit 179e3772c0
2 changed files with 18 additions and 2 deletions

View File

@@ -291,7 +291,12 @@ class AccountsController(TransactionBase):
current_tax_amount = flt(current_tax_amount, self.precision("tax_amount", tax))
# store tax breakup for each item
tax.item_wise_tax_detail[item.item_code or item.item_name] = [tax_rate, current_tax_amount]
key = item.item_code or item.item_name
if tax.item_wise_tax_detail.get(key):
item_wise_tax_amount = tax.item_wise_tax_detail[key][1] + current_tax_amount
tax.item_wise_tax_detail[key] = [tax_rate, item_wise_tax_amount]
else:
tax.item_wise_tax_detail[key] = [tax_rate, current_tax_amount]
return current_tax_amount