From 05698994995c61b3929d4770fde6b8cb1dea7d06 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 11 Jul 2023 10:04:17 +0530 Subject: [PATCH] fix: possible type error on ERR creation (cherry picked from commit 176966daabea4fe59a85858583f47ff5bd6ef38f) --- .../exchange_rate_revaluation/exchange_rate_revaluation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 c52ea24f25a4..3b5698b118a7 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py @@ -258,8 +258,8 @@ def calculate_new_account_balance(company, posting_date, account_details): new_balance_in_base_currency = 0 new_balance_in_account_currency = 0 - current_exchange_rate = calculate_exchange_rate_using_last_gle( - company, d.account, d.party_type, d.party + current_exchange_rate = ( + calculate_exchange_rate_using_last_gle(company, d.account, d.party_type, d.party) or 0.0 ) gain_loss = new_balance_in_account_currency - (