diff --git a/controllers/accounts_controller.py b/controllers/accounts_controller.py index a3dae8e2e87..4ee7e53e151 100644 --- a/controllers/accounts_controller.py +++ b/controllers/accounts_controller.py @@ -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 diff --git a/public/js/transaction.js b/public/js/transaction.js index 1d06a9f487d..0ff957a820b 100644 --- a/public/js/transaction.js +++ b/public/js/transaction.js @@ -338,8 +338,19 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ var headings = $.map([wn._("Item Name")].concat($.map(tax_accounts, function(head) { return head[1]; })), function(head) { return '