mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 02:45:58 +00:00
Add new currencies and update exchange rates.
This commit is contained in:
@@ -28,48 +28,53 @@ return [
|
|||||||
'download_enabled' => env('ENABLE_EXTERNAL_RATES', false),
|
'download_enabled' => env('ENABLE_EXTERNAL_RATES', false),
|
||||||
|
|
||||||
// if currencies are added, default rates must be added as well!
|
// if currencies are added, default rates must be added as well!
|
||||||
// last exchange rate update: 2024-12-30
|
|
||||||
// source: https://www.xe.com/currencyconverter/
|
// source: https://www.xe.com/currencyconverter/
|
||||||
'date' => '2024-12-30',
|
'date' => '2025-04-15',
|
||||||
|
|
||||||
// all rates are from EUR to $currency:
|
// all rates are from EUR to $currency:
|
||||||
'rates' => [
|
'rates' => [
|
||||||
// europa
|
// europa
|
||||||
'EUR' => 1,
|
'EUR' => 1,
|
||||||
'HUF' => 410.79798,
|
'HUF' => 410.79798,
|
||||||
'GBP' => 0.82858703,
|
'GBP' => 0.86003261,
|
||||||
'UAH' => 43.485934,
|
'UAH' => 46.867455,
|
||||||
'PLN' => 4.2708542,
|
'PLN' => 4.2802098,
|
||||||
'TRY' => 36.804124,
|
'TRY' => 43.180054,
|
||||||
'DKK' => 7.4591,
|
'DKK' => 7.4591,
|
||||||
'RON' => 4.9768699,
|
'RON' => 7.4648336,
|
||||||
|
|
||||||
// Americas
|
// Americas
|
||||||
'USD' => 1.0430046,
|
'USD' => 1.1349044,
|
||||||
'BRL' => 6.4639113,
|
'BRL' => 6.6458518,
|
||||||
'CAD' => 1.5006908,
|
'CAD' => 1.575105,
|
||||||
'MXN' => 21.249542,
|
'MXN' => 22.805278,
|
||||||
|
|
||||||
// Oceania currencies
|
// Oceania currencies
|
||||||
'IDR' => 16860.057,
|
'IDR' => 19070.382,
|
||||||
'AUD' => 1.6705648,
|
'AUD' => 1.787202,
|
||||||
'NZD' => 1.8436945,
|
'NZD' => 1.9191078,
|
||||||
|
|
||||||
// africa
|
// africa
|
||||||
'EGP' => 53.038174,
|
'EGP' => 57.874172,
|
||||||
'MAD' => 10.521629,
|
'MAD' => 10.549438,
|
||||||
'ZAR' => 19.460263,
|
'ZAR' => 21.444356,
|
||||||
|
|
||||||
// asia
|
// asia
|
||||||
'JPY' => 164.74767,
|
'JPY' => 162.47195,
|
||||||
'RMB' => 7.6138994,
|
'RMB' => 8.2849977,
|
||||||
'CNY' => 7.6138994,
|
'CNY' => 8.2849977,
|
||||||
'RUB' => 108.56771,
|
'RUB' => 93.34423,
|
||||||
'INR' => 89.157391,
|
'INR' => 97.572815,
|
||||||
|
|
||||||
// int
|
// int
|
||||||
'ILS' => 3.8428028,
|
'ILS' => 4.1801786,
|
||||||
'CHF' => 0.94044969,
|
'CHF' => 0.92683126,
|
||||||
'HRK' => 7.5345, // replaced by EUR
|
'HRK' => 7.5345, // replaced by EUR
|
||||||
|
|
||||||
|
'ISK' => 145.10532,
|
||||||
|
'NOK' => 11.980824,
|
||||||
|
'SEK' => 11.08809,
|
||||||
|
'HKD' => 8.8046322,
|
||||||
|
'CZK' => 25.092213,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@@ -69,10 +69,14 @@ class TransactionCurrencySeeder extends Seeder
|
|||||||
$currencies[] = ['code' => 'RUB', 'name' => 'Russian ruble', 'symbol' => '₽', 'decimal_places' => 2];
|
$currencies[] = ['code' => 'RUB', 'name' => 'Russian ruble', 'symbol' => '₽', 'decimal_places' => 2];
|
||||||
$currencies[] = ['code' => 'INR', 'name' => 'Indian rupee', 'symbol' => '₹', 'decimal_places' => 2];
|
$currencies[] = ['code' => 'INR', 'name' => 'Indian rupee', 'symbol' => '₹', 'decimal_places' => 2];
|
||||||
|
|
||||||
// PLEASE ADD NEW CURRENCIES BELOW THIS LINE
|
// ALL NEW CURRENCIES BELOW THIS LINE
|
||||||
$currencies[] = ['code' => 'ILS', 'name' => 'Israeli new shekel', 'symbol' => '₪', 'decimal_places' => 2];
|
$currencies[] = ['code' => 'ILS', 'name' => 'Israeli new shekel', 'symbol' => '₪', 'decimal_places' => 2];
|
||||||
$currencies[] = ['code' => 'CHF', 'name' => 'Swiss franc', 'symbol' => 'CHF', 'decimal_places' => 2];
|
$currencies[] = ['code' => 'CHF', 'name' => 'Swiss franc', 'symbol' => 'CHF', 'decimal_places' => 2];
|
||||||
$currencies[] = ['code' => 'HRK', 'name' => 'Croatian kuna', 'symbol' => 'kn', 'decimal_places' => 2];
|
$currencies[] = ['code' => 'HRK', 'name' => 'Croatian kuna', 'symbol' => 'kn', 'decimal_places' => 2];
|
||||||
|
$currencies[] = ['code' => 'HKD', 'name' => 'Hong Kong dollar', 'symbol' => 'HK$', 'decimal_places' => 2];
|
||||||
|
$currencies[] = ['code' => 'CHF', 'name' => 'Swiss franc', 'symbol' => 'CHF', 'decimal_places' => 2];
|
||||||
|
$currencies[] = ['code' => 'NOK', 'name' => 'Norwegian krone', 'symbol' => 'kr.', 'decimal_places' => 2];
|
||||||
|
$currencies[] = ['code' => 'CZK', 'name' => 'Czech koruna', 'symbol' => 'Kč', 'decimal_places' => 2];
|
||||||
|
|
||||||
foreach ($currencies as $currency) {
|
foreach ($currencies as $currency) {
|
||||||
if (null === TransactionCurrency::where('code', $currency['code'])->first()) {
|
if (null === TransactionCurrency::where('code', $currency['code'])->first()) {
|
||||||
|
Reference in New Issue
Block a user