mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Refactor PDF Service
This commit is contained in:
parent
20097b4fa8
commit
0d0c80b7d1
@ -61,8 +61,6 @@ class PdfService
|
|||||||
|
|
||||||
$this->account = $this->company->account;
|
$this->account = $this->company->account;
|
||||||
|
|
||||||
$this->config = (new PdfConfiguration($this))->init();
|
|
||||||
|
|
||||||
$this->document_type = $document_type;
|
$this->document_type = $document_type;
|
||||||
|
|
||||||
$this->options = $options;
|
$this->options = $options;
|
||||||
@ -122,6 +120,9 @@ class PdfService
|
|||||||
public function init(): self
|
public function init(): self
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$this->config = (new PdfConfiguration($this))->init();
|
||||||
|
|
||||||
|
|
||||||
$this->html_variables = $this->config->client ?
|
$this->html_variables = $this->config->client ?
|
||||||
(new HtmlEngine($this->invitation))->generateLabelsAndValues() :
|
(new HtmlEngine($this->invitation))->generateLabelsAndValues() :
|
||||||
(new VendorHtmlEngine($this->invitation))->generateLabelsAndValues();
|
(new VendorHtmlEngine($this->invitation))->generateLabelsAndValues();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user