mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Restrict client list
This commit is contained in:
parent
3c9e2769fb
commit
40241cbf38
@ -64,7 +64,7 @@ class CreditController extends BaseController
|
||||
'method' => 'POST',
|
||||
'url' => 'credits',
|
||||
'title' => trans('texts.new_credit'),
|
||||
'clients' => Client::scope()->with('contacts')->orderBy('name')->get(),
|
||||
'clients' => Client::scope()->viewable()->with('contacts')->orderBy('name')->get(),
|
||||
);
|
||||
|
||||
return View::make('credits.edit', $data);
|
||||
|
@ -71,6 +71,7 @@ class PaymentController extends BaseController
|
||||
public function create(PaymentRequest $request)
|
||||
{
|
||||
$invoices = Invoice::scope()
|
||||
->viewable()
|
||||
->where('is_recurring', '=', false)
|
||||
->where('is_quote', '=', false)
|
||||
->where('invoices.balance', '>', 0)
|
||||
@ -88,7 +89,7 @@ class PaymentController extends BaseController
|
||||
'title' => trans('texts.new_payment'),
|
||||
'paymentTypes' => Cache::get('paymentTypes'),
|
||||
'paymentTypeId' => Input::get('paymentTypeId'),
|
||||
'clients' => Client::scope()->with('contacts')->orderBy('name')->get(), );
|
||||
'clients' => Client::scope()->viewable()->with('contacts')->orderBy('name')->get(), );
|
||||
|
||||
return View::make('payments.edit', $data);
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ class TaskController extends BaseController
|
||||
private static function getViewModel()
|
||||
{
|
||||
return [
|
||||
'clients' => Client::scope()->with('contacts')->orderBy('name')->get(),
|
||||
'clients' => Client::scope()->viewable()->with('contacts')->orderBy('name')->get(),
|
||||
'account' => Auth::user()->account,
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user