mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 07:29:22 +00:00
Merge pull request #16849 from frappe/bcornwellmott-patch-1
fix: Add date to currency exchange caching
This commit is contained in:
@@ -93,7 +93,7 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
cache = frappe.cache()
|
cache = frappe.cache()
|
||||||
key = "currency_exchange_rate:{0}:{1}".format(from_currency, to_currency)
|
key = "currency_exchange_rate_{0}:{1}:{2}".format(transaction_date,from_currency, to_currency)
|
||||||
value = cache.get(key)
|
value = cache.get(key)
|
||||||
|
|
||||||
if not value:
|
if not value:
|
||||||
|
|||||||
Reference in New Issue
Block a user