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

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