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

{$layout.pagetitle}

{if $newinvoice} {/if} {$default_printpage = ConfigHelper::getConfig('invoices.default_printpage')} {$default_taxrate = ConfigHelper::getConfig('phpui.default_taxrate')} {if isset($customer.id)} {$customerid = $customer.id} {else} {$customerid = $invoice.customerid} {/if}

{trans("Main Information:")}
{trans("Invoice number:")} {include file="invoice/invoicenumberplans.html" invoice=$invoice}
{trans("Settlement date:")} {if $invoice.cdatewarning} {/if}
{trans("Sale date:")}
{trans("Deadline:")}
{trans("Payment type:")}
{trans("Customer:")} {customerlist form="setcustomer" customers=$customers selected=$customerid selectname="customer" inputname="customerid" customOnChange="GetNumberPlans();customer_change();" select_id="ownerid_select" input_id="ownerid_input"}
{trans("Recipient address:")}
{trans("Submit")}
{if $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}
{if $covenantlist}
{cycle values="light,lucid" print=false} {section name=covenantlist loop=$covenantlist} {/section}
{trans("Invoiceless liabilities:")}
{trans("Date:")} {trans("Name of product, commodity or service:")} {trans("Product ID:")} {trans("Amount:")} {trans("Unit:")} {trans("Net Value:")} {trans("Tax:")} {trans("Gross Value:")}  
{$covenantlist[covenantlist].time|date_format:"%Y/%m/%d"} {$covenantlist[covenantlist].comment} {$covenantlist[covenantlist].net|money_format} {$covenantlist[covenantlist].tax} {$covenantlist[covenantlist].value|money_format}
{trans("Add items")}
{/if} {if $customer}
{cycle values="light,lucid" print=false} {foreach from=$contents item=item} {foreachelse} {/foreach} {if $contents} {/if}
{trans("No.")} {trans("Name of product, commodity or service:")} {trans("Product ID:")} {trans("Amount:")}
{trans("Unit:")}
{trans("Discount:")} {trans("Net Price:")}
{trans("Net Value:")}
{trans("Tax:")} {trans("Gross Price:")}
{trans("Gross Value:")}
 
{counter}. {$item.name} {$item.prodid} {$item.count|string_format:"%.2f"}
{$item.jm}
{if $item.pdiscount != 0}{$item.pdiscount|string_format:"%.2f%%"}{else}{if $item.vdiscount != 0}{$item.vdiscount|money_format}{/if}{/if} {$item.valuenetto|money_format}
{$item.s_valuenetto|money_format}
{$item.tax} {$item.valuebrutto|money_format}
{$item.s_valuebrutto|money_format}

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

{trans("Total:")} {sum array=$contents column=s_valuenetto string_format="%01.2f"}   {sum array=$contents column=s_valuebrutto string_format="%01.2f"}  
{count($contents) + 1}. {block name="invoicenew-tariff-selection"}
{* {trans("Select")}*} {/block}
  {trans("Cancel")} {trans("Clear Contents")} {if !$customer} {trans("Save")} {trans("Save & Print")} {elseif !$contents} {trans("Save")} {trans("Save & Print")} {else} {trans("Save")} {trans("Save & Print")} {/if}
{/if} {/block}