mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-25 01:28:29 +00:00
[fix] [minor] item wise taxes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user