mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Support setting conversion base currency
This commit is contained in:
parent
dae5dcc3ef
commit
479a710cb6
@ -190,7 +190,7 @@ class SendReminders extends Command
|
||||
$data = CurlUtils::get(config('ninja.exchange_rates_url'));
|
||||
$data = json_decode($data);
|
||||
|
||||
Currency::whereCode('EUR')->update(['exchange_rate' => 1]);
|
||||
Currency::whereCode(config('ninja.exchange_rates_base'))->update(['exchange_rate' => 1]);
|
||||
|
||||
foreach ($data->rates as $code => $rate) {
|
||||
Currency::whereCode($code)->update(['exchange_rate' => $rate]);
|
||||
|
@ -21,5 +21,6 @@ return [
|
||||
|
||||
// data services
|
||||
'exchange_rates_url' => env('EXCHANGE_RATES_URL', 'https://api.fixer.io/latest'),
|
||||
'exchange_rates_base' => env('EXCHANGE_RATES_BASE', 'EUR'),
|
||||
|
||||
];
|
||||
|
@ -15,7 +15,7 @@
|
||||
countryMap[country.id] = country;
|
||||
}
|
||||
|
||||
fx.base = 'EUR';
|
||||
fx.base = '{{ config('ninja.exchange_rates_base') }}';
|
||||
fx.rates = {!! cache('currencies')
|
||||
->keyBy('code')
|
||||
->map(function($item, $key) {
|
||||
|
Loading…
Reference in New Issue
Block a user