1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00

Fixes for invoices

This commit is contained in:
David Bomba 2020-09-10 15:20:13 +10:00
parent 9beafcd73b
commit f7dc573551
2 changed files with 2 additions and 4 deletions

View File

@ -71,6 +71,7 @@ class CreateInvoicePdf implements ShouldQueue
public function handle() public function handle()
{ {
if (config('ninja.phantomjs_key')) { if (config('ninja.phantomjs_key')) {
return (new Phantom)->generate($this->invitation); 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 //todo - move this to the client creation stage so we don't keep hitting this unnecessarily
Storage::makeDirectory($path, 0775); Storage::makeDirectory($path, 0775);
//info($maker->getCompiledHTML(true));
$pdf = $this->makePdf(null, null, $maker->getCompiledHTML(true)); $pdf = $this->makePdf(null, null, $maker->getCompiledHTML(true));
$instance = Storage::disk($this->disk)->put($file_path, $pdf); $instance = Storage::disk($this->disk)->put($file_path, $pdf);

View File

@ -75,9 +75,8 @@ class UpdateInvoicePayment
->updateBalance($paid_amount * -1) ->updateBalance($paid_amount * -1)
->save(); ->save();
info("firing invoice was updated event");
event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars())); event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars()));
info("fired invoice was updated event");
}); });
return $this->payment; return $this->payment;