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

{$layout.pagetitle}

{trans("Main Information:")}
{trans("Debit note number:")}   {if $numberplanlist} {else} {/if}
{trans("Settlement date:")} {if $note.cdatewarning} {/if}
{trans("Deadline:")} ({($note.cdate+$note.paytime*86400)|date_format:"%Y/%m/%d"})
{trans("Customer:")} {if isset($customer.id)} {customerlist form="setcustomer" customers=$customers selected=$customer.id selectname="customer" inputname="customerid"} {else} {customerlist form="setcustomer" customers=$customers selected=$note.customerid selectname="customer" inputname="customerid"} {/if}
{trans("Submit")}
{if $customer}

{trans("Customer:")} {$customer.customername}  »  {$customer.address}   {$customer.zip} {$customer.city}  »  {if $customer.balance < 0}{/if}{$customer.balance|money_format}{if $customer.balance < 0}{/if}

{/if}

{*{counter print=false}*} {cycle values="light,lucid" print=false} {foreach from=$contents item=item} {foreachelse} {/foreach} {if $contents} {/if}
{trans("No.")} {trans("Title:")} {trans("Value:")}  
{counter}. {$item.description} {$item.value|string_format:"%.2f"}

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

{trans("Total:")} {sum array=$contents column=value string_format="%01.2f"}  
{counter}.
{trans("Cancel")} {if !$customer} {trans("Save")} {trans("Save & Print")} {elseif !$contents} {trans("Save")} {trans("Save & Print")} {else} {trans("Save")} {trans("Save & Print")} {/if}
{/block}