diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index c1457c238775..d1b2b9ba7f44 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -1,8 +1,11 @@ find($currencyId); - - if (!$currency) { - $currency = Currency::remember(DEFAULT_QUERY_CACHE)->find(1); + $currency = Currency::find($currencyId); + + if(!$currency){ + $currency = Currency::find(1); } + Cache::add('currency', $currency, DEFAULT_QUERY_CACHE); + return $currency->symbol.number_format($value, $currency->precision, $currency->decimal_separator, $currency->thousand_separator); } diff --git a/resources/views/script.blade.php b/resources/views/script.blade.php index 68e97c96727e..51af67f8b14f 100644 --- a/resources/views/script.blade.php +++ b/resources/views/script.blade.php @@ -1,6 +1,6 @@