Minor cleanup

This commit is contained in:
David Bomba 2023-01-08 15:42:44 +11:00
parent 174d0d3338
commit ea9a3f4ca3
3 changed files with 6 additions and 20 deletions

View File

@ -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();

View File

@ -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 = [];

View File

@ -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()