152 lines
3.9 KiB
Smarty
152 lines
3.9 KiB
Smarty
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<style>
|
|
.receipt {
|
|
font-family: Arial;
|
|
font-size: 17px;
|
|
width: 90mm;
|
|
font-smooth: never;
|
|
-webkit-font-smoothing: none;
|
|
}
|
|
|
|
.print-header {
|
|
margin-bottom: 10px;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.price {
|
|
text-align: right;
|
|
}
|
|
|
|
.item-row {
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.item-row div {
|
|
line-height: initial;
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
font-size: 17px;
|
|
}
|
|
|
|
table th {
|
|
text-align: right;
|
|
float: left;
|
|
font-weight: normal;
|
|
margin-bottom: 3px;
|
|
}
|
|
|
|
table tr {
|
|
padding-bottom: 5px;
|
|
}
|
|
|
|
.vat {
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.item-top {
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.text-right {
|
|
text-align: right;
|
|
}
|
|
|
|
@media print {
|
|
@page {
|
|
font-family: Arial;
|
|
margin: 10mm 9mm 0mm 4mm !important;
|
|
padding: 0;
|
|
width: 80mm;
|
|
font-smooth: never;
|
|
-webkit-font-smoothing: none;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
<div class="receipt" id="receipt">
|
|
|
|
<div class="seller-info">
|
|
<div style="text-align: center;">
|
|
{$dbcfg.shop_title} <br/>
|
|
{$dbcfg.shop_address} <br/>
|
|
IČ: {$dbcfg.shop_ico}, DIČ: {$dbcfg.shop_dic}<br/>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="print-header">
|
|
<div style="text-align: center">
|
|
Pokladní uzávěrka
|
|
</div>
|
|
<div style="text-align: center">
|
|
Pokladna <strong>{$admin_name}</strong>
|
|
</div>
|
|
<div style="text-align: center">
|
|
Datum a čas: <strong>{$now_time|date_format:"d.m.Y H:i:s"}</strong>
|
|
</div>
|
|
</div>
|
|
|
|
<hr width="90%">
|
|
|
|
<table>
|
|
{foreach $stats as $payment_id => $payment}
|
|
{if is_array($payment)}
|
|
<tr>
|
|
<th class="item-top">{Pos::getMethodDescr($payment_id)}</th>
|
|
</tr>
|
|
{foreach $payment as $vat => $payment_vat}
|
|
{$with_dph = $payment_vat->addVat($vat)}
|
|
<tr>
|
|
<th class="vat">Celkem s DPH {$vat}%</th>
|
|
<td class="text-right">{$with_dph|format_price:'ceil=false'}</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="vat">DPH {$vat}%</th>
|
|
<td class="text-right">{$with_dph->sub(toDecimal($payment_vat))|format_price:'ceil=false'}</td>
|
|
</tr>
|
|
{/foreach}
|
|
{else}
|
|
<tr>
|
|
<th class="item-top">{Pos::getMethodDescr($payment_id)}</th>
|
|
<td class="text-right">{$payment|format_price:'ceil=false'}</td>
|
|
</tr>
|
|
{/if}
|
|
{/foreach}
|
|
|
|
<tr>
|
|
<th class="item-top">Slevy</th>
|
|
<td class="text-right">{$discounts|format_price:'ceil=false'}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th class="item-top">Tržba</th>
|
|
<td class="text-right">{$today_sales|format_price:'ceil=false'}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th class="item-top">Zůstatek v pokladně</th>
|
|
<td class="text-right">{$actually_in_pos|format_price:'ceil=false'}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
{if $smarty.get.now}
|
|
<script>
|
|
$(window).on('load', function() {
|
|
window.print();
|
|
var isChrome = !!window.chrome;
|
|
if (!isChrome)
|
|
window.close();
|
|
});
|
|
</script>
|
|
{/if}
|
|
</div>
|
|
</body>
|
|
</html>
|