mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Sort invoices by client
This commit is contained in:
parent
9931b174d5
commit
9d9b59ffc5
@ -204,6 +204,14 @@ class InvoiceFilters extends QueryFilters
|
||||
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]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user