mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 12:44:31 -04:00
Restrict client list
This commit is contained in:
parent
d9a20ca445
commit
f67990d636
@ -64,7 +64,7 @@ class CreditController extends BaseController
|
|||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'url' => 'credits',
|
'url' => 'credits',
|
||||||
'title' => trans('texts.new_credit'),
|
'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);
|
return View::make('credits.edit', $data);
|
||||||
|
@ -77,6 +77,7 @@ class PaymentController extends BaseController
|
|||||||
public function create(PaymentRequest $request)
|
public function create(PaymentRequest $request)
|
||||||
{
|
{
|
||||||
$invoices = Invoice::scope()
|
$invoices = Invoice::scope()
|
||||||
|
->viewable()
|
||||||
->invoiceType(INVOICE_TYPE_STANDARD)
|
->invoiceType(INVOICE_TYPE_STANDARD)
|
||||||
->where('is_recurring', '=', false)
|
->where('is_recurring', '=', false)
|
||||||
->where('invoices.balance', '>', 0)
|
->where('invoices.balance', '>', 0)
|
||||||
@ -94,7 +95,7 @@ class PaymentController extends BaseController
|
|||||||
'title' => trans('texts.new_payment'),
|
'title' => trans('texts.new_payment'),
|
||||||
'paymentTypes' => Cache::get('paymentTypes'),
|
'paymentTypes' => Cache::get('paymentTypes'),
|
||||||
'paymentTypeId' => Input::get('paymentTypeId'),
|
'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);
|
return View::make('payments.edit', $data);
|
||||||
}
|
}
|
||||||
|
@ -40,11 +40,11 @@ class TaskApiController extends BaseAPIController
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$payments = Task::scope()
|
$tasks = Task::scope()
|
||||||
->withTrashed()
|
->withTrashed()
|
||||||
->orderBy('created_at', 'desc');
|
->orderBy('created_at', 'desc');
|
||||||
|
|
||||||
return $this->listResponse($payments);
|
return $this->listResponse($tasks);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -174,7 +174,7 @@ class TaskController extends BaseController
|
|||||||
private static function getViewModel()
|
private static function getViewModel()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'clients' => Client::scope()->with('contacts')->orderBy('name')->get(),
|
'clients' => Client::scope()->viewable()->with('contacts')->orderBy('name')->get(),
|
||||||
'account' => Auth::user()->account,
|
'account' => Auth::user()->account,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user