mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Convert currencies
This commit is contained in:
parent
3773999ed0
commit
f37559a239
@ -5,6 +5,7 @@ namespace App\Console\Commands;
|
|||||||
use App\Libraries\CurlUtils;
|
use App\Libraries\CurlUtils;
|
||||||
use Carbon;
|
use Carbon;
|
||||||
use Str;
|
use Str;
|
||||||
|
use Cache;
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use App\Models\Currency;
|
use App\Models\Currency;
|
||||||
use App\Ninja\Mailers\ContactMailer as Mailer;
|
use App\Ninja\Mailers\ContactMailer as Mailer;
|
||||||
@ -178,6 +179,8 @@ class SendReminders extends Command
|
|||||||
foreach ($data->rates as $code => $rate) {
|
foreach ($data->rates as $code => $rate) {
|
||||||
Currency::whereCode($code)->update(['exchange_rate' => $rate]);
|
Currency::whereCode($code)->update(['exchange_rate' => $rate]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Cache::forget('currencies');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user