{block "messages"}
{if $order->isClosed()}
{'errorOrderClosed'|translate}
{/if} {if "1" == $body.data.status_storno}
{'infoCanceled'|translate}
{/if} {if findModule('replacement') or findModule('returns')} {$returnId = $order->getData('replacement')} {if $returnId}
Objednávka je vratka z této objednávky.
{/if} {$returnIdNew = $order->getData('id_return')} {if $returnIdNew}
Objednávka patří k této vratce.
{/if} {/if} {if $module.B2B_PREORDERS and $order->getData('preorders')} {$preorderData = $order->getData('preorders')}
Objednávka patří k  této předobjednávce uživatele.
{/if}
{/block}

{'sectionInvoiceData'|translate} {block "customer-open-orders"} {if $body.data.id && $body.multipleOrder} {'userOpenOrder1'|translate} {'userOpenOrder2'|translate}! {/if} {/block} {if $body.data.invoice_email} {if $body.userInfo and !empty($body.userInfo.note)} {$body.userInfo.note|truncate:30} {else} {/if} {/if} {if $body.data.id_user} {'userRegistered'|translate} {/if} {if findModule('price_levels')} {if $body.price_level} {$price_level = $body.price_level} {else} {$price_level = $order->getData('price_level')} {/if} {if is_string($price_level)} {$price_level = ['id' => '', 'name' => $price_level]} {/if} {if $price_level} {$price_level.name} {/if} {/if} {foreach $body.data.used_order_discounts as $id => $name} {$name} {/foreach}

{get_contexts country=1 assign="contexts"} {$allCountries = $contexts.country->getAll()}
{$body.data.invoice_name} {$body.data.invoice_surname}
{$body.data.invoice_street}{if $body.data.invoice_street}
{/if} {$body.data.invoice_custom_address}{if $body.data.invoice_custom_address}
{/if} {$body.data.invoice_zip} {$body.data.invoice_city}
{$body.data.invoice_state}{if $body.data.invoice_state}
{/if} {$invoice_country = $allCountries[$body.data.invoice_country]} {if $invoice_country}{$invoice_country->getName()}{/if}
{if $body.data.invoice_phone}{'phone'|translate}: {$body.data.invoice_phone}
{/if} {if $body.data.invoice_email}{'email'|translate}: {$body.data.invoice_email}  {/if}
{block "invoice-firm-info"} {$body.data.invoice_firm} {if $body.data.invoice_firm}
{/if} {if $body.data.invoice_ico} {'ico'|translate}: {$body.data.invoice_ico}
{/if} {if $body.data.invoice_dic}{'dic'|translate}: {$body.data.invoice_dic}{/if} {/block}

{'sectionDeliveryData'|translate}

{if $order->hasSameAddress()}

{'sameAsInvoice'|translate}

{else}
{$body.data.delivery_name} {$body.data.delivery_surname}
{$body.data.delivery_street}
{$body.data.delivery_custom_address}{if $body.data.delivery_custom_address}
{/if} {$body.data.delivery_zip} {$body.data.delivery_city}
{$body.data.delivery_state}{if $body.data.delivery_state}
{/if} {$delivery_country = $allCountries[$body.data.delivery_country]} {if $delivery_country}{$delivery_country->getName()}{/if}
{block "delivery-firm-info"} {$body.data.delivery_firm}{if $body.data.delivery_firm}
{/if} {$body.data.delivery_phone} {/block}
{/if}
{get_statuses name="active" assign="statuses"} {if $body.data.status|in_array:$statuses != false} {/if}

{'sectionCurrentItems'|translate}
{block "products-header"} {$heurekaId = $order->getData('heureka_id')} {if $heurekaId} Heureka ID: {$heurekaId} {/if} {/block}
{'code'|translate}: {if $body.acn!="add"}{$body.data.order_no}{/if}

