fix: always send account currency in response
diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
index 2f81c5f..c907a25 100644
--- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
+++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
@@ -233,6 +233,10 @@
balance = get_balance_on(
account, date=posting_date, party_type=party_type, party=party, in_account_currency=False
)
+ account_details = {
+ "account_currency": account_currency,
+ }
+
if balance:
balance_in_account_currency = get_balance_on(
account, date=posting_date, party_type=party_type, party=party
@@ -242,13 +246,14 @@
)
new_exchange_rate = get_exchange_rate(account_currency, company_currency, posting_date)
new_balance_in_base_currency = balance_in_account_currency * new_exchange_rate
- account_details = {
- "account_currency": account_currency,
- "balance_in_base_currency": balance,
- "balance_in_account_currency": balance_in_account_currency,
- "current_exchange_rate": current_exchange_rate,
- "new_exchange_rate": new_exchange_rate,
- "new_balance_in_base_currency": new_balance_in_base_currency,
- }
+ account_details = account_details.update(
+ {
+ "balance_in_base_currency": balance,
+ "balance_in_account_currency": balance_in_account_currency,
+ "current_exchange_rate": current_exchange_rate,
+ "new_exchange_rate": new_exchange_rate,
+ "new_balance_in_base_currency": new_balance_in_base_currency,
+ }
+ )
return account_details