Fix #180 - No Company logo breaks Invoice/Quotes

This commit is contained in:
johnny@pittpc.com
2021-03-27 16:07:42 -04:00
parent cd2ea38c5b
commit 8b1e374148
4 changed files with 23 additions and 8 deletions

View File

@@ -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: [
<?php if(!empty($company_logo_base64)){ ?>
{
image: '<?php echo "data:image;base64,$company_logo_base64"; ?>',
width: 120
},
<?php } ?>
[
{
@@ -609,4 +613,4 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
echo "GTFO";
} ?>
<?php include("guest_footer.php");
<?php include("guest_footer.php");