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:
parent
9931b174d5
commit
9d9b59ffc5
@ -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]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user