{if $invoice.netflag}
{if $item.vdiscount != 0}
{$valuenetto = $item.valuenetto + $item.vdiscount}
{elseif $item.pdiscount != 0}
{$valuenetto = (100 * $item.valuenetto ) / (100 - $item.pdiscount)}
{else}
{$valuenetto = $item.valuenetto}
{/if}
{$valuenetto = round($valuenetto, 2)}
{$valuebrutto = round($valuenetto * ($taxeslist[$item.taxid].value / 100 + 1), 2)}
{else}
{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 / ($taxeslist[$item.taxid].value / 100 + 1), 2)}
{/if}
{if isset($error.posuid)}
{$row = $itemdata}
{else}
{$row = $item}
{/if}
{counter}.
|
{$item.name|escape}
{if isset($item.name_custom_contents)}
{$item.name_custom_contents}
{/if}
|
{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 isset($_SERVICETYPES[$item.servicetype])}
{$_SERVICETYPES[$item.servicetype]}
{else}
{trans("- none -")}
{/if}
{if $item.taxcategory}
({sprintf('%02d', $item.taxcategory)}) {$_TAX_CATEGORIES[$item.taxcategory].label}
{else}
{trans("- none -")}
{/if}
|
{$item.prodid}
|
{if isset($item.count_custom_contents)}
{$item.count_custom_contents}
{/if}
{$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}
|
{foreach $taxeslist as $tax}
{/foreach}
{$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}
{button type="link" icon="edit" tip="Edit this item" onclick="editItem({$posuid});"
class="invoice-contents-field-value"}
{button type="link" icon="save" tip="Save this item" onclick="saveItem({$posuid});"
class="invoice-contents-field-edit" visible=false}
{button type="link" icon="cancel" tip="Cancel changes" onclick="cancelEditItem({$posuid});"
class="invoice-contents-field-edit" visible=false}
{button type="link" icon="delete" tip="Remove this item from list" onclick="delItem({$posuid});"}
{/if}
|
{foreachelse}