[fix] Incorrect currency conversion in Itemised Tax Breakup (#14006)
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index e968e61..a4d9dae 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -558,7 +558,8 @@
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 4162b3a..982397e 100644
--- a/erpnext/templates/includes/itemised_tax_breakup.html
+++ b/erpnext/templates/includes/itemised_tax_breakup.html
@@ -16,16 +16,16 @@
<tr>
<td>{{ item }}</td>
<td class='text-right'>
- {{ frappe.utils.fmt_money(itemised_taxable_amount.get(item), None, company_currency) }}
+ {{ frappe.utils.fmt_money(itemised_taxable_amount.get(item), None, currency) }}
</td>
{% for tax_account in tax_accounts %}
{% set tax_details = taxes.get(tax_account) %}
{% if tax_details %}
<td class='text-right'>
{% 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) }}
</td>
{% else %}
<td></td>