mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 16:13:54 +00:00
Refactor currency repository.
This commit is contained in:
@@ -129,7 +129,7 @@ class AccountCurrencies extends Command
|
||||
$accounts = $this->accountRepos->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]);
|
||||
|
||||
// get user's currency preference:
|
||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUser($user);
|
||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUserGroup($user->userGroup);
|
||||
|
||||
/** @var Account $account */
|
||||
foreach ($accounts as $account) {
|
||||
|
@@ -77,7 +77,7 @@ class BudgetLimitCurrency extends Command
|
||||
if (null !== $budget) {
|
||||
$user = $budget->user;
|
||||
if (null !== $user) {
|
||||
$currency = app('amount')->getDefaultCurrencyByUser($user);
|
||||
$currency = app('amount')->getDefaultCurrencyByUserGroup($user->userGroup);
|
||||
$budgetLimit->transaction_currency_id = $currency->id;
|
||||
$budgetLimit->save();
|
||||
$this->friendlyInfo(
|
||||
|
Reference in New Issue
Block a user