Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-37359

This commit is contained in:
ruthra kumar
2023-10-05 12:17:07 +05:30
committed by GitHub
3 changed files with 15 additions and 8 deletions

View File

@@ -81,6 +81,11 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No
if entries:
return flt(entries[0].exchange_rate)
if frappe.get_cached_value(
"Currency Exchange Settings", "Currency Exchange Settings", "disabled"
):
return 0.00
try:
cache = frappe.cache()
key = "currency_exchange_rate_{0}:{1}:{2}".format(transaction_date, from_currency, to_currency)