diff --git a/app/Services/Pdf/PdfService.php b/app/Services/Pdf/PdfService.php index 46c6c0b8e49f..ee33da426fef 100644 --- a/app/Services/Pdf/PdfService.php +++ b/app/Services/Pdf/PdfService.php @@ -61,8 +61,6 @@ class PdfService $this->account = $this->company->account; - $this->config = (new PdfConfiguration($this))->init(); - $this->document_type = $document_type; $this->options = $options; @@ -122,6 +120,9 @@ class PdfService public function init(): self { + $this->config = (new PdfConfiguration($this))->init(); + + $this->html_variables = $this->config->client ? (new HtmlEngine($this->invitation))->generateLabelsAndValues() : (new VendorHtmlEngine($this->invitation))->generateLabelsAndValues();