From 69b0535e10733574cfbbd2f051e3621676b88d80 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 14 May 2018 14:19:31 +0530 Subject: [PATCH] [fix] Incorrect currency conversion in Itemised Tax Breakup (#14006) --- erpnext/controllers/taxes_and_totals.py | 3 ++- erpnext/templates/includes/itemised_tax_breakup.html | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index e968e61d74..a4d9daedd6 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -558,7 +558,8 @@ def get_itemised_tax_breakup_html(doc): itemised_tax=itemised_tax, itemised_taxable_amount=itemised_taxable_amount, tax_accounts=tax_accounts, - company_currency=erpnext.get_company_currency(doc.company) + conversion_rate=doc.conversion_rate, + currency=doc.currency ) ) diff --git a/erpnext/templates/includes/itemised_tax_breakup.html b/erpnext/templates/includes/itemised_tax_breakup.html index 4162b3ab5a..982397e133 100644 --- a/erpnext/templates/includes/itemised_tax_breakup.html +++ b/erpnext/templates/includes/itemised_tax_breakup.html @@ -16,16 +16,16 @@ {{ item }} - {{ frappe.utils.fmt_money(itemised_taxable_amount.get(item), None, company_currency) }} + {{ frappe.utils.fmt_money(itemised_taxable_amount.get(item), None, currency) }} {% for tax_account in tax_accounts %} {% set tax_details = taxes.get(tax_account) %} {% if tax_details %} {% if tax_details.tax_rate or not tax_details.tax_amount %} - ({{ tax_details.tax_rate }}%) + ({{ tax_details.tax_rate }}%) {% endif %} - {{ frappe.utils.fmt_money(tax_details.tax_amount, None, company_currency) }} + {{ frappe.utils.fmt_money(tax_details.tax_amount / conversion_rate, None, currency) }} {% else %}