{extends file="layout.html"} {block name=title}::: LMS :{$layout.pagetitle|striphtml} :::{/block} {block name=module_content} {$xajax}

{$layout.pagetitle}

{$default_printpage = ConfigHelper::getConfig('receipts.default_printpage')}
{if !$receipt.type} {/if} {if $receipt.numberplanid != ""} {/if} {if $receipt.cdate} {/if} {if $receipt.type && $rights} {elseif $receipt.customerid} {/if}
{trans("Main Information:")}
{trans("Cash Registry:")} {include file="receipt/receiptcashregistries.html" regid=$receipt.regid}
{trans("Type:")}
{trans("Receipt number:")} {if $receipt.extnumber || $receipt.extended} {trans("Additional number:")} {/if}
{trans("Settlement date:")} {if $receipt.cdatewarning} {/if}
{trans("Target:")} {if ($rights & 2)==2} {/if} {if ($rights & 4)==4} {if $cashregcount > 1 && $receipt.type=="out"} {/if} {/if} {if ($rights & 8)==8} {if $receipt.type=="out"} {/if} {/if} {if ($rights & 16)==16} {/if}
{if isset($customer.id)} {customerlist form="setcustomer" customers=$customerlist selected=$customer.id selectname="customer" inputname="customerid" customOnChange="document.getElementById('radio_customer').checked=true;xajax_GetCashRegistriesXajax($('[name=customerid]').val(), $('[name=\'receipt[regid]\']').val())"} {else} {customerlist form="setcustomer" customers=$customerlist selected=$receipt.customerid selectname="customer" inputname="customerid" customOnChange="document.getElementById('radio_customer').checked=true;xajax_GetCashRegistriesXajax($('[name=customerid]').val(), $('[name=\'receipt[regid]\']').val())"} {/if}
{trans("Select")}
{if $error.nocash}

{$error.nocash}

{/if} {if $receipt.selected && $customer}

{trans("Customer:")} {$customer.customername}  »  {if $customer.postoffice && $customer.postoffice != $customer.city && $customer.street}{$customer.city}, {/if}{$customer.address}, {$customer.zip} {if $customer.postoffice}{$customer.postoffice}{else}{$customer.city}{/if}  »  {if $customer.balance < 0}{/if}{$customer.balance|money_format}{if $customer.balance < 0}{/if} {if $customer.groups} ({foreach from=$customer.groups item=item name=groups}{$item.name}{if $smarty.foreach.groups.iteration < sizeof($customer.groups)}, {/if}{/foreach}) {/if}
{if $customer.notes}
{trans("Notes:")} {$customer.notes|replace:"\n":"
"}
{/if} {if $customer.docwarning}
{trans("Documents:")} {$customer.docwarning}
{/if} {if $customer.nodeswarning}
{trans("Nodes:")} {$customer.nodeswarning}
{/if} {if $customer.nodegroupswarning}
{trans("Groups:")} {$customer.nodegroupswarning}
{/if}

{/if} {if $receipt.type=="out" && $receipt.o_type=="move" && $receipt.selected && $cashregcount > 1}
{trans("Moving assets:")}
{trans("Value:")}
{trans("get source registry balance")}
{trans("Cash Registry:")}
{trans("Save & Print")}
{/if} {if $receipt.selected && $receipt.o_type!="move"}

{if $receipt.o_type == "customer"} {/if} {cycle values="light,lucid" print=false name="items"} {foreach from=$contents item=item} {foreachelse} {/foreach} {if $contents} {/if}
{trans("Last 10 not accounted invoices:")}
{cycle values="light,lucid" print=false} {foreach from=$invoicelist item=item} {foreachelse} {/foreach}
{trans("Date:")} {trans("Invoice:")} {trans("Value:")}  
{$item.cdate|date_format:"%Y/%m/%d"} {$item.number} {$item.value|money_format}

{trans("That customer hasn't got not accounted invoices.")}

{trans("Add items")}
{trans("No.")} {trans("Name of product, commodity or service:")} {trans("Value:")}
{counter}. {$item.description} {$item.value|money_format}

{trans("Receipt have no items. Use form below for items addition.")}

{trans("Total:")} {sum array=$contents column=value string_format=$LANGDEFS.$_language.money_format}
{counter}.
{trans("Cancel")}   {trans("Clear Contents")}   {if !$customer && $receipt.o_type != "other" && $receipt.o_type != "advance"} {elseif !$contents} {else} {/if} {trans("Save")}   {if !$customer && $receipt.o_type != "other" && $receipt.o_type != "advance"} {elseif !$contents} {else} {/if} {trans("Save & Print")}

{/if} {/block}