{block "items-table"} {block "items-vat-price-filter"} {$pricePreferred = 'value_with_vat'} {if ($dbcfg->prod_prefer_price_vat == 'N')} {$pricePreferred = 'value_without_vat'} {/if} {/block} {if ($pricePreferred == 'value_with_vat')} {else} {/if} {block "items-header-additional-columns"}{/block} {ifmodule STORES} {get_stores_inStore assign="storesInStore"} {$stores = $storesInStore->getStores()} {$delivery = $order->getDeliveryType()->getDelivery()} {$cur_store = $storesInStore->getStoreByDeliveryId($delivery.id)} {$cur_store_in_store = "store{$cur_store.id}_in_store"} {/ifmodule} {foreach from=$body.oop item=item key=key} {if empty($item.id_product) || $item.in_store + $item.piecesOrdered >= 0} {$class="row-green"} {if $item.id_product && $cur_store_in_store && ($item[$cur_store_in_store] < 0)} {$class="row-orange"} {/if} {else} {if $item.in_store + $item.piecesOrdered + $item.piecesInSuppliers >= 0} {$class="row-orange"} {else} {$class="row-red"} {/if} {/if} {block "items-table-additional-columns"}{/block} {/foreach}
{'itemAction'|translate} {'piecesUnit'|translate} {'item'|translate} {'productCode'|translate} EAN {'noteShort'|translate} {'stock'|translate}{'piecePrice'|translate} {'withTax'|translate:'choice'} {'priceWithVat'|translate}{'piecePrice'|translate} {'withoutTax'|translate:'choice'} {'priceWithoutVat'|translate}
{$item.pieces}
{block productname} {if $item.id_product > 0} {$item.descr} {else} {$item.descr} {/if} {$item.variation_title} {block "productname-note"} {if $item.item_note} {$item.item_note} {/if} {/block} {/block}
{if findModule("products_suppliers")&& {find_right name="INSTORE_STOCKIN"}} {$item.code} {else} {$item.code} {/if} {block productEan}{$item.ean}{/block} {$item.note_} {strip}{$item.in_store} {if $item.piecesOrdered>0 }/{$item.in_store+$item.pieces+$item.piecesOrdered}{/if} {if $item.id_product && $cur_store_in_store} {$short_text = ''} {$long_text = ''} {block 'storesTextForeach'} {foreach $stores as $key => $store} {$store_in_store = $item["store`$key`_in_store"]} {if $store.type <= 1} {if $key == 1 || $store_in_store != 0} {$short_text = "`$short_text``$store_in_store|string_format:"%+d"`"} {/if} {$long_text = "`$long_text``$store_in_store` ks `$store.name`\n"} {/if} {/foreach} {/block}  ( {if mb_strlen($short_text) > 100} {'tooLongShortText'|translate} {else} {$short_text|ltrim:'+'} {/if} )  {/if} {if {$item.id_product} && ({find_module name="products_suppliers"} || {find_module name="orders_of_suppliers"}) && {find_right name="INSTORE_STOCKIN"}} {foreach from=$item.suppliers item=supplier key=key} / {$supplier.in_store} {/foreach} {if $module.STOCK_IN} {foreach $item.stock_in as $stock_in} /( 7}style="color:red"{/if}>{$stock_in.future_stock_in_pieces}) {/foreach} {foreach $item.preorder_stock_in as $stock_in} /({$stock_in.preorder_stock_in_pieces}) {/foreach} {/if} {/if} {/strip} {$item.PiecePrice[$pricePreferred]|format_price:"ceil=no;decimal=dynamic"} {if !$item.discount->isZero()}{block "item-discount"}(-{$item.discount|format_editable_price:-2}%){/block}{/if} {$item.Price[$pricePreferred]|format_price:"ceil=no;decimal=dynamic"} {if $item.custom_data.priceWithoutDiscounts && $item.custom_data.totalDiscount} {$priceWithoutDiscounts = $item.custom_data.priceWithoutDiscounts * $item.pieces} {$totalDiscount = $item.custom_data.totalDiscount * $item.pieces} ({$priceWithoutDiscounts|format_price:"ceil=no;decimal=dynamic"} - {$totalDiscount|format_price:"ceil=no;decimal=dynamic"}) {/if}
{/block}
{$userContent = $order->getData('user-content')} {if !empty($userContent)}

Přílohy

