1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fix for invoice design not changing dynamically (#3666)

This commit is contained in:
David Bomba 2020-05-01 22:43:08 +10:00 committed by GitHub
parent 4d2e4733c6
commit e204eedaa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View File

@ -75,7 +75,9 @@ class CreateCreditPdf implements ShouldQueue
$file_path = $path . $this->credit->number . '.pdf';
$design = Design::find($this->decodePrimaryKey($this->credit->client->getSetting('credit_design_id')));
$credit_design_id = $this->credit->design_id ? $this->credit->design_id : $this->decodePrimaryKey($this->credit->client->getSetting('credit_design_id'));
$design = Design::find($credit_design_id);
$designer = new Designer($this->credit, $design, $this->credit->client->getSetting('pdf_variables'), 'credit');

View File

@ -72,8 +72,10 @@ class CreateInvoicePdf implements ShouldQueue
$path = $this->invoice->client->invoice_filepath();
$file_path = $path . $this->invoice->number . '.pdf';
$design = Design::find($this->decodePrimaryKey($this->invoice->client->getSetting('invoice_design_id')));
$invoice_design_id = $this->invoice->design_id ? $this->invoice->design_id : $this->decodePrimaryKey($this->invoice->client->getSetting('invoice_design_id'));
$design = Design::find($invoice_design_id);
$designer = new Designer($this->invoice, $design, $this->invoice->client->getSetting('pdf_variables'), 'invoice');

View File

@ -73,7 +73,9 @@ class CreateQuotePdf implements ShouldQueue
$path = $this->quote->client->quote_filepath();
$design = Design::find($this->decodePrimaryKey($this->quote->client->getSetting('quote_design_id')));
$quote_design_id = $this->quote->design_id ? $this->quote->design_id : $this->decodePrimaryKey($this->quote->client->getSetting('quote_design_id'));
$design = Design::find($quote_design_id);
$designer = new Designer($this->quote, $design, $this->quote->client->getSetting('pdf_variables'), 'quote');