1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Sort invoices by client

This commit is contained in:
David Bomba 2023-06-21 22:42:11 +10:00
parent 9931b174d5
commit 9d9b59ffc5

View File

@ -204,6 +204,14 @@ class InvoiceFilters extends QueryFilters
return $this->builder; return $this->builder;
} }
if ($sort_col[0] == 'client_id') {
$this->builder->with(['client' => function($q) use($sort_col){
$q->orderBy('name', $sort_col[1]);
}]);
}
return $this->builder->orderBy($sort_col[0], $sort_col[1]); return $this->builder->orderBy($sort_col[0], $sort_col[1]);
} }