mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Merge branch 'master' of github.com:invoiceninja/invoiceninja
This commit is contained in:
commit
e39c07df79
@ -115,21 +115,4 @@ class ExpenseService extends BaseService
|
||||
return $this->datatableService->createDatatable($datatable, $query);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $clientPublicId
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function getDatatableClient($clientPublicId)
|
||||
{
|
||||
$datatable = new ExpenseDatatable(true, true);
|
||||
|
||||
$query = $this->expenseRepo->findClient($clientPublicId);
|
||||
|
||||
if (! Utils::hasPermission('view_all')) {
|
||||
$query->where('expenses.user_id', '=', Auth::user()->id);
|
||||
}
|
||||
|
||||
return $this->datatableService->createDatatable($datatable, $query);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user