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

{$layout.pagetitle}

{if $refdoc.divisionid != $refdoc.current_divisionid} {/if}
{trans("Main Information:")}
{trans("Credit note number:")}   {if $numberplanlist} {else} {/if}
{trans("Settlement date:")} {if ConfigHelper::checkPrivilege("invoice_consent_date")} {if $cnote.cdatewarning} {/if} {else} {$cnote.cdate|date_format:"%Y/%m/%d"} {/if}
{trans("Sale date:")} {if ConfigHelper::checkPrivilege("invoice_sale_date")} {else} {$cnote.sdate|date_format:"%Y/%m/%d"} {/if}
{trans("Deadline:")}
{trans("Payment type (cash/transfer/etc):")}
{trans("Use current division data:")}
{trans("Currency:")} {currency_selection selected=$cnote.currency elementname="cnote[currency]" locked=true}
{trans("Reason template:")} {include file="invoice/invoicenotereasontemplates.html" templates=$messagetemplates}
{trans("Reason:")}
{trans("Submit")}

{foreach $contents as $itemid => $item} {/foreach} {if $contents} {else} {/if}
{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("Tax:")} {trans("Gross Price:")}  
{$itemid}. {if $refdoc.closed} {$item.name} {elseif $item.deleted} {$item.name} {else} {/if} {if isset($item.name_custom_contents)} {$item.name_custom_contents} {/if} {if $refdoc.closed} {if $item.taxcategory} {$_TAX_CATEGORIES[$item.taxcategory].label} {else} {trans("- none -")} {/if} {elseif $item.deleted} {if $item.taxcategory} {$_TAX_CATEGORIES[$item.taxcategory].label} {else} {trans("- none -")} {/if} {else} {tax_category_selection elementname="taxcategory["|cat:$itemid|cat:"]" selected=$item.taxcategory tip="Select tax category"} {/if} {if $refdoc.closed} {$item.prodid} {elseif $item.deleted} {$item.prodid} {else} {/if} {if $refdoc.closed} {$item.count|string_format:"%.3f"}
{$item.content} {elseif $item.deleted} {$item.count|string_format:"%.3f"} {$item.content} {else} {/if}
{if $refdoc.closed} {if $item.pdiscount != 0}{$item.pdiscount|string_format:"%.2f%%"}{else}{if $item.vdiscount != 0}{$item.vdiscount|string_format:"%.2f"}{/if}{/if} {elseif $item.deleted} {if $item.pdiscount != 0}{$item.pdiscount|string_format:"%.2f%%"}{else}{if $item.vdiscount != 0}{$item.vdiscount|money_format}{/if}{/if} {else}
{/if}
{if $refdoc.closed} {$item.valuenetto|money_format} {elseif $item.deleted} {$item.valuenetto|money_format} {else} {/if} {if isset($item.valuenetto_custom_contents)} {$item.valuenetto_custom_contents} {/if} {if $refdoc.closed} {$item.tax} {elseif $item.deleted} {$item.tax} {else} {/if} {if $refdoc.closed} {$item.valuebrutto|money_format} {elseif $item.deleted} {if !empty($item.valuebrutto)}{$item.valuebrutto|money_format}{/if} {else}
{/if} {if isset($item.valuebrutto_custom_contents)} {$item.valuebrutto_custom_contents} {/if}
{if $refdoc.closed} {elseif $item.deleted} {else} {/if}
{trans("Total:")} {sum array=$contents column=s_valuenetto string_format="%01.2f"}   {sum assign="s_valuebrutto" array=$contents column=s_valuebrutto string_format="%01.2f"} {$s_valuebrutto}  
{$default_printpage = ConfigHelper::getConfig('invoices.default_printpage')}   {trans("Cancel")} {trans("Save")} {trans("Save & Print")}
{/block}