mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-03 20:56:21 +00:00
@fuf discovered a bug where FF3 will fall back to the hard-coded system default currency and not the set default currency. See #307
This commit is contained in:
@@ -171,7 +171,7 @@ class Amount
|
||||
}
|
||||
|
||||
/**
|
||||
* @return TransactionCurrency
|
||||
* @return \FireflyIII\Models\TransactionCurrency
|
||||
*/
|
||||
public function getDefaultCurrency(): TransactionCurrency
|
||||
{
|
||||
@@ -180,7 +180,7 @@ class Amount
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
}
|
||||
$currencyPreference = Prefs::get('currencyPreference', 'EUR');
|
||||
$currencyPreference = Prefs::get('currencyPreference', env('DEFAULT_CURRENCY', 'EUR'));
|
||||
$currency = TransactionCurrency::whereCode($currencyPreference->data)->first();
|
||||
$cache->store($currency);
|
||||
|
||||
|
||||
@@ -57,11 +57,11 @@ class Preferences
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param string $name
|
||||
* @param string $default
|
||||
* @param \FireflyIII\User $user
|
||||
* @param string $name
|
||||
* @param string $default
|
||||
*
|
||||
* @return Preference|null
|
||||
* @return \FireflyIII\Models\Preference|null
|
||||
*/
|
||||
public function getForUser(User $user, $name, $default = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user