[minor] merged with master branch

This commit is contained in:
Nabin Hait
2013-09-17 10:30:24 +05:30
134 changed files with 5280 additions and 549 deletions

View File

@@ -292,7 +292,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