From 48c20b35b8b2769aded4ed94fafab6721e78c7d1 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 30 Jun 2023 10:38:59 +1000 Subject: [PATCH] Fixes for pdf viewer --- app/Models/Invoice.php | 2 +- app/Services/PurchaseOrder/GetPurchaseOrderPdf.php | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index e4d09b6a24b4..a10fff5f7931 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -683,7 +683,7 @@ class Invoice extends BaseModel } public function pdf_file_path($invitation = null, string $type = 'path', bool $portal = false) - {return "data:application/pdf;base64,".base64_encode((new CreateRawPdf($invitation, $invitation->company->db))->handle()); + { if (! $invitation) { if ($this->invitations()->exists()) { diff --git a/app/Services/PurchaseOrder/GetPurchaseOrderPdf.php b/app/Services/PurchaseOrder/GetPurchaseOrderPdf.php index bccb238bf9a7..40044b90b6e5 100644 --- a/app/Services/PurchaseOrder/GetPurchaseOrderPdf.php +++ b/app/Services/PurchaseOrder/GetPurchaseOrderPdf.php @@ -21,9 +21,6 @@ class GetPurchaseOrderPdf extends AbstractService { public function __construct(public PurchaseOrder $purchase_order, public ?VendorContact $contact = null) { - $this->purchase_order = $purchase_order; - - $this->contact = $contact; } public function run()