mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix namespace.
This commit is contained in:
@@ -60,6 +60,19 @@ class CurrencyRepository implements CurrencyRepositoryInterface, UserGroupInterf
|
||||
{
|
||||
return TransactionCurrency::where('enabled', true)->orderBy('code', 'ASC')->get();
|
||||
}
|
||||
public function get(): Collection
|
||||
{
|
||||
$all = $this->userGroup->currencies()->orderBy('code', 'ASC')->withPivot(['group_default'])->get();
|
||||
$all->map(static function (TransactionCurrency $current) { // @phpstan-ignore-line
|
||||
$current->userGroupEnabled = true;
|
||||
$current->userGroupNative = 1 === (int) $current->pivot->group_default;
|
||||
|
||||
return $current;
|
||||
});
|
||||
|
||||
/** @var Collection */
|
||||
return $all;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get currency exchange rate.
|
||||
|
Reference in New Issue
Block a user