mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Use INVENTREE_DEFAULT_CURRENCY as specified base currency
This commit is contained in:
parent
619cba6007
commit
0a26a06909
@ -513,9 +513,7 @@ CURRENCIES = CONFIG.get(
|
||||
],
|
||||
)
|
||||
|
||||
BASE_CURRENCY = CONFIG.get('base_currency', 'USD')
|
||||
|
||||
EXCHANGE_BACKEND = 'InvenTree.exchange.InvenTreeManualExchangeBackend'
|
||||
EXCHANGE_BACKEND = 'InvenTree.exchange.ExchangeRateHostBackend'
|
||||
|
||||
# Extract email settings from the config file
|
||||
email_config = CONFIG.get('email', {})
|
||||
|
@ -175,10 +175,13 @@ def update_exchange_rates():
|
||||
return
|
||||
|
||||
backend = ExchangeRateHostBackend()
|
||||
print(f"Updating exchange rates from {backend.url}")
|
||||
|
||||
currencies = ','.join(settings.CURRENCIES)
|
||||
|
||||
base = settings.BASE_CURRENCY
|
||||
base = common.models.InvenTreeSetting.get_setting('INVENTREE_DEFAULT_CURRENCY')
|
||||
|
||||
print(f"Using base currency '{base}'")
|
||||
|
||||
backend.update_rates(base_currency=base, symbols=currencies)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user