diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index e99929a25349..a04392dd6a12 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -522,9 +522,6 @@ class InvoiceController extends BaseController $ids = request()->input('ids'); -nlog($action); -nlog($ids); - $invoices = Invoice::withTrashed()->whereIn('id', $this->transformKeys($ids))->company()->get(); if (! $invoices) { @@ -542,7 +539,7 @@ nlog($ids); return response()->json(['message' => ctrans('text.access_denied')]); } }); -nlog("bulky"); + ZipInvoices::dispatch($invoices, $invoices->first()->company, auth()->user()); return response()->json(['message' => ctrans('texts.sent_message')], 200); diff --git a/app/Jobs/Invoice/ZipInvoices.php b/app/Jobs/Invoice/ZipInvoices.php index a38d90a087cd..0dff22aa35c8 100644 --- a/app/Jobs/Invoice/ZipInvoices.php +++ b/app/Jobs/Invoice/ZipInvoices.php @@ -70,7 +70,7 @@ class ZipInvoices implements ShouldQueue */ public function handle() - {nlog("bulky"); + { # create new zip object $zip = new ZipArchive();