This commit is contained in:
James Cole
2026-01-15 05:59:33 +01:00
parent 8b322dc903
commit 1e618fbf6d
4 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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));