This commit is contained in:
James Cole 2019-09-21 07:15:32 +02:00
parent 5fb6a6ef5f
commit 750b2360c3
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -220,7 +220,8 @@ class BudgetRepository implements BudgetRepositoryInterface
public function getInactiveBudgets(): Collection
{
/** @var Collection $set */
$set = $this->user->budgets()->orderBy('order', 'DESC')
$set = $this->user->budgets()
->orderBy('order', 'DESC')
->orderBy('name', 'ASC')->where('active', 0)->get();
return $set;
@ -238,6 +239,8 @@ class BudgetRepository implements BudgetRepositoryInterface
if ('' !== $query) {
$search->where('name', 'LIKE', sprintf('%%%s%%', $query));
}
$search->orderBy('order', 'DESC')
->orderBy('name', 'ASC')->where('active', 1);
return $search->get();
}