Merge pull request #17281 from rohitwaghchaure/credit_will_not_be_converted_if_debit_amount_is_there_develop

fix: credit amount in account's currency not be consider if debit amount is present in the general ledger(Cherry-picked)
This commit is contained in:
Nabin Hait 2019-04-19 13:00:29 +05:30 committed by GitHub
commit 05651291b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,13 +112,15 @@ def convert_to_presentation_currency(gl_entries, currency_info):
if entry.get('debit'):
entry['debit'] = converted_value
else:
if entry.get('credit'):
entry['credit'] = converted_value
elif account_currency == presentation_currency:
if entry.get('debit'):
entry['debit'] = debit_in_account_currency
else:
if entry.get('credit'):
entry['credit'] = credit_in_account_currency
converted_gl_list.append(entry)