2017-03-15 02:37:15 +07:00
<!DOCTYPE html>
<html>
2023-09-18 15:03:25 +07:00
2017-03-15 02:37:15 +07:00
<head>
<title> { $_title } </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2022-09-17 21:05:24 +07:00
<link rel="shortcut icon" type="image/x-icon" href="ui/ui/images/favicon.ico">
2017-03-15 02:37:15 +07:00
<style>
2023-09-18 15:03:25 +07:00
.ukuran {
size: A4;
}
2024-12-30 22:49:46 +01:00
2023-09-18 15:03:25 +07:00
body,
td,
th {
font-size: 12px;
font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
2017-03-15 02:37:15 +07:00
}
2024-12-30 22:49:46 +01:00
2017-03-15 02:37:15 +07:00
page[size="A4"] {
2023-09-18 15:03:25 +07:00
background: white;
width: 21cm;
height: 29.7cm;
display: block;
margin: 0 auto;
margin-bottom: 0.5cm;
html,
body {
width: 210mm;
height: 297mm;
}
2017-03-15 02:37:15 +07:00
}
2024-12-30 22:49:46 +01:00
2023-09-18 15:03:25 +07:00
@media print {
body {
size: auto;
margin: 0;
box-shadow: 0;
}
page[size="A4"] {
margin: 0;
size: auto;
box-shadow: 0;
}
.page-break {
display: block;
page-break-before: always;
}
.no-print,
.no-print * {
display: none !important;
}
2017-03-15 02:37:15 +07:00
}
</style>
</head>
<body>
2023-09-18 15:03:25 +07:00
<page size="A4">
2024-03-16 20:40:29 +07:00
<form method="post" action=" { $_url } plan/print-voucher/" class="no-print">
2023-09-18 15:03:25 +07:00
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="btn btn-default btn-sm">
<tr>
2023-10-18 17:24:00 +07:00
<td>From ID > <input type="text" name="from_id" style="width:40px" value=" { $from_id } "> limit
<input type="text" name="limit" style="width:40px" value=" { $limit } "></td>
2024-12-30 22:49:46 +01:00
<td>Voucher PerLine <input type="text" style="width:40px" name="vpl" value=" { $vpl } "> vouchers
</td>
<td>PageBreak after <input type="text" style="width:40px" name="pagebreak" value=" { $pagebreak } "> vouchers
</td>
2023-10-18 17:24:00 +07:00
<td>Plans <select id="plan_id" name="planid" style="width:50px">
2023-09-18 15:03:25 +07:00
<option value="0">--all--</option>
{ foreach $plans as $plan }
<option value=" { $plan [ 'id' ] } " { if $plan [ 'id' ] = = $planid } selected { /if } > { $plan [ 'name_plan' ] }
</option>
{ /foreach }
2024-12-20 16:48:06 +07:00
</select></td>
2024-12-30 22:49:46 +01:00
<td>Date <select id="selected_datetime" name="selected_datetime" style="width:50px">
2024-12-20 16:48:06 +07:00
<option value="">--all--</option>
{ foreach $createdate as $date }
<option value=" { $date.created_datetime } " { if $date.created_datetime eq $selected_datetime } selected { /if } >
2024-12-30 22:49:46 +01:00
{ $date.created_datetime } ( { $date.voucher_count } )
2024-12-20 16:48:06 +07:00
</option>
{ /foreach }
2023-09-18 15:03:25 +07:00
</select></td>
<td><button type="submit">submit</button></td>
</tr>
</table>
<hr>
2024-12-30 22:49:46 +01:00
<center><button type="button" onclick="window.print()" class="btn btn-default btn-sm no-print"> { Lang : : T ( 'Click Here to Print' ) } </button><br> { Lang : : T ( 'Print side by side, it will easy to cut' ) } <br> show { $v | @ count } vouchers from { $vc } vouchers<br> from ID { $v [ 0 ] [ 'id' ] } limit { $limit } vouchers
2023-09-18 15:03:25 +07:00
</center>
2017-03-15 02:37:15 +07:00
</form>
2023-10-18 17:24:00 +07:00
<div id="printable" align="center">
2024-12-30 22:49:46 +01:00
<hr> { $n = 1 } { foreach $voucher as $vs } { $jml = $jml + 1 } { if $n = = 1 }
<table>
<tr>
{ /if }
<td> { $vs } </td>
{ if $n = = $vpl }
</table>
{ $n = 1 } { else } { $n = $n + 1 } { /if } { if $jml = = $pagebreak } { $jml = 0 }
<!-- pageBreak -->
<div class="page-break">
<div class="no-print" style="background-color: #E91E63; color:#FFF;" align="center">-- pageBreak --
<hr>
</div>
</div>
{ /if } { /foreach }
2017-03-15 02:37:15 +07:00
</div>
2023-09-18 15:03:25 +07:00
</page>
2024-07-24 15:36:13 +07:00
<script src="ui/ui/scripts/jquery.min.js"></script>
2024-12-30 22:49:46 +01:00
{ if isset ( $xfooter ) } { $xfooter } { /if }
2023-09-18 15:03:25 +07:00
<script>
jQuery(document).ready(function() {
// initiate layout and plugins
$("#actprint").click(function() {
window.print();
return false;
});
2017-03-15 02:37:15 +07:00
});
2023-09-18 15:03:25 +07:00
</script>
2017-03-15 02:37:15 +07:00
</body>
2023-09-18 15:03:25 +07:00
2017-03-15 02:37:15 +07:00
</html>