fix: exchange rate not fetching correctly (#19985)

This commit is contained in:
Saqib
2019-12-23 15:52:59 +05:30
committed by Nabin Hait
parent b139f2fc0f
commit f27a6528db

View File

@@ -968,7 +968,7 @@ def get_exchange_rate(posting_date, account=None, account_currency=None, company
# The date used to retreive the exchange rate here is the date passed
# in as an argument to this function.
elif (not exchange_rate or exchange_rate==1) and account_currency and posting_date:
elif (not exchange_rate or flt(exchange_rate)==1) and account_currency and posting_date:
exchange_rate = get_exchange_rate(account_currency, company_currency, posting_date)
else:
exchange_rate = 1