fix: Presentation currency conversion in reports (#27316)
This commit is contained in:
parent
7b4a65484a
commit
ceaa804f04
@ -100,15 +100,15 @@ def convert_to_presentation_currency(gl_entries, currency_info, company):
|
|||||||
if entry.get('credit'):
|
if entry.get('credit'):
|
||||||
entry['credit'] = credit_in_account_currency
|
entry['credit'] = credit_in_account_currency
|
||||||
else:
|
else:
|
||||||
value = debit or credit
|
|
||||||
date = currency_info['report_date']
|
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'):
|
if entry.get('debit'):
|
||||||
entry['debit'] = converted_value
|
entry['debit'] = converted_debit_value
|
||||||
|
|
||||||
if entry.get('credit'):
|
if entry.get('credit'):
|
||||||
entry['credit'] = converted_value
|
entry['credit'] = converted_credit_value
|
||||||
|
|
||||||
converted_gl_list.append(entry)
|
converted_gl_list.append(entry)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user