{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}
{foreach $contents as $posuid => $item} {if $item.vdiscount != 0} {$valuebrutto = $item.valuebrutto + $item.vdiscount} {elseif $item.pdiscount != 0} {$valuebrutto = (100 * $item.valuebrutto ) / (100 - $item.pdiscount)} {else} {$valuebrutto = $item.valuebrutto} {/if} {$valuebrutto = round($valuebrutto, 2)} {$valuenetto = round(($valuebrutto * 100) / (100 + $taxeslist[$item.taxid].value), 2)} {if isset($error.posuid)} {$row = $itemdata} {else} {$row = $item} {/if} {foreachelse} {/foreach} {if $contents} {else} {/if} {block name="`$layout.module`-additem"} {if !$invoice.closed} {/if} {/block}
{trans("No.")} {trans("Name of product, commodity or service:")} {trans("Tax category:")} {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} {tax_category_selection class="invoice-contents-field-edit" elementname="invoice-contents["|cat:$posuid|cat:"][taxcategory]" selected=$row.taxcategory visible=false tip="Select tax category" data_old_value=$item.taxcategory} {if $item.taxcategory} {$_TAX_CATEGORIES[$item.taxcategory].label} {else} {trans("- none -")} {/if} {$item.prodid} {$item.count|string_format:"%.3f"}
{$item.jm}
{if $item.pdiscount != 0}{$item.pdiscount|string_format:"%01.2f %%"}{else}{if $item.vdiscount != 0}{$item.vdiscount|string_format:"%01.2f"}{/if}{/if} {$item.valuenetto|string_format:"%01.2f"} {if isset($item.valuenetto_custom_contents)} {$item.valuenetto_custom_contents} {/if}
{$item.s_valuenetto|string_format:"%01.2f"}
{if isset($item.s_valuenetto_custom_contents)} {$item.s_valuenetto_custom_contents} {/if}
{$item.tax} {$item.valuebrutto|string_format:"%01.2f"} {if isset($item.valuebrutto_custom_contents)} {$item.valuebrutto_custom_contents} {/if}
{$item.s_valuebrutto|string_format:"%01.2f"}
{if isset($item.s_valuebrutto_custom_contents)} {$item.s_valuebrutto_custom_contents} {/if}
{if !$invoice.closed} {/if}

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

{trans("Total:")} {sum array=$contents column=s_valuenetto string_format="%01.2f"}   {sum assign="s_valuebrutto" array=$contents column=s_valuebrutto} {$s_valuebrutto|string_format:"%01.2f"}  
{counter}. {block name="`$layout.module`-tariff-selection"}
{/block}
{if isset($itemdata) && !isset($error.posuid)} {$taxcategory = $itemdata.taxcategory} {else} {$taxcategory = 0} {/if} {tax_category_selection elementname="taxcategory" tip="Select tax category" selected=$taxcategory}
{if $layout.module == 'invoicenew'} {/if}   {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}