mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Rename default to native.
This commit is contained in:
@@ -37,7 +37,7 @@ class TransactionCurrency extends Model
|
||||
use ReturnsIntegerIdTrait;
|
||||
use SoftDeletes;
|
||||
|
||||
public ?bool $userGroupDefault = 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();
|
||||
$default = app('amount')->getDefaultCurrencyByUserGroup($user->userGroup);
|
||||
$this->userGroupDefault = $default->id === $this->id;
|
||||
$native = app('amount')->getDefaultCurrencyByUserGroup($user->userGroup);
|
||||
$this->userGroupNative = $native->id === $this->id;
|
||||
$this->userGroupEnabled = null !== $current;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user