From 15f52e7b71a4bb411ca3a0a6c56d90cc91a02807 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 6 Aug 2018 14:29:34 +0530 Subject: [PATCH] [Fix] Incorrect tax amount calculation because of same fieldname in the code --- .../item_wise_sales_register/item_wise_sales_register.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py index d5b708fec5..05ad741a3d 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py @@ -223,13 +223,13 @@ def get_tax_accounts(item_list, columns, company_currency, item_tax_amount = flt((tax_amount * d.base_net_amount) / item_net_amount) \ if item_net_amount else 0 if item_tax_amount: - tax_amount = flt(item_tax_amount, tax_amount_precision) - tax_amount = (tax_amount * -1 - if (doctype == 'Purchase Invoice' and name in deducted_tax) else tax_amount) + tax_value = flt(item_tax_amount, tax_amount_precision) + tax_value = (tax_value * -1 + if (doctype == 'Purchase Invoice' and name in deducted_tax) else tax_value) itemised_tax.setdefault(d.name, {})[description] = frappe._dict({ "tax_rate": tax_rate, - "tax_amount": tax_amount + "tax_amount": tax_value }) except ValueError: