From eb34cf7917e64dea858b817c8afa1b181ecc3cb5 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 31 May 2022 15:59:01 -0500 Subject: [PATCH] Evaluates if logo is uploaded before export PDF --- app/Http/Controllers/Account/AcceptanceController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.php index a40a58634f..685b5a9654 100644 --- a/app/Http/Controllers/Account/AcceptanceController.php +++ b/app/Http/Controllers/Account/AcceptanceController.php @@ -152,6 +152,13 @@ class AcceptanceController extends Controller * since we want the moment-in-time proof of what the EULA was when they accepted it. */ $branding_settings = SettingsController::getPDFBranding(); + + if (is_null($branding_settings->logo)){ + $path_logo = ""; + } else { + $path_logo = public_path() . '/uploads/' . $branding_settings->logo; + } + $data = [ 'item_tag' => $item->asset_tag, 'item_model' => $display_model, @@ -162,7 +169,7 @@ class AcceptanceController extends Controller 'assigned_to' => $assigned_to, 'company_name' => $branding_settings->site_name, 'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null, - 'logo' => public_path() . '/uploads/' . $branding_settings->logo, + 'logo' => $path_logo, 'date_settings' => $branding_settings->date_display_format, ];