diff --git a/app/Jobs/Invoice/CreateInvoicePdf.php b/app/Jobs/Invoice/CreateInvoicePdf.php index acc644594a98..f7632d322c95 100644 --- a/app/Jobs/Invoice/CreateInvoicePdf.php +++ b/app/Jobs/Invoice/CreateInvoicePdf.php @@ -71,6 +71,7 @@ class CreateInvoicePdf implements ShouldQueue public function handle() { + if (config('ninja.phantomjs_key')) { return (new Phantom)->generate($this->invitation); } @@ -111,8 +112,6 @@ class CreateInvoicePdf implements ShouldQueue //todo - move this to the client creation stage so we don't keep hitting this unnecessarily Storage::makeDirectory($path, 0775); - //info($maker->getCompiledHTML(true)); - $pdf = $this->makePdf(null, null, $maker->getCompiledHTML(true)); $instance = Storage::disk($this->disk)->put($file_path, $pdf); diff --git a/app/Services/Payment/UpdateInvoicePayment.php b/app/Services/Payment/UpdateInvoicePayment.php index 60eaeb686c8c..41bfb41e3ee6 100644 --- a/app/Services/Payment/UpdateInvoicePayment.php +++ b/app/Services/Payment/UpdateInvoicePayment.php @@ -75,9 +75,8 @@ class UpdateInvoicePayment ->updateBalance($paid_amount * -1) ->save(); - info("firing invoice was updated event"); event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars())); - info("fired invoice was updated event"); + }); return $this->payment;