Update invoice-print.tpl
Change print template design
This commit is contained in:
parent
d2db2bef79
commit
2771eba0ee
@ -1,13 +1,117 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>{$_title}</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link href="ui/ui/styles/bootstrap.min.css" rel="stylesheet">
|
||||
<title>{$_title}</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="ui/ui/images/favicon.ico">
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f8f9fa;
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.invoice {
|
||||
width: 100%;
|
||||
max-width: 70mm; /* Maximum width for thermal printing */
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 10px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.details {
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 2px solid #0056b3;
|
||||
padding-bottom: 5px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.details div {
|
||||
margin: 5px 0;
|
||||
font-weight: bold; /* Bold text for details */
|
||||
color: black; /* Ensure text is black */
|
||||
}
|
||||
|
||||
.invoice-info {
|
||||
margin: 10px 0;
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.invoice-info th,
|
||||
.invoice-info td {
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
color: black; /* Ensure text is black */
|
||||
font-weight: bold; /* Bold text for table content */
|
||||
}
|
||||
|
||||
.invoice-info th {
|
||||
background-color: #0056b3;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 10px;
|
||||
text-align: left; /* Align footer text to left */
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.invoice {
|
||||
width: 70mm; /* Fixed width for thermal printer */
|
||||
padding: 5px; /* Reduced padding for print */
|
||||
box-shadow: none; /* Remove shadow for clearer print */
|
||||
border: none; /* Remove border for print */
|
||||
}
|
||||
|
||||
.details {
|
||||
margin-bottom: 5px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.invoice-info {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.invoice-info th,
|
||||
.invoice-info td {
|
||||
padding: 5px; /* Reduced padding */
|
||||
text-align: left;
|
||||
font-weight: bold; /* Bold text for print */
|
||||
color: black; /* Ensure text is black */
|
||||
border: none; /* Remove borders for print */
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 1px solid #000; /* Darker line for print */
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: none; /* Hide buttons when printing */
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function printpage() {
|
||||
window.print();
|
||||
@ -15,58 +119,72 @@
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body topmargin="0" leftmargin="0" {if !$nuxprint} onload="printpage()" {/if}>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<table width="200">
|
||||
<tr>
|
||||
<td>
|
||||
{if $content}
|
||||
<pre style="border-style: none; background-color: white;">{$content}</pre>{else}
|
||||
<pre style="border-style: none; background-color: white;"><b>{Lang::pad($_c['CompanyName'],' ', 2)}</b>
|
||||
{Lang::pad($_c['address'],' ', 2)}
|
||||
{Lang::pad($_c['phone'],' ', 2)}
|
||||
{Lang::pad("", '=')}
|
||||
{Lang::pads("Invoice", $in['invoice'], ' ')}
|
||||
{Lang::pads(Lang::T('Date'), $date, ' ')}
|
||||
{Lang::pads(Lang::T('Sales'), $_admin['fullname'], ' ')}
|
||||
{Lang::pad("", '=')}
|
||||
{Lang::pads(Lang::T('Type'), $in['type'], ' ')}
|
||||
{Lang::pads(Lang::T('Package Name'), $in['plan_name'], ' ')}
|
||||
{Lang::pads(Lang::T('Package Price'), Lang::moneyFormat($in['price']), ' ')}
|
||||
{Lang::pad($in['method'], ' ', 2)}
|
||||
<body {if !$nuxprint} onload="printpage()" {/if}>
|
||||
<div class="container">
|
||||
<div class="invoice">
|
||||
<div class="header">
|
||||
<h1>{Lang::pad($_c['CompanyName'], ' ', 2)}</h1>
|
||||
<p>{Lang::pad($_c['address'], ' ', 2)} | {Lang::pad($_c['phone'], ' ', 2)}</p>
|
||||
</div>
|
||||
<div class="details">
|
||||
<div><strong>{Lang::pad(Lang::T('Invoice'), ' ', 2)}:</strong> {$in['invoice']}</div>
|
||||
<div><strong>{Lang::pad(Lang::T('Date'), ' ', 2)}:</strong> {$date}</div>
|
||||
<div><strong>{Lang::pad(Lang::T('Sales'), ' ', 2)}:</strong> {Lang::pad($_admin['fullname'], ' ', 2)}</div>
|
||||
</div>
|
||||
|
||||
{Lang::pads(Lang::T('Username'), $in['username'], ' ')}
|
||||
{Lang::pads(Lang::T('Password'), '**********', ' ')}
|
||||
{if $in['type'] != 'Balance'}
|
||||
{Lang::pads(Lang::T('Created On'), Lang::dateAndTimeFormat($in['recharged_on'],$in['recharged_time']), ' ')}
|
||||
{Lang::pads(Lang::T('Expires On'), Lang::dateAndTimeFormat($in['expiration'],$in['time']), ' ')}
|
||||
{/if}
|
||||
{Lang::pad("", '=')}
|
||||
{Lang::pad($_c['note'],' ', 2)}</pre>
|
||||
{/if}
|
||||
</td>
|
||||
<table class="invoice-info">
|
||||
<tr>
|
||||
<th>{Lang::pad(Lang::T('Type'), ' ', 2)}</th>
|
||||
<td>{$in['type']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{Lang::pad(Lang::T('Package Name'), ' ', 2)}</th>
|
||||
<td>{$in['plan_name']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{Lang::pad(Lang::T('Package Price'), ' ', 2)}</th>
|
||||
<td>{Lang::moneyFormat($in['price'])}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{Lang::pad(Lang::T('Username'), ' ', 2)}</th>
|
||||
<td>{$in['username']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{Lang::pad(Lang::T('Password'), ' ', 2)}</th>
|
||||
<td>**********</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{Lang::pad(Lang::T('Payment Method'), ' ', 2)}</th>
|
||||
<td>{$in['method']}</td>
|
||||
</tr>
|
||||
{if $in['type'] != 'Balance'}
|
||||
<tr>
|
||||
<th>{Lang::pad(Lang::T('Created On'), ' ', 2)}</th>
|
||||
<td>{Lang::dateAndTimeFormat($in['recharged_on'], $in['recharged_time'])}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{Lang::pad(Lang::T('Expires On'), ' ', 2)}</th>
|
||||
<td>{Lang::dateAndTimeFormat($in['expiration'], $in['time'])}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
{if $nuxprint}
|
||||
<a href="{$nuxprint}" class="btn btn-success text-black btn-sm" name="nux" value="print">
|
||||
<i class="glyphicon glyphicon-print"></i>
|
||||
Nux Print
|
||||
<i class="glyphicon glyphicon-phone"></i>
|
||||
|
||||
<hr style="border: 2px solid #0056b3; margin-top: 10px;">
|
||||
|
||||
<div class="footer">
|
||||
<p>{Lang::pad($_c['note'], ' ', 2)}</p>
|
||||
{if $nuxprint}
|
||||
<a href="{$nuxprint}" class="btn btn-success" name="nux" value="print">
|
||||
<i class="glyphicon glyphicon-print"></i> Nux Print
|
||||
</a>
|
||||
<br>
|
||||
<iframe src="{$nuxprint}" style="height: 2px;"><iframe>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="ui/ui/scripts/jquery.min.js"></script>
|
||||
<script src="ui/ui/scripts/bootstrap.min.js"></script>
|
||||
{if isset($xfooter)}
|
||||
{$xfooter}
|
||||
{/if}
|
||||
|
||||
|
||||
{if isset($xfooter)} {$xfooter} {/if}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user