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:
parent
4d2e4733c6
commit
e204eedaa2
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user