diff --git a/system/controllers/plan.php b/system/controllers/plan.php
index 09fff6d3..a023f357 100644
--- a/system/controllers/plan.php
+++ b/system/controllers/plan.php
@@ -269,6 +269,17 @@ switch ($action) {
r2(getUrl('plan/view/') . $id, 'd', "Customer not found");
}
Package::createInvoice($in);
+ $UPLOAD_URL_PATH = str_replace($root_path, '', $UPLOAD_PATH);
+ $logo = '';
+ if (file_exists($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo.png')) {
+ $logo = $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'logo.png';
+ $imgsize = getimagesize($logo);
+ $width = $imgsize[0];
+ $height = $imgsize[1];
+ $ui->assign('wlogo', $width);
+ $ui->assign('hlogo', $height);
+ }
+ $ui->assign('logo', $logo);
$ui->assign('_title', 'View Invoice');
$ui->display('admin/plan/invoice.tpl');
break;
diff --git a/ui/ui/admin/plan/invoice.tpl b/ui/ui/admin/plan/invoice.tpl
index ad082ff0..47afd2f6 100644
--- a/ui/ui/admin/plan/invoice.tpl
+++ b/ui/ui/admin/plan/invoice.tpl
@@ -1,16 +1,22 @@
{include file="sections/header.tpl"}
-
+
{$in['invoice']}
+ {if !empty($logo)}
+

+ {/if}
-
diff --git a/ui/ui/customer/invoice-customer.tpl b/ui/ui/customer/invoice-customer.tpl
index 01cdafc1..48696d53 100644
--- a/ui/ui/customer/invoice-customer.tpl
+++ b/ui/ui/customer/invoice-customer.tpl
@@ -14,7 +14,7 @@
{Lang::T('Finish')}
-
+
Download
WhatsApp
@@ -30,12 +30,11 @@
var text = document.getElementById("content").innerHTML;
var lines = text.split(/\r\n|\r|\n/).length;
var meas = ctx.measureText("A");
- let width = Math.round({$_c['printer_cols']} * 9.6); //Math.round(meas.width * {$_c['printer_cols']});
- var height = Math.round((14 *
- lines)); //.round((meas.actualBoundingBoxAscent + meas.actualBoundingBoxDescent) * lines);
+ let width = Math.round({$_c['printer_cols']} * 9.6);
+ var height = Math.round((14 * lines));
console.log(width, height, lines);
var paid = new Image();
- paid.src = '{$app_url}/system/uploads/pasid.png';
+ paid.src = '{$app_url}/system/uploads/paid.png';
{if !empty($logo)}
var img = new Image();
img.src = '{$app_url}/{$logo}';