Files
kupshop/web/common/templates/orderViewprint.tpl
2025-08-02 16:30:27 +02:00

477 lines
15 KiB
Smarty

{if $header.show == true}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Objednávka{if $order.order_no}: {$order.order_no}{/if}</title>
</head>
<body>
{/if}
<style>
{block "style"}
* {
box-sizing:border-box;
}
hr {
margin: 3px 0;
border: 0;
border-top: 1px solid #DBDBDB;
}
.print-footer {
text-align: center;
color: grey;
padding-top: 5px;
font-size: 11px;
clear: both;
font-family: Arial, Helvetica, sans-serif;
}
.print-header {
border-bottom: 3px #000 solid;
padding-bottom: 3px;
font-family: Arial, Helvetica, sans-serif;
}
.print-header table {
width: 100%;
font-size: 11px;
}
.print-header td {
vertical-align: top;
}
.print-main-content {
display: flex;
flex-wrap: wrap;
font-size: 11px;
color: #000000;
font-family: Arial, Helvetica, sans-serif;
}
h1 {
margin: 0 0 10px;
font-size: 18px;
font-weight: normal;
padding: 3px 0;
width: 50%;
float: left;
}
h1.bordered {
padding: 3px 5px;
margin: 0 0 10px;
border: 1px solid #000000;
border-top-width: 0;
}
h2 {
margin: 0;
font-size: 11px;
font-weight: bold;
padding: 3px 0 0;
clear: both;
}
h3 {
margin: 0;
font-size: 12px;
font-weight: bold;
padding: 3px 3px 3px 0;
clear: both;
}
.print-main-content .print-main-content-left {
width: 50%;
float: left;
padding-right: 5%;
}
.print-main-content .print-main-content-right {
width: 50%;
float: left;
}
.print-main-content-notes {
width: 50%;
clear: both;
}
.print-column-50 {
float: left;
width: 50%;
padding-right: 3px;
}
.print-main-content td {
font-size: 11px;
}
.print-main-content th {
font-size: 10px;
font-weight: bold;
color: #000000;
background-color: #CCCCCC;
padding: 2px;
border: 1px solid #999999;
}
.print-main-content .rowPayMark {
border-top: 2px #000 solid;
border-bottom: 2px #000 solid;
border-left: 2px #000 solid;
}
.print-main-content .rowPayMark2 {
border-top: 2px #000 solid;
border-bottom: 2px #000 solid;
border-right: 2px #000 solid;
}
.pieces td {
border-bottom: 1px dotted #000;
}
.last td {
border-bottom: 2px solid #000;
}
.bottom-left {
float: left;
width: 60%;
margin-top: 20px;
}
.bottom-left .small-table {
float: left;
}
.bottom-right {
float: left;
width: 40%;
margin-top: 20px;
}
h2.red-text {
color: #E54A4C;
font-size: 16px;
}
.print:last-of-type {
page-break-after: auto;
}
.img-responsive {
max-width: 100%;
height: auto !important;
display: block;
}
.storno {
font-size: 90px;
color: red;
position: absolute;
top: 20px;
left: -110px;
z-index: 100;
transform: rotate(-45deg);
transform-origin: 100% 0%;
}
@media screen {
.print-footer,
.print-header,
.print-main-content {
width: 675px;
}
}
{/block}
</style>
<div class="print">
{block "print-content"}
<div class="print-header">
{block "storno"}
{if $order.status_storno}
<div style="position: relative">
<div class="storno">STORNOVÁNO</div>
</div>
{/if}
{/block}
{block "header"}
<table>
<tr>
{block "header-table"}
<td align="left"><strong>{$dbcfg.shop_firm_name}</strong></td>
<td align="left"><strong>{$dbcfg.shop_address|nl2br nofilter}</strong></td>
<td align="left"><strong>IČ:</strong> {$dbcfg.shop_ico}<br/><strong>DIČ: </strong>{$dbcfg.shop_dic}</td>
{$barcode = false}
{ifmodule CHECK_APP}{$barcode = true}{/ifmodule}
{ifmodule WAREHOUSE}{$barcode = true}{/ifmodule}
{if $barcode}
<td align="right" valign="bottom" width="100">
{insert_barcode type='C128' code=$order.order_no height=40}
</td>
{/if}
{/block}
</tr>
</table>
{/block}
</div>
<div class="print-main-content">
{block "invoice-header"}
<h1>{if $order.status}FAKTURA - daňový doklad{else}Rekapitulace objednávky{/if}</h1>
<h1 class="bordered">Objednávka{if $order.order_no}: {$order.order_no}{/if}</h1>
{/block}
<div class="print-main-content-left">
{block "invoice-content-left"}
{block "invoice-logo"}
<img style="margin-bottom: 15px;" src="{$cfg.Addr.full}templates/images/{$cfg.Modules.orders.invoice_logo|default:'logo.png'}" alt="{$dbcfg.shop_firm_name}" class="img-responsive"/>
{/block}
<h2>Datum:</h2>
<hr/>
{block "invoice-dates"}
<p>
{get_datetime assign="now"}
{$date_handle = $order.date_handle|default:$now}
<strong>Vystavení:</strong> {$date_handle|format_date:'d.m.Y'}<br/>
{if $order.status}
<strong>Zd. plnění:</strong> {$date_handle|format_date:'d.m.Y'}
<br/><strong>Splatnosti:</strong>
{if !empty($order.date_due)}
{$order.date_due|format_date:'d.m.Y'}
{else}
{$dueDateIn = date_interval_create_from_date_string($dbcfg.shop_due_days|cat:" days")}
{if $dueDateIn}
{$date_handle->add($dueDateIn)|format_date:'d.m.Y'}
{else}
{$date_handle|format_date:'d.m.Y'}
{/if}
{/if}
{/if}
</p>
{/block}
{block "bank"}
{if $order.status}
<h2>Bankovní účet:</h2>
<hr/>
<p>
<strong>Variabilní symbol:</strong> {$order.order_no}<br/>
<strong>Číslo účtu:</strong> {if $dbcfg.bank_account_prefix}{$dbcfg.bank_account_prefix}-{/if}{$dbcfg.bank_account_number}/{$dbcfg.bank_code}<br/>
{*<strong>IBAN:</strong> {$dbcfg.bank_iban}<br>
<strong>SWIFT/BIC:</strong> {$dbcfg.bank_swift}*}
</p>
{/if}
{/block}
{block "delivery-payment"}
<h2>Způsob odběru:</h2>
<hr/>
<p>
{$order.delivery_type}
{$deliveryData = $order->getData('delivery_data')}
{$deliveryType = $order->getDeliveryType()}
{if $deliveryData && $deliveryType}<br>
{$deliveryType->getDelivery()->printDeliveryInfo() nofilter}
{/if}
</p>
{/block}
{/block}
</div>
<div class="print-main-content-right">
{block "invoice-content-right"}
<h2>Odběratel:</h2>
<hr/>
<div class="print-column-50">
<h3>{if !$order.invoice_ico or !$order.invoice_firm}{$order.invoice_name} {$order.invoice_surname} <br/> {/if}{$order.invoice_firm}</h3>
</div>
<div class="print-column-50">
<p>
{$order.invoice_street} <br/>
{$order.invoice_zip} {$order.invoice_city}<br/>
{$order.invoice_country}
</p>
</div>
<div class="print-column-50">
<p>
<strong>Telefon:</strong> {$order.invoice_phone}<br/>
<strong>Email:</strong> {$order.invoice_email}
</p>
</div>
<div class="print-column-50">
<p>
<strong>IČO:</strong> {$order.invoice_ico}<br/>
<strong>DIČ:</strong> {$order.invoice_dic}
</p>
</div>
<h2>Dodací údaje:</h2>
<hr/>
<div class="print-column-50">
<h3>{$order.delivery_name} {$order.delivery_surname} <br/> {$order.delivery_firm}</h3>
</div>
<div class="print-column-50">
<p>
{$order.delivery_street} <br/>
{$order.delivery_zip} {$order.delivery_city}<br/>
{$order.delivery_country}
</p>
</div>
{/block}
</div>
<div class="print-main-content-notes">
{block "notes"}
{if $order.note_user != "" && !$order.status}
<h2>Poznámky:</h2>
<hr/>
<p><strong>Pro obchodníka:</strong></p>
<p>{$order.note_user} </p>
{/if}
{/block}
</div>
{block "items"}
<table width="100%" border="0" cellpadding="3" cellspacing="0" class="pieces">
<tr>
<th align="center" width="3%">Ks</th>
<th align="left">Položky</th>
{if $order.status}
<th align="center" width="5%">Kód</th>
{/if}
<th style="text-align: right;" width="10%">Cena za kus</th>
<th style="text-align: right;" width="10%">bez DPH</th>
<th style="text-align: right;" width="6%">DPH %</th>
<th style="text-align: right;" width="10%">DPH</th>
<th style="text-align: right;" width="10%">s DPH</th>
</tr>
{foreach $order.items as $item}
<tr {if $item@last}class="last"{/if}>
<td align="center">{$item.pieces}</td>
<td align="left">{$item.descr}{if !$item.discount->isZero()}( -{$item.discount|format_price:'printcurrency=no'} %){/if}{if $item.note && $item.product}&nbsp;<br>({$item.product->printNote($item.note)}){/if}</td>
{if $order.status}
<td align="center">{$item.code}{if !$item.code}{$item.ean}{/if}</td>
{/if}
<td style="text-align: right;">{{$item.value_with_vat_no_rounding}|format_price:"printcurrency=no"}</td>
<td style="text-align: right;">{{$item.total_price.value_without_vat_no_rounding}|format_price:"ceil=no;printcurrency=no"}</td>
<td style="text-align: right;">{$item.vat} </td>
<td style="text-align: right;">{($item.total_price.value_with_vat_no_rounding->sub($item.total_price.value_without_vat_no_rounding))|format_price:"ceil=no;printcurrency=no"}</td>
<td style="text-align: right;">{$item.total_price.value_with_vat_no_rounding|format_price}</td>
</tr>
{/foreach}
</table>
{/block}
<div class="bottom-left">
{block 'pricebox'}
<table class="small-table" border="0" cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th>
<th width="25%" align="right">Bez daně</th>
<th width="20%" align="right">Daň</th>
<th align="right" width="25%">Celkem</th>
</tr>
{foreach $order.vats as $key => $vat}
<tr>
<td align="left">{if empty($vat.descr)}Daň {$key}%{else}{$vat.descr}{/if}</td>
<td align="right">{{$vat.total_price_without_vat}|format_price:"ceil=no"}</td>
<td align="right">{$vat.tax.value_vat|format_price:"ceil=no"}</td>
<td align="right">{$vat.tax.value_with_vat|format_price:"ceil=no"}</td>
</tr>
{/foreach}
<tr>
<td align="left">Celkem s DPH</td>
<td align="right" colspan="3"><span class="price">{$order.total_price_array.value_with_vat_no_rounding|format_price:"ceil=no"}</span>
</td>
</tr>
{if findModule('order_payment')}
{$payment = $order->getPayments()}
{if $payment > 0}
<tr>
<td align="left">Úhrada</td>
<td align="right" colspan="3">{$payment|format_price}</td>
</tr>
{elseif $payment < 0}
<tr>
<td align="left">Přeplatek</td>
<td align="right" colspan="3">{$payment|format_price}</td>
</tr>
{/if}
<tr>
<td align="left" class="rowPayMark" colspan="2"><u><strong>Celkem k úhradě</strong></u></td>
<td class="rowPayMark2" align="right" colspan="2"><u><span class="current_price"><strong>{$order->getRemainingPayment()|format_price}</strong></span></u>
</td>
</tr>
{else}
<tr>
<td align="left" class="rowPayMark" colspan="2"><u><strong>Cena celkem</strong></u></td>
<td class="rowPayMark2" align="right" colspan="2"><u><span class="current_price"><strong>{$order.total_price_array.value_with_vat_no_rounding|format_price}</strong></span></u>
</td>
</tr>
{/if}
{*if $body.totalPriceDiscount}
<tr>
<td align="left">Uplatněné slevy</td>
<td align="right" colspan="3"><span class="price">{$body.totalPriceDiscount}</span></td>
</tr>
{/if*}
</table>
{/block}
</div>
<div class="bottom-right">
{block "bottom-right"}
{if $order.status}
<p><strong>Faktura slouží jako záruční list!</strong></p>
{/if}
{/block}
{block "eet"}
{if $module.EET}
{$eetOrderDispatcher = getSymfonyService('kupshop.eet.dispatcher')}
{$eet = $eetOrderDispatcher->getOrderInfo($order)}
{if $eet}
<p>{if $eet->getFik()}
Tržba byla evidována v běžném režimu<br>
Fik: {$eet->getFik()}<br>
{else}
Tržba byla evidována ve zjednodušeném režimu<br>
Pkp: {$eet->getPkp()}<br>
{/if}
Bkp: {$eet->getBkp()}<br>
Provozovna: {$eetOrderDispatcher->getPlace()}, Pokladna: {$eetOrderDispatcher->getCashier()}<br>
Datum platby: {$eet->getdateSent()|format_date:'d.m.Y H:i:m'}
</p>
{/if}
{/if}
{/block}
</div>
</div>
<div class="print-footer">
{block "footer"}
<p>obchod používá systém <a href="https://www.wpjshop.cz/">wpjshop.cz</a></p>
{/block}
</div>
{block "custom-content"}{/block}
{/block}
</div>
{if $header.show == true}
</body>
</html>
{/if}