mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-16 13:25:10 +00:00
fix: add validation for exchange gain/loss entries
(cherry picked from commit 5c9eddd31e)
# Conflicts:
# erpnext/accounts/report/utils.py
This commit is contained in:
@@ -107,7 +107,11 @@ def convert_to_presentation_currency(gl_entries, currency_info):
|
|||||||
credit_in_account_currency = flt(entry["credit_in_account_currency"])
|
credit_in_account_currency = flt(entry["credit_in_account_currency"])
|
||||||
account_currency = entry["account_currency"]
|
account_currency = entry["account_currency"]
|
||||||
|
|
||||||
if len(account_currencies) == 1 and account_currency == presentation_currency:
|
if (
|
||||||
|
len(account_currencies) == 1
|
||||||
|
and account_currency == presentation_currency
|
||||||
|
and (debit_in_account_currency or credit_in_account_currency)
|
||||||
|
):
|
||||||
entry["debit"] = debit_in_account_currency
|
entry["debit"] = debit_in_account_currency
|
||||||
entry["credit"] = credit_in_account_currency
|
entry["credit"] = credit_in_account_currency
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user