Update invoice-print.tpl
Change print template design
This commit is contained in:
parent
d2db2bef79
commit
2771eba0ee
@ -1,13 +1,117 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>{$_title}</title>
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>{$_title}</title>
|
||||||
<link href="ui/ui/styles/bootstrap.min.css" rel="stylesheet">
|
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="ui/ui/images/favicon.ico">
|
<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">
|
<script type="text/javascript">
|
||||||
function printpage() {
|
function printpage() {
|
||||||
window.print();
|
window.print();
|
||||||
@ -15,58 +119,72 @@
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body topmargin="0" leftmargin="0" {if !$nuxprint} onload="printpage()" {/if}>
|
<body {if !$nuxprint} onload="printpage()" {/if}>
|
||||||
<div class="row">
|
<div class="container">
|
||||||
<div class="col-md-6">
|
<div class="invoice">
|
||||||
<table width="200">
|
<div class="header">
|
||||||
<tr>
|
<h1>{Lang::pad($_c['CompanyName'], ' ', 2)}</h1>
|
||||||
<td>
|
<p>{Lang::pad($_c['address'], ' ', 2)} | {Lang::pad($_c['phone'], ' ', 2)}</p>
|
||||||
{if $content}
|
</div>
|
||||||
<pre style="border-style: none; background-color: white;">{$content}</pre>{else}
|
<div class="details">
|
||||||
<pre style="border-style: none; background-color: white;"><b>{Lang::pad($_c['CompanyName'],' ', 2)}</b>
|
<div><strong>{Lang::pad(Lang::T('Invoice'), ' ', 2)}:</strong> {$in['invoice']}</div>
|
||||||
{Lang::pad($_c['address'],' ', 2)}
|
<div><strong>{Lang::pad(Lang::T('Date'), ' ', 2)}:</strong> {$date}</div>
|
||||||
{Lang::pad($_c['phone'],' ', 2)}
|
<div><strong>{Lang::pad(Lang::T('Sales'), ' ', 2)}:</strong> {Lang::pad($_admin['fullname'], ' ', 2)}</div>
|
||||||
{Lang::pad("", '=')}
|
</div>
|
||||||
{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)}
|
|
||||||
|
|
||||||
{Lang::pads(Lang::T('Username'), $in['username'], ' ')}
|
<table class="invoice-info">
|
||||||
{Lang::pads(Lang::T('Password'), '**********', ' ')}
|
<tr>
|
||||||
{if $in['type'] != 'Balance'}
|
<th>{Lang::pad(Lang::T('Type'), ' ', 2)}</th>
|
||||||
{Lang::pads(Lang::T('Created On'), Lang::dateAndTimeFormat($in['recharged_on'],$in['recharged_time']), ' ')}
|
<td>{$in['type']}</td>
|
||||||
{Lang::pads(Lang::T('Expires On'), Lang::dateAndTimeFormat($in['expiration'],$in['time']), ' ')}
|
</tr>
|
||||||
{/if}
|
<tr>
|
||||||
{Lang::pad("", '=')}
|
<th>{Lang::pad(Lang::T('Package Name'), ' ', 2)}</th>
|
||||||
{Lang::pad($_c['note'],' ', 2)}</pre>
|
<td>{$in['plan_name']}</td>
|
||||||
{/if}
|
</tr>
|
||||||
</td>
|
<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>
|
</tr>
|
||||||
</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>
|
|
||||||
</a>
|
|
||||||
<br>
|
|
||||||
<iframe src="{$nuxprint}" style="height: 2px;"><iframe>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="ui/ui/scripts/jquery.min.js"></script>
|
<script src="ui/ui/scripts/jquery.min.js"></script>
|
||||||
<script src="ui/ui/scripts/bootstrap.min.js"></script>
|
<script src="ui/ui/scripts/bootstrap.min.js"></script>
|
||||||
{if isset($xfooter)}
|
{if isset($xfooter)} {$xfooter} {/if}
|
||||||
{$xfooter}
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user