🤖 Auto commit for release 'develop' on 2025-09-15

This commit is contained in:
JC5
2025-09-15 05:23:47 +02:00
parent 9075fa8ac8
commit de9efb0727
65 changed files with 416 additions and 408 deletions

View File

@@ -50,9 +50,9 @@ class Account extends Model
use ReturnsIntegerUserIdTrait;
use SoftDeletes;
protected $fillable = ['user_id', 'user_group_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban', 'native_virtual_balance'];
protected $fillable = ['user_id', 'user_group_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban', 'native_virtual_balance'];
protected $hidden = ['encrypted'];
protected $hidden = ['encrypted'];
private bool $joinedAccountTypes = false;
/**
@@ -66,10 +66,10 @@ class Account extends Model
$accountId = (int)$value;
/** @var User $user */
$user = auth()->user();
$user = auth()->user();
/** @var null|Account $account */
$account = $user->accounts()->with(['accountType'])->find($accountId);
$account = $user->accounts()->with(['accountType'])->find($accountId);
if (null !== $account) {
return $account;
}
@@ -126,7 +126,7 @@ class Account extends Model
public function setVirtualBalanceAttribute(mixed $value): void
{
$value = (string)$value;
$value = (string)$value;
if ('' === $value) {
$value = null;
}
@@ -146,7 +146,7 @@ class Account extends Model
protected function accountId(): Attribute
{
return Attribute::make(
get: static fn($value) => (int)$value,
get: static fn ($value) => (int)$value,
);
}
@@ -158,8 +158,9 @@ class Account extends Model
return Attribute::make(get: function () {
/** @var null|AccountMeta $metaValue */
$metaValue = $this->accountMeta()
->where('name', 'account_number')
->first();
->where('name', 'account_number')
->first()
;
return null !== $metaValue ? $metaValue->data : '';
});
@@ -176,7 +177,7 @@ class Account extends Model
protected function accountTypeId(): Attribute
{
return Attribute::make(
get: static fn($value) => (int)$value,
get: static fn ($value) => (int)$value,
);
}
@@ -220,14 +221,14 @@ class Account extends Model
protected function iban(): Attribute
{
return Attribute::make(
get: static fn($value) => null === $value ? null : trim(str_replace(' ', '', (string)$value)),
get: static fn ($value) => null === $value ? null : trim(str_replace(' ', '', (string)$value)),
);
}
protected function order(): Attribute
{
return Attribute::make(
get: static fn($value) => (int)$value,
get: static fn ($value) => (int)$value,
);
}
@@ -237,7 +238,7 @@ class Account extends Model
protected function virtualBalance(): Attribute
{
return Attribute::make(
get: static fn($value) => (string)$value,
get: static fn ($value) => (string)$value,
);
}
}