1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 06:32:40 +01:00

Merge pull request #6257 from turbo124/v5-develop

Minor fixes for product and client bulk actions
This commit is contained in:
David Bomba 2021-07-13 19:27:44 +10:00 committed by GitHub
commit 474e7c1075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -510,7 +510,7 @@ class ClientController extends BaseController
$action = request()->input('action'); $action = request()->input('action');
$ids = request()->input('ids'); $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) { $clients->each(function ($client, $key) use ($action) {
if (auth()->user()->can('edit', $client)) { if (auth()->user()->can('edit', $client)) {

View File

@ -470,7 +470,7 @@ class ProductController extends BaseController
$ids = request()->input('ids'); $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) { $products->each(function ($product, $key) use ($action) {
if (auth()->user()->can('edit', $product)) { if (auth()->user()->can('edit', $product)) {