Files
kupshop/bundles/KupShop/WarehouseBundle/Admin/templates/print/position.tpl
2025-08-02 16:30:27 +02:00

121 lines
2.3 KiB
Smarty

<style type="text/css" media="all">
@media print {
@page {
margin: 0 !important;
padding: 0;
}
.stitek {
float: none !important;
border: none !important;
}
}
body {
margin: 0;
padding: 0;
color: black;
}
.stitek {
width: 68mm;
height: 38mm;
box-sizing: border-box;
page-break-after: always;
border: dimgrey dashed 1px;
overflow: hidden;
position: relative;
background-color: white;
}
.stitek > div {
display: table-cell;
}
.barcode {
position: absolute;
left: 0;
bottom: 3mm;
width: 100%;
height: 17mm;
text-align: center;
}
.barcode.up {
bottom: unset;
top: 3mm;
}
.barcode svg {
max-width: 90%;
}
.code {
font-family: monospace;
font-size: 28px;
font-weight: bold;
text-align: center;
position: absolute;
left: 10mm;
top: 5mm;
width: 48mm;
height: 15mm;
line-height: 25px;
}
.code.down {
top: unset;
bottom: 0mm;
}
.arrow.down {
top: unset;
bottom: 6mm;
}
.arrow img.down {
transform: rotate(180deg);
}
.arrow {
position: absolute;
left: 0;
top: 0mm;
width: 15mm;
height: 10mm;
}
.arrow.right {
left: unset;
right: 0;
}
</style>
{if !$positionsArrow}
{$positionsArrow = 'up'}
{/if}
{if !$positionsBarcode}
{$positionsBarcode = 'down'}
{/if}
{$arrowUrl = '/web/bundles/warehouse/images/arow_up.svg'}
{$arrowClass = $positionsArrow}
{foreach $positions as $position}
{block stitek}
<div class="stitek">
<div class="arrow left {if $positionsBarcode == 'up'}down{/if}">
<img src="{$arrowUrl}" class="{$arrowClass}">
</div>
<div class="code {if $positionsBarcode == 'up'}down{/if}">
{$position.code}
</div>
<div class="arrow right {if $positionsBarcode == 'up'}down{/if}">
<img src="{$arrowUrl}" class="{$arrowClass}">
</div>
{block barcode}
<div class="barcode {if $positionsBarcode == 'up'} up {/if}">
{insert_barcode code=$position.code height=70 width=2}
</div>
{/block}
</div>
{/block}
{/foreach}