mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 04:19:12 +00:00
[chore] Move to native from default. [skip ci]
This commit is contained in:
@@ -279,7 +279,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
|
||||
$factory = app(TransactionCurrencyFactory::class);
|
||||
$currency = $factory->find($data['currency_id'] ?? null, $data['currency_code'] ?? null);
|
||||
if (null === $currency) {
|
||||
$currency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);
|
||||
$currency = app('amount')->getNativeCurrencyByUserGroup($this->user->userGroup);
|
||||
}
|
||||
$currency->enabled = true;
|
||||
$currency->save();
|
||||
@@ -377,7 +377,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
|
||||
}
|
||||
// catch unexpected null:
|
||||
if (null === $currency) {
|
||||
$currency = $budgetLimit->transactionCurrency ?? app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);
|
||||
$currency = $budgetLimit->transactionCurrency ?? app('amount')->getNativeCurrencyByUserGroup($this->user->userGroup);
|
||||
}
|
||||
$currency->enabled = true;
|
||||
$currency->save();
|
||||
|
||||
@@ -396,7 +396,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
$autoBudget = $this->getAutoBudget($budget);
|
||||
|
||||
// grab default currency:
|
||||
$currency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);
|
||||
$currency = app('amount')->getNativeCurrencyByUserGroup($this->user->userGroup);
|
||||
|
||||
if (null === $autoBudget) {
|
||||
// at this point it's a blind assumption auto_budget_type is 1 or 2.
|
||||
@@ -782,7 +782,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
$currency = $repos->findByCode((string) $data['currency_code']);
|
||||
}
|
||||
if (null === $currency) {
|
||||
$currency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);
|
||||
$currency = app('amount')->getNativeCurrencyByUserGroup($this->user->userGroup);
|
||||
}
|
||||
|
||||
$autoBudget = new AutoBudget();
|
||||
|
||||
Reference in New Issue
Block a user