mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Correctly order account names.
This commit is contained in:
@@ -137,7 +137,7 @@ class ReportHelper implements ReportHelperInterface
|
||||
$sharedAccounts[] = $account->id;
|
||||
}
|
||||
|
||||
$accounts = \Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*'])->filter(
|
||||
$accounts = \Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->orderBy('accounts.name','ASC')->get(['accounts.*'])->filter(
|
||||
function (Account $account) use ($sharedAccounts) {
|
||||
if (!in_array($account->id, $sharedAccounts)) {
|
||||
return $account;
|
||||
|
@@ -129,6 +129,7 @@ class ReportQuery implements ReportQueryInterface
|
||||
$join->on('account_meta.account_id', '=', 'accounts.id')->where('account_meta.name', '=', 'accountRole');
|
||||
}
|
||||
)
|
||||
->orderBy('accounts.name','ASC')
|
||||
->where(
|
||||
function (Builder $query) {
|
||||
$query->where('account_meta.data', '!=', '"sharedAsset"');
|
||||
|
Reference in New Issue
Block a user