diff --git a/app/Http/Controllers/CreditController.php b/app/Http/Controllers/CreditController.php index 30104c8c9fd3..4db5c835a8ec 100644 --- a/app/Http/Controllers/CreditController.php +++ b/app/Http/Controllers/CreditController.php @@ -535,7 +535,7 @@ class CreditController extends BaseController return response()->json(['message' => ctrans('texts.sent_message')], 200); } - if($action == 'merge' && auth()->user()->can('view', $credits->first())){ + if($action == 'bulk_print' && auth()->user()->can('view', $credits->first())){ $paths = $credits->map(function ($credit){ return $credit->service()->getCreditPdf($credit->invitations->first()); diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 8e61ae7fdbf9..bea85e642f30 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -589,7 +589,7 @@ class InvoiceController extends BaseController } - if($action == 'merge' && auth()->user()->can('view', $invoices->first())){ + if($action == 'bulk_print' && auth()->user()->can('view', $invoices->first())){ $paths = $invoices->map(function ($invoice){ return $invoice->service()->getInvoicePdf(); diff --git a/app/Http/Controllers/PurchaseOrderController.php b/app/Http/Controllers/PurchaseOrderController.php index e417027f1b31..47cbcd68aeec 100644 --- a/app/Http/Controllers/PurchaseOrderController.php +++ b/app/Http/Controllers/PurchaseOrderController.php @@ -516,7 +516,7 @@ class PurchaseOrderController extends BaseController return response()->json(['message' => ctrans('texts.sent_message')], 200); } - if($action == 'merge' && auth()->user()->can('view', $purchase_orders->first())){ + if($action == 'bulk_print' && auth()->user()->can('view', $purchase_orders->first())){ $paths = $purchase_orders->map(function ($purchase_order){ return $purchase_order->service()->getPurchaseOrderPdf(); diff --git a/app/Http/Controllers/QuoteController.php b/app/Http/Controllers/QuoteController.php index fc8f6319329c..72de83134aba 100644 --- a/app/Http/Controllers/QuoteController.php +++ b/app/Http/Controllers/QuoteController.php @@ -562,7 +562,7 @@ class QuoteController extends BaseController return $this->listResponse(Quote::withTrashed()->whereIn('id', $this->transformKeys($ids))->company()); } - if($action == 'merge' && auth()->user()->can('view', $quotes->first())){ + if($action == 'bulk_print' && auth()->user()->can('view', $quotes->first())){ $paths = $quotes->map(function ($quote){ return $quote->service()->getQuotePdf();