mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Various layout updates and tiny upgrade fixes [skip ci]
This commit is contained in:
@@ -173,6 +173,22 @@ class BillRepository implements BillRepositoryInterface
|
||||
*/
|
||||
public function getBillsForAccounts(Collection $accounts): Collection
|
||||
{
|
||||
$fields = ['bills.id',
|
||||
'bills.created_at',
|
||||
'bills.updated_at',
|
||||
'bills.deleted_at',
|
||||
'bills.user_id',
|
||||
'bills.name',
|
||||
'bills.match',
|
||||
'bills.amount_min',
|
||||
'bills.amount_max',
|
||||
'bills.date',
|
||||
'bills.repeat_freq',
|
||||
'bills.skip',
|
||||
'bills.automatch',
|
||||
'bills.active',
|
||||
'bills.name_encrypted',
|
||||
'bills.match_encrypted'];
|
||||
$ids = $accounts->pluck('id')->toArray();
|
||||
$set = $this->user->bills()
|
||||
->leftJoin(
|
||||
@@ -187,8 +203,8 @@ class BillRepository implements BillRepositoryInterface
|
||||
)
|
||||
->whereIn('transactions.account_id', $ids)
|
||||
->whereNull('transaction_journals.deleted_at')
|
||||
->groupBy('bills.id')
|
||||
->get(['bills.*']);
|
||||
->groupBy($fields)
|
||||
->get($fields);
|
||||
|
||||
$set = $set->sortBy(
|
||||
function (Bill $bill) {
|
||||
|
||||
Reference in New Issue
Block a user