{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.pdiscount) * $item.valuebrutto) / 100} {else} {$valuebrutto = $item.valuebrutto} {/if} {$valuebrutto = round($valuebrutto, 2)} {$valuenetto = round(($valuebrutto * 100) / (100 + $taxeslist[$item.taxid].value), 2)} {foreachelse} {/foreach} {if $contents} {/if} {block name="`$layout.module`-additem"} {if !$invoice.closed} {/if} {/block}
{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:"%.3f"}
{$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} {if isset($item.valuenetto_custom_contents)} {$item.valuenetto_custom_contents} {/if}
{$item.s_valuenetto|money_format}
{if isset($item.s_valuenetto_custom_contents)} {$item.s_valuenetto_custom_contents} {/if}
{$item.tax} {$item.valuebrutto|money_format} {if isset($item.valuebrutto_custom_contents)} {$item.valuebrutto_custom_contents} {/if}
{$item.s_valuebrutto|money_format}
{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 array=$contents column=s_valuebrutto string_format="%01.2f"}  
{counter}. {block name="`$layout.module`-tariff-selection"}
{/block}
{if $layout.module == 'invoicenew'} {/if} {trans("original")} {trans("copy")} {trans("duplicate")}  {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}