From ceaa804f04b1d33b55b8d5881e5f236dfee8aab3 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Sun, 5 Sep 2021 17:21:29 +0530 Subject: [PATCH] fix: Presentation currency conversion in reports (#27316) --- erpnext/accounts/report/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index 57ff9b0ec9..2f9e9578cc 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -100,15 +100,15 @@ def convert_to_presentation_currency(gl_entries, currency_info, company): if entry.get('credit'): entry['credit'] = credit_in_account_currency else: - value = debit or credit date = currency_info['report_date'] - converted_value = convert(value, presentation_currency, company_currency, date) + converted_debit_value = convert(debit, presentation_currency, company_currency, date) + converted_credit_value = convert(credit, presentation_currency, company_currency, date) if entry.get('debit'): - entry['debit'] = converted_value + entry['debit'] = converted_debit_value if entry.get('credit'): - entry['credit'] = converted_value + entry['credit'] = converted_credit_value converted_gl_list.append(entry)