mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Rename all_page_* to all_pages_* for dynamic header/footer
This commit is contained in:
parent
c893a547ef
commit
af7995815c
@ -99,6 +99,10 @@ class CreateInvoicePdf implements ShouldQueue
|
||||
'product-table-columns' => $pdf_variables['product_columns'],
|
||||
]),
|
||||
'variables' => $html->generateLabelsAndValues(),
|
||||
'options' => [
|
||||
'all_pages_header' => $this->invoice->client->getSetting('all_pages_header'),
|
||||
'all_pages_footer' => $this->invoice->client->getSetting('all_pages_footer'),
|
||||
],
|
||||
];
|
||||
|
||||
$maker = new PdfMakerService($state);
|
||||
@ -110,6 +114,8 @@ 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());
|
||||
|
||||
$pdf = $this->makePdf(null, null, $maker->getCompiledHTML());
|
||||
|
||||
$instance = Storage::disk($this->disk)->put($file_path, $pdf);
|
||||
|
@ -97,6 +97,10 @@ class CreateQuotePdf implements ShouldQueue
|
||||
'product-table-columns' => $pdf_variables['product_columns'],
|
||||
]),
|
||||
'variables' => $html->generateLabelsAndValues(),
|
||||
'options' => [
|
||||
'all_pages_header' => $this->invoice->client->getSetting('all_pages_header'),
|
||||
'all_pages_footer' => $this->invoice->client->getSetting('all_pages_footer'),
|
||||
],
|
||||
];
|
||||
|
||||
$maker = new PdfMakerService($state);
|
||||
|
@ -156,7 +156,7 @@ trait PdfMakerUtilities
|
||||
|
||||
public function processOptions()
|
||||
{
|
||||
if (!isset($this->options['all_page_header']) && !isset($this->options['all_page_footer'])) {
|
||||
if (!isset($this->options['all_pages_header']) && !isset($this->options['all_pages_footer'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -260,8 +260,8 @@ trait PdfMakerUtilities
|
||||
|
||||
if (
|
||||
$header = $this->document->getElementById('header') &&
|
||||
isset($this->data['options']['all_page_header']) &&
|
||||
$this->data['options']['all_page_header']
|
||||
isset($this->data['options']['all_pages_header']) &&
|
||||
$this->data['options']['all_pages_header']
|
||||
) {
|
||||
|
||||
$header = $this->document->getElementById('header');
|
||||
@ -273,8 +273,8 @@ trait PdfMakerUtilities
|
||||
|
||||
if (
|
||||
$footer = $this->document->getElementById('footer') &&
|
||||
isset($this->data['options']['all_page_footer']) &&
|
||||
$this->data['options']['all_page_footer']
|
||||
isset($this->data['options']['all_pages_footer']) &&
|
||||
$this->data['options']['all_pages_footer']
|
||||
) {
|
||||
$footer = $this->document->getElementById('footer');
|
||||
$clone = $footer->cloneNode(true);
|
||||
|
@ -357,7 +357,7 @@ class PdfMakerTest extends TestCase
|
||||
'values' => [],
|
||||
],
|
||||
'options' => [
|
||||
'all_page_footer' => true,
|
||||
'all_pages_footer' => true,
|
||||
],
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user