diff --git a/app/Http/Controllers/Settings/Currencies.php b/app/Http/Controllers/Settings/Currencies.php index 916845ee5..767e29780 100644 --- a/app/Http/Controllers/Settings/Currencies.php +++ b/app/Http/Controllers/Settings/Currencies.php @@ -229,14 +229,16 @@ class Currencies extends Controller public function config() { - $json = new \stdClass(); + $json = new \stdClass(); $code = request('code'); + $currencies = Currency::all()->pluck('rate', 'code'); + if ($code) { $currency = config('money.' . $code); - $currency['rate'] = isset($currency['rate']) ? $currency['rate'] : null; + $currency['rate'] = isset($currencies[$code]) ? $currencies[$code] : null; $currency['symbol_first'] = $currency['symbol_first'] ? 1 : 0; $json = (object) $currency; diff --git a/resources/views/wizard/currencies/index.blade.php b/resources/views/wizard/currencies/index.blade.php index 9a90341c6..e77eb2508 100644 --- a/resources/views/wizard/currencies/index.blade.php +++ b/resources/views/wizard/currencies/index.blade.php @@ -84,7 +84,7 @@ {{ Form::textGroup('name', trans('general.name'), 'font', [], null, '') }}