{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:")} {deadline_selection name="cnote[deadline]" cdate_selector="#cdate" value=$cnote.deadline}
{trans("Payment type (cash/transfer/etc):")} {paytypes elemname="cnote[paytype]" selected=$cnote.paytype}
{trans("Document flags:")}
{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:")}
{button type="submit" icon="save" label="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 $item.deleted} {$item.name} {else} {/if} {if isset($item.name_custom_contents)} {$item.name_custom_contents} {/if} {if $item.deleted} {if $item.taxcategory} ({sprintf('%02d', $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 $item.deleted} {$item.prodid} {else} {/if} {if $item.deleted} {$item.count|string_format:"%.3f"} {$item.content} {else} {/if} {if $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 $item.deleted} {$item.valuenetto|money_format} {else} {/if} {if isset($item.valuenetto_custom_contents)} {$item.valuenetto_custom_contents} {/if} {if $item.deleted} {$item.tax} {else} {/if} {if $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 $item.deleted} {button type="link" icon="recover" tip="Recover this item" href="?m={$layout.module}&action=recoverpos&itemid={$itemid}"} {else} {button type="link" icon="delete" tip="Remove this item" href="?m={$layout.module}&action=deletepos&itemid={$itemid}"} {/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')}   {button icon="cancel" label="Cancel" href="?m=invoicelist"} {button icon="save" label="Save" onclick="saveInvoice();"} {button icon="print" label="Save & Print" onclick="printInvoice();"}
{/block}