[fix] Incorrect currency conversion in Itemised Tax Breakup (#14006)

This commit is contained in:
Faris Ansari 2018-05-14 14:19:31 +05:30 committed by Nabin Hait
parent 7f63c1ad7c
commit 69b0535e10
2 changed files with 5 additions and 4 deletions

View File

@ -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
)
)

View File

@ -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>