Auto commit for release 'develop' on 2025-01-19

This commit is contained in:
github-actions
2025-01-19 11:46:08 +01:00
parent 9d2f57e40a
commit 04d1e8fd59
64 changed files with 3222 additions and 2932 deletions

View File

@@ -37,7 +37,7 @@ class TransactionCurrency extends Model
use ReturnsIntegerIdTrait;
use SoftDeletes;
public ?bool $userGroupNative = null;
public ?bool $userGroupNative = null;
public ?bool $userGroupEnabled = null;
protected $casts
= [
@@ -73,8 +73,8 @@ class TransactionCurrency extends Model
public function refreshForUser(User $user): void
{
$current = $user->userGroup->currencies()->where('transaction_currencies.id', $this->id)->first();
$native = app('amount')->getDefaultCurrencyByUserGroup($user->userGroup);
$this->userGroupNative = $native->id === $this->id;
$native = app('amount')->getDefaultCurrencyByUserGroup($user->userGroup);
$this->userGroupNative = $native->id === $this->id;
$this->userGroupEnabled = null !== $current;
}