Rename method.

This commit is contained in:
James Cole
2025-07-31 20:17:46 +02:00
parent 65a926874b
commit 210bd83bd4
39 changed files with 61 additions and 61 deletions

View File

@@ -61,7 +61,7 @@ class PiggyBankEventTransformer extends AbstractTransformer
$this->piggyRepos->setUser($account->user);
// get associated currency or fall back to the default:
$currency = $this->repository->getAccountCurrency($account) ?? app('amount')->getNativeCurrencyByUserGroup($account->user->userGroup);
$currency = $this->repository->getAccountCurrency($account) ?? app('amount')->getPrimaryCurrencyByUserGroup($account->user->userGroup);
// get associated journal and transaction, if any:
$journalId = $event->transaction_journal_id;

View File

@@ -105,7 +105,7 @@ class UserGroupTransformer extends AbstractTransformer
*/
public function transform(UserGroup $userGroup): array
{
$currency = Amount::getNativeCurrencyByUserGroup($userGroup);
$currency = Amount::getPrimaryCurrencyByUserGroup($userGroup);
return [
'id' => $userGroup->id,

View File

@@ -139,7 +139,7 @@ class PiggyBankTransformer extends AbstractTransformer
}
Log::debug(sprintf('Created new ExchangeRateConverter in %s', __METHOD__));
$this->default = app('amount')->getNativeCurrencyByUserGroup(auth()->user()->userGroup);
$this->default = app('amount')->getPrimaryCurrencyByUserGroup(auth()->user()->userGroup);
$this->converter = new ExchangeRateConverter();
return $objects;