{foreach $userContent as $file} {/foreach}
{if $file.filename|strstr:".jpeg" or $file.filename|strstr:".jpeg" or $file.filename|strstr:".png" or $file.filename|strstr:".gif"} {/if} {$file.originalFilename} Zobrazit   Stáhnout  
{/if}
{block "delivery"} {if findModule('eshop_delivery') or findModule('deliveries')} {$deliveryType = $order->getDeliveryType()}
{if $deliveryType}
{$deliveryType->getDelivery()->printDeliverySettings($order) nofilter}
{/if}
{if $body.payment_method}
 {$body.payment_method.name}
{/if} {if $module.PRODUCTS__WEIGHT}
 {$order->getTotalWeight()|format_editable_number:-6} kg
{/if}
{if $body.data.packages}
  {foreach $body.data.packages as $package} {if $package.track_url} {$package.package_id}{if !$package@last}, {/if} {else} {$package.package_id}{if !$package@last}, {/if} {/if} {/foreach}
{/if}
{else}
{if $module.PRODUCTS__WEIGHT}
{'weight'|translate}: {$order->getTotalWeight()|format_editable_number:-6} kg
{/if}
{/if} {/block} {block "payment"} {if $module.ORDER_PAYMENT && $body.acn != 'add'} {$total_price = $body.data.total_price} {if isset($body.paid)} {$paid_remaining = $total_price->sub($body.paid)} {else} {$paid_remaining = $total_price} {/if} {$paid_remaining_CZK = $order->getRemainingPaymentInCZK()}
{if !$paid_remaining_CZK->lowerThan(toDecimal(1))} {'actionPay'|translate} {if $module.EET && $deliveryType && $deliveryType->payment_class} {if $deliveryType->payment_class->requiresEET()} + EET {/if} {/if} {elseif $paid_remaining_CZK->lowerThan(toDecimal(-1))} {'actionReturnOverpayment'|translate} {if $module.EET && $deliveryType && $deliveryType->payment_class} {if $deliveryType->payment_class->requiresEET()} + EET {/if} {/if} {else} {'statusPaid'|translate} {/if}
{'totalPricePay'|translate}: {$body.data.total_price|format_price:"ceil=no;decimal=dynamic"} {'withTax'|translate:'choice'}
{$body.data.total_price_without_vat->value(2)|format_price:"ceil=no;decimal=dynamic"} {'withoutTax'|translate:'choice'}
{else}
{print_toggle name="status_payed"}
{'total'|translate}: {$body.data.total_price|format_price} ({'withTax'|translate:'choice'})
{$body.data.total_price_without_vat|format_price} ({'withoutTax'|translate:'choice'})
{/if} {/block}
{block historyHeader}

{'sectionComm'|translate}

{/block} {$email_types = translate('email_types', 'emails')} {function renderHistoryStatus} {$long_text = ""} {if $row.custom_data.email_type} {$long_text = "E-mail: "|cat:$row.custom_data.email_type} {if $email_types[$row.custom_data.email_type]} {$long_text = "E-mail: "|cat:{$email_types[$row.custom_data.email_type]}} {/if} {/if} {if $row.custom_data.subject} {$long_text = $long_text|cat: "\nPředmět: "|cat:{$row.custom_data.subject}} {/if} {if $row.custom_data.email_id} {$long_text = $long_text|cat: "\nID: "|cat:$row.custom_data.email_id} {/if} {if $long_text}{$status}{else}{$status}{/if} {if !empty($row.attachments)} {/if} {/function} {foreach from=$body.orders_history item=row} {/foreach}
{'date'|translate:'base'} {'orderStatus'|translate} {'note'|translate} {'sent'|translate} admin
{$row.datef} {block ordersHistoryStatus}{$cfg.Order.Status.global[$row.id_status]}{/block}
{$row.comment nofilter}
{if $row.comment|strlen > 350}Číst více{/if}
{switch $row.notified} {case 0}NE{/case} {case 1} {renderHistoryStatus row=$row status='ANO'} {/case} {case 2}SMS Odeslaná{/case} {case 3}SMS Přijatá{/case} {case 4} {renderHistoryStatus row=$row status='Odesílá se'} {/case} {case 5} {renderHistoryStatus row=$row status='Selhalo'} {/case} {/switch} {$row.login}{if $row.custom_data.initiator}
{$row.custom_data.initiator->name}{/if}
{block orderBottomArea}

{'orderStatus'|translate}

{include "block.UserMessages.tpl" emailsInStatuses="ORDER_MESSAGE" attachmentTypes=$body.attachments_types|json_decode:true attachmentUrls=$body.attachments_urls|json_decode:true formSelector="#editform"} {renderStatusButtons statuses=getOrderStatuses() userMessageKey="status_comment"} {block order_flags} {if (!empty($cfg.Order.Flags))}
{foreach $cfg.Order.Flags as $key=>$flag}
{/foreach}
{/if} {/block}

{'comments'|translate} {insert_llm_button type='order_comment' target="comments"}

{insert_wysiwyg target="comments" type="BasicTable" config="toolbarStartupExpanded : false,startupFocus : false,removePlugins : 'elementspath', height:'150px', resize_minHeight:'100px', resize_enabled:false, ignoreEmptyParagraph:true, startupOutlineBlocks:false"}
{block 'doNotNotifyCheckbox'}
{/block}
{block 'sendSMS'} {if $body.SMSSenderBackend}
{/if} {/block}
{renderMessageButtons}
{/block}
{block orderStatusButtons} {/block}