mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-03 03:00:14 +00:00
[chore] Move to native from default. [skip ci]
This commit is contained in:
@@ -63,7 +63,7 @@ class CorrectsCurrencies extends Command
|
||||
$repos = app(CurrencyRepositoryInterface::class);
|
||||
|
||||
// first check if the user has any default currency (not necessarily the case, so can be forced).
|
||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUserGroup($userGroup);
|
||||
$defaultCurrency = app('amount')->getNativeCurrencyByUserGroup($userGroup);
|
||||
|
||||
Log::debug(sprintf('Now correcting currencies for user group #%d', $userGroup->id));
|
||||
$found = [$defaultCurrency->id];
|
||||
|
@@ -88,7 +88,7 @@ class CorrectsNativeAmounts extends Command
|
||||
|
||||
// do a check with the group's currency so we can skip some stuff.
|
||||
Preferences::mark();
|
||||
$currency = app('amount')->getDefaultCurrencyByUserGroup($userGroup);
|
||||
$currency = app('amount')->getNativeCurrencyByUserGroup($userGroup);
|
||||
|
||||
$this->recalculatePiggyBanks($userGroup, $currency);
|
||||
$this->recalculateBudgets($userGroup, $currency);
|
||||
|
@@ -132,6 +132,6 @@ class CorrectsOpeningBalanceCurrencies extends Command
|
||||
$repos = app(AccountRepositoryInterface::class);
|
||||
$repos->setUser($account->user);
|
||||
|
||||
return $repos->getAccountCurrency($account) ?? app('amount')->getDefaultCurrencyByUserGroup($account->userGroup);
|
||||
return $repos->getAccountCurrency($account) ?? app('amount')->getNativeCurrencyByUserGroup($account->userGroup);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user