diff --git a/guest_view_invoice.php b/guest_view_invoice.php index 5c0444ba..0f2fde85 100644 --- a/guest_view_invoice.php +++ b/guest_view_invoice.php @@ -61,7 +61,9 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ } $company_email = $row['company_email']; $company_logo = $row['company_logo']; - $company_logo_base64 = base64_encode(file_get_contents($row['company_logo'])); + if(!empty($company_logo)){ + $company_logo_base64 = base64_encode(file_get_contents($row['company_logo'])); + } $config_invoice_footer = $row['config_invoice_footer']; $config_stripe_enable = $row['config_stripe_enable']; $config_stripe_publishable = $row['config_stripe_publishable']; @@ -533,10 +535,12 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ // Header { columns: [ + { image: '', width: 120 }, + [ { @@ -911,4 +915,4 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ } ?> - \ No newline at end of file + diff --git a/guest_view_quote.php b/guest_view_quote.php index 2d09c7b2..e532b16c 100644 --- a/guest_view_quote.php +++ b/guest_view_quote.php @@ -60,7 +60,9 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){ } $company_email = $row['company_email']; $company_logo = $row['company_logo']; - $company_logo_base64 = base64_encode(file_get_contents($row['company_logo'])); + if(!empty($company_logo)){ + $company_logo_base64 = base64_encode(file_get_contents($row['company_logo'])); + } $quote_footer = $row['quote_footer']; $ip = get_ip(); @@ -279,10 +281,12 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){ // Header { columns: [ + { image: '', width: 120 }, + [ { @@ -609,4 +613,4 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){ echo "GTFO"; } ?> - { image: '', width: 120 }, + [ { diff --git a/quote.php b/quote.php index 9e46e13a..bab0dbec 100644 --- a/quote.php +++ b/quote.php @@ -60,7 +60,9 @@ if(isset($_GET['quote_id'])){ $company_email = $row['company_email']; $company_website = $row['company_website']; $company_logo = $row['company_logo']; - $company_logo_base64 = base64_encode(file_get_contents($row['company_logo'])); + if(!empty($company_logo)){ + $company_logo_base64 = base64_encode(file_get_contents($row['company_logo'])); + } $sql_history = mysqli_query($mysqli,"SELECT * FROM history WHERE quote_id = $quote_id ORDER BY history_id DESC"); @@ -418,11 +420,13 @@ var docDefinition = { // Header { columns: [ + { image: '', width: 120 }, - + + [ { text: 'QUOTE',