Import currency fix
This commit is contained in:
parent
b71f32a3af
commit
19080af049
2 changed files with 4 additions and 4 deletions
|
|
@ -119,7 +119,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…
Add table
Reference in a new issue