Skip to content

Commit

Permalink
fix: Presentation currency conversion in reports (#27316)
Browse files Browse the repository at this point in the history
(cherry picked from commit ceaa804)

# Conflicts:
#	erpnext/accounts/report/utils.py
  • Loading branch information
deepeshgarg007 authored and mergify[bot] committed Feb 27, 2025
1 parent f5160dc commit f4aadf4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions erpnext/accounts/report/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def convert_to_presentation_currency(gl_entries, currency_info, company):
if credit_in_account_currency:
entry["credit"] = credit_in_account_currency
else:
<<<<<<< HEAD
date = currency_info["report_date"]
converted_debit_value = convert(debit, presentation_currency, company_currency, date)
converted_credit_value = convert(credit, presentation_currency, company_currency, date)
Expand All @@ -116,6 +117,17 @@ def convert_to_presentation_currency(gl_entries, currency_info, company):

if entry.get("credit"):
entry["credit"] = converted_credit_value
=======
date = currency_info['report_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_debit_value

if entry.get('credit'):
entry['credit'] = converted_credit_value
>>>>>>> ceaa804f04 (fix: Presentation currency conversion in reports (#27316))

converted_gl_list.append(entry)

Expand Down

0 comments on commit f4aadf4

Please sign in to comment.