267 lines
11 KiB
Smarty
267 lines
11 KiB
Smarty
{extends "../frame.tpl"}
|
|
|
|
{block body_class}class="panel_frame"{/block}
|
|
|
|
{block title}Tiskové centrum{/block}
|
|
|
|
{block content}
|
|
<style media="all" type="text/css">
|
|
@media print {
|
|
.print-hidden{
|
|
display:none;
|
|
}
|
|
.print{
|
|
padding:0px;
|
|
page-break-after: always;
|
|
}
|
|
html {
|
|
margin: auto;
|
|
}
|
|
body{
|
|
margin:0;
|
|
padding:0;
|
|
}
|
|
@page
|
|
{
|
|
size: auto; /* auto is the initial value */
|
|
|
|
/* this affects the margin in the printer settings */
|
|
margin: 10mm 15mm 10mm 15mm !important;
|
|
}
|
|
}
|
|
@media screen {
|
|
.print{
|
|
padding:20px;
|
|
}
|
|
}
|
|
|
|
</style>
|
|
{literal}<script type="text/javascript">
|
|
|
|
function reloadFrame(URL, replaceItem) {
|
|
URL = URL.replace('{REPLACE_ITEM}', replaceItem);
|
|
|
|
document.location = URL;
|
|
}
|
|
|
|
</script>
|
|
{/literal}
|
|
<div class="container-fluid print-hidden">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="panel first panel-default">
|
|
<form class="form-horizontal" action="" method="post" role="form">
|
|
<input hidden="hidden" name="json" value="{$body.json}" />
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title"><span class="glyphicon glyphicon-print"></span> Tiskové centrum</h3>
|
|
</div>
|
|
|
|
{if $order}
|
|
<div class="panel-body">
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<p><strong>Objednávka</strong> {$order.order_no} |
|
|
<strong>Doprava</strong> {$order.delivery_type} |
|
|
<strong>Cena</strong> {$order.total_price|format_price}
|
|
</p>
|
|
</div>
|
|
<div class="col-md-2">
|
|
<input class="btn btn-block" type="button" value="Vytisknout"
|
|
onclick="window.print()"/>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
{elseif $warehouse_positions}
|
|
<div class="panel-body">
|
|
<div class="form-group">
|
|
<div class="col-md-1 control-label">
|
|
Šablona
|
|
</div>
|
|
<div class="col-md-2">
|
|
<select name="template_type" class="selecter">
|
|
{foreach $object->printLabelsLocator->getPrintClasses() as $labelClass}
|
|
<option value="{$labelClass->getLabel()}" {$body.template_type|selected:$labelClass->getLabel()}>{$labelClass->getLabel()}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
<div class="col-md-1 control-label">
|
|
Šipky
|
|
</div>
|
|
<div class="col-md-2">
|
|
<select name="arrows" class="selecter">
|
|
<option value="up" {$body.arrows|selected:'up'}>Nahoru</option>
|
|
<option value="down" {$body.arrows|selected:'down'}>Dolů</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-1 control-label">
|
|
Pozice čárového kodu
|
|
</div>
|
|
<div class="col-md-2">
|
|
<select name="barcode_position" class="selecter">
|
|
<option value="down" {$body.barcode_position|selected:'down'}>Dole</option>
|
|
<option value="up" {$body.barcode_position|selected:'up'}>Nahoře</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
{foreach $warehouse_positions.positions as $item}
|
|
<input type="hidden" name="positions[]" value="{$item}">
|
|
{/foreach}
|
|
{if $warehouse_positions.location}
|
|
<input type="hidden" name="location" value="{$warehouse_positions.location}">
|
|
{/if}
|
|
<div class="col-md-1">
|
|
{if $var.json}
|
|
<input type="hidden" name="json" value="{$var.json}">
|
|
{/if}
|
|
<input class="btn btn-block" type="submit" value="Zobrazit" />
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-2">
|
|
<input class="btn btn-block" type="button" value="Vytisknout"
|
|
onclick="window.print()"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{else}
|
|
<div class="panel-body">
|
|
{if ! $body.IDo}
|
|
<div class="form-group product_autocomplete">
|
|
<div class="col-md-1 control-label">
|
|
Produkt
|
|
</div>
|
|
<div class="col-md-5">
|
|
<input type="text" data-autocomplete-search="product" autocomplete="off" class="form-control input-sm autocomplete-control"
|
|
data-preload="product_variation" placeholder="Vyhledat produkt" value="{if $body.ID}{$body.ID}{if $body.IDv}-{$body.IDv}{/if}{/if}">
|
|
</div>
|
|
|
|
<input type="hidden" name="ID" value="{$body.ID}">
|
|
<input type="hidden" name="IDv" value="{$body.IDv}">
|
|
</div>
|
|
{/if}
|
|
<script type="text/javascript">
|
|
$('[data-autocomplete-search=product]').adminVariationAutoComplete({
|
|
select: function (e, $item) {
|
|
var item = $item.data.items[$item.item.data('autocomplete-item')];
|
|
|
|
$('[name=ID]').val(item.id);
|
|
$('[name=IDv]').val(item.value_variation);
|
|
|
|
return true;
|
|
}
|
|
});
|
|
</script>
|
|
<div class="form-group">
|
|
<div class="col-md-1 control-label">
|
|
Šablona
|
|
</div>
|
|
<div class="col-md-2">
|
|
<select name="template_type" class="selecter">
|
|
{foreach $object->printLabelsLocator->getPrintClasses() as $labelClass}
|
|
<option value="{$labelClass->getLabel()}" {$body.template_type|selected:$labelClass->getLabel()}>{$labelClass->getLabel()}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-md-1 control-label two-lines">
|
|
Generovat čárový kód podle
|
|
</div>
|
|
<div class="col-md-2">
|
|
{print_select name="by" var=$body.barcode_by_select selected=$body.by}
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-1 control-label">
|
|
Počet štítků
|
|
</div>
|
|
<div class="col-md-1 control-label">
|
|
<input type="text" class="form-control input-sm" name="pcs" value="{$body.pcs}" >
|
|
</div>
|
|
|
|
<div class="col-md-1 control-label col-md-offset-1">
|
|
Tisknout od
|
|
</div>
|
|
<div class="col-md-1">
|
|
<select name="change_start" class="selecter">
|
|
{for $for=0 to 38}
|
|
<option value="{$for}" {$body.change_start|selected:$for}>{$for+1}</option>
|
|
{/for}
|
|
</select>
|
|
</div>
|
|
<div class="col-md-1">
|
|
pozice na papíře.
|
|
</div>
|
|
|
|
|
|
<div class="col-md-1">
|
|
{if $var.json}
|
|
<input type="hidden" name="json" value="{$var.json}">
|
|
{/if}
|
|
<input class="btn btn-block" type="submit" value="Zobrazit" />
|
|
</div>
|
|
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-2">
|
|
<input class="btn btn-block" type="button" value="Vytisknout"
|
|
onclick="window.print()"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</form>
|
|
{if $body.type == "order" && $body.set=="InvoiceForeign"}
|
|
<div class="panel-body">
|
|
<form action="" method="post">
|
|
<div class="col-md-1"><label>Kurz Eura</label></div>
|
|
<div class="col-md-1">
|
|
<input type="text" class="form-control input-sm" name="rate" value="{$smarty.request.rate|default:CNB::getCurrency('EUR')}">
|
|
</div>
|
|
<div class="col-md-1"><label>Jazyk</label></div>
|
|
<div class="col-md-2">
|
|
<select name="lang" class="selecter">
|
|
<option value="czech" {if $smarty.post.lang == "czech"}selected{/if}>Česká</option>
|
|
<option value="english" {if $smarty.post.lang == "english"}selected{/if}>Anglická</option>
|
|
<option value="slovak" {if $smarty.post.lang == "slovak"}selected{/if}>Slovenská</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-1">
|
|
<input type="submit" name="Submit" class="btn btn-primary btn-block" value="Přepočítat" />
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function changeInputsValue(inpts, newValue) {
|
|
for (var x = 0; x < inpts.length; x++) {
|
|
if (document.getElementById(inpts[x]) == null)
|
|
continue;
|
|
document.getElementById(inpts[x]).value = newValue;
|
|
}
|
|
}
|
|
|
|
</script>
|
|
|
|
{$object->getPrint()}
|
|
|
|
{if $body.now}
|
|
<script style='language/javascript'>
|
|
$(window).on('load', function() {
|
|
window.print();
|
|
var isChrome = !!window.chrome;
|
|
if (!isChrome)
|
|
window.close();
|
|
});
|
|
</script>
|
|
{/if}
|
|
{/block}
|