diff --git a/app/Jobs/Entity/CreateEntityPdf.php b/app/Jobs/Entity/CreateEntityPdf.php index 60ec71508a04..2f7d59983223 100644 --- a/app/Jobs/Entity/CreateEntityPdf.php +++ b/app/Jobs/Entity/CreateEntityPdf.php @@ -95,22 +95,6 @@ class CreateEntityPdf implements ShouldQueue } $file_path = $path.$this->entity->numberFormatter().'.pdf'; - - // $state = [ - // 'template' => $template->elements([ - // 'client' => $this->client, - // 'entity' => $this->entity, - // 'pdf_variables' => (array) $this->company->settings->pdf_variables, - // '$product' => $design->design->product, - // 'variables' => $variables, - // ]), - // 'variables' => $variables, - // 'options' => [ - // 'all_pages_header' => $this->entity->client->getSetting('all_pages_header'), - // 'all_pages_footer' => $this->entity->client->getSetting('all_pages_footer'), - // ], - // 'process_markdown' => $this->entity->client->company->markdown_enabled, - // ]; $pdf = (new PdfService($this->invitation))->getPdf(); diff --git a/app/Services/Pdf/PdfBuilder.php b/app/Services/Pdf/PdfBuilder.php index 0179456581a8..8992d72133bf 100644 --- a/app/Services/Pdf/PdfBuilder.php +++ b/app/Services/Pdf/PdfBuilder.php @@ -81,7 +81,7 @@ class PdfBuilder * Final method to get compiled HTML. * * @param bool $final @deprecated // is it? i still see it being called elsewhere - * @return mixed + * @return string */ public function getCompiledHTML($final = false) { @@ -655,7 +655,6 @@ class PdfBuilder public function buildTableHeader(string $type): array { $this->processTaxColumns($type); - // $this->processCustomColumns($type); $elements = []; diff --git a/app/Services/Pdf/PdfService.php b/app/Services/Pdf/PdfService.php index 7ee6c2511ee9..881757f1f21a 100644 --- a/app/Services/Pdf/PdfService.php +++ b/app/Services/Pdf/PdfService.php @@ -13,6 +13,9 @@ namespace App\Services\Pdf; use App\Models\Account; use App\Models\Company; +use App\Models\CreditInvitation; +use App\Models\InvoiceInvitation; +use App\Models\QuoteInvitation; use App\Services\Pdf\PdfConfiguration; use App\Utils\HostedPDF\NinjaPdf; use App\Utils\HtmlEngine; @@ -25,7 +28,7 @@ class PdfService use PdfMaker, PageNumbering; - public $invitation; + public InvoiceInvitation | QuoteInvitation | CreditInvitation $invitation; public Company $company; @@ -76,7 +79,7 @@ class PdfService * attempts to generate a PDF from the HTML * string. * - * @return mixed + * @return mixed | Exception * */ public function getPdf()