mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 06:04:30 -04:00
Import currency fix
This commit is contained in:
parent
202d644d53
commit
a9b511738f
@ -103,7 +103,7 @@ class ClientRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
// convert currency code to id
|
// convert currency code to id
|
||||||
if (isset($data['currency_code'])) {
|
if (isset($data['currency_code']) && $data['currency_code']) {
|
||||||
$currencyCode = strtolower($data['currency_code']);
|
$currencyCode = strtolower($data['currency_code']);
|
||||||
$currency = Cache::get('currencies')->filter(function ($item) use ($currencyCode) {
|
$currency = Cache::get('currencies')->filter(function ($item) use ($currencyCode) {
|
||||||
return strtolower($item->code) == $currencyCode;
|
return strtolower($item->code) == $currencyCode;
|
||||||
|
@ -110,9 +110,9 @@ class CurrenciesSeeder extends Seeder
|
|||||||
['name' => 'Azerbaijan Manat', 'code' => 'AZN', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
['name' => 'Azerbaijan Manat', 'code' => 'AZN', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||||
['name' => 'Bosnia and Herzegovina Convertible Mark', 'code' => 'BAM', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
['name' => 'Bosnia and Herzegovina Convertible Mark', 'code' => 'BAM', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||||
['name' => 'Belarusian Ruble', 'code' => 'BYN', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
['name' => 'Belarusian Ruble', 'code' => 'BYN', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||||
['name' => 'Moldovan Leu', 'code' => '', 'symbol' => 'MDL', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
['name' => 'Moldovan Leu', 'code' => 'MDL', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||||
['name' => 'Kazakhstani Tenge', 'code' => '', 'symbol' => 'KZT', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
['name' => 'Kazakhstani Tenge', 'code' => 'KZT', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||||
['name' => 'Gibraltar Pound', 'code' => '', 'symbol' => 'GIP', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
['name' => 'Gibraltar Pound', 'code' => 'GIP', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($currencies as $currency) {
|
foreach ($currencies as $currency) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user