Rename "native" to "primary".

This commit is contained in:
James Cole
2025-08-01 06:12:36 +02:00
parent ea6addafe6
commit 084ce02c21
51 changed files with 296 additions and 296 deletions

View File

@@ -199,14 +199,14 @@ class UserGroupRepository implements UserGroupRepositoryInterface, UserGroupInte
/** @var CurrencyRepositoryInterface $repository */
$repository = app(CurrencyRepositoryInterface::class);
if (array_key_exists('native_currency_code', $data)) {
if (array_key_exists('primary_currency_code', $data)) {
$repository->setUser($this->user);
$currency = $repository->findByCode($data['native_currency_code']);
$currency = $repository->findByCode($data['primary_currency_code']);
}
if (array_key_exists('native_currency_id', $data) && null === $currency) {
if (array_key_exists('primary_currency_id', $data) && null === $currency) {
$repository->setUser($this->user);
$currency = $repository->find((int) $data['native_currency_id']);
$currency = $repository->find((int) $data['primary_currency_id']);
}
if (null !== $currency) {
$repository->makeDefault($currency);