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:
commit
474e7c1075
@ -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)) {
|
||||||
|
@ -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)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user