mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-07-28 00:09:56 -07:00
Sort alphabetically https://github.com/orgs/firefly-iii/discussions/11524
This commit is contained in:
@@ -514,7 +514,7 @@ class BillRepository implements BillRepositoryInterface, UserGroupInterface
|
||||
{
|
||||
$query = sprintf('%%%s%%', $query);
|
||||
|
||||
return $this->user->bills()->whereLike('name', $query)->take($limit)->get();
|
||||
return $this->user->bills()->orderBy('name','ASC')->whereLike('name', $query)->take($limit)->get();
|
||||
}
|
||||
|
||||
public function setObjectGroup(Bill $bill, string $objectGroupTitle): Bill
|
||||
|
||||
@@ -361,7 +361,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface, UserGroupInterf
|
||||
|
||||
public function searchCurrency(string $search, int $limit): Collection
|
||||
{
|
||||
$query = TransactionCurrency::where('enabled', true);
|
||||
$query = TransactionCurrency::where('enabled', true)->orderBy('code', 'ASC');
|
||||
if ('' !== $search) {
|
||||
$query->whereLike('name', sprintf('%%%s%%', $search));
|
||||
}
|
||||
|
||||
@@ -182,6 +182,7 @@ class JournalRepository implements JournalRepositoryInterface, UserGroupInterfac
|
||||
{
|
||||
$query = $this->user->transactionJournals()
|
||||
->orderBy('date', 'DESC')
|
||||
->orderBy('description', 'ASC')
|
||||
;
|
||||
if ('' !== $search) {
|
||||
$query->whereLike('description', sprintf('%%%s%%', $search));
|
||||
|
||||
@@ -431,7 +431,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface, UserGroupInte
|
||||
'objectGroups',
|
||||
]
|
||||
)
|
||||
->orderBy('piggy_banks.order', 'ASC')->distinct()
|
||||
->orderBy('piggy_banks.order', 'ASC')->orderBy('piggy_banks.name', 'ASC')->distinct()
|
||||
;
|
||||
if ('' !== $query) {
|
||||
$search->whereLike('piggy_banks.name', sprintf('%%%s%%', $query));
|
||||
|
||||
Reference in New Issue
Block a user