mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 15:44:33 -04:00
Update ExpenseService.php
remove duplicate method
This commit is contained in:
parent
56f13a019e
commit
549f1cf846
@ -115,21 +115,4 @@ class ExpenseService extends BaseService
|
|||||||
return $this->datatableService->createDatatable($datatable, $query);
|
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…
x
Reference in New Issue
Block a user