mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
Merge pull request #6257 from turbo124/v5-develop
Minor fixes for product and client bulk actions
This commit is contained in:
commit
474e7c1075
@ -510,7 +510,7 @@ class ClientController extends BaseController
|
||||
$action = request()->input('action');
|
||||
|
||||
$ids = request()->input('ids');
|
||||
$clients = Client::withTrashed()->find($this->transformKeys($ids));
|
||||
$clients = Client::withTrashed()->whereIn('id', $this->transformKeys($ids))->cursor();
|
||||
|
||||
$clients->each(function ($client, $key) use ($action) {
|
||||
if (auth()->user()->can('edit', $client)) {
|
||||
|
@ -470,7 +470,7 @@ class ProductController extends BaseController
|
||||
|
||||
$ids = request()->input('ids');
|
||||
|
||||
$products = Product::withTrashed()->find($this->transformKeys($ids));
|
||||
$products = Product::withTrashed()->whereIn('id', $this->transformKeys($ids))->cursor();
|
||||
|
||||
$products->each(function ($product, $key) use ($action) {
|
||||
if (auth()->user()->can('edit', $product)) {
|
||||
|
Loading…
Reference in New Issue
Block a user