{include file="delete_payment.tpl.js"} {include file="delete_latefee.tpl.js"} {literal} {/literal}

{t}Print options{/t}



{t}Invoice{/t} {$billInfo.bill_number|wash}/{$billInfo.bill_date|wash}{if strlen($billInfo.rbill_id)} (recurring invoice #{$billInfo.rbill_id|wash}){/if}

[ {if ($perm_invoices && ($billInfo.bill_paydate eq ""))}{t}Delete{/t} |{/if} {if $perm_invoices}{t}Clone{/t} |{/if} {t}Print to PDF{/t} {if ($perm_invoices)} | {if ($billInfo.bill_paydate eq "")}{t}Make Payment{/t}{/if} {if not strlen($billInfo.bill_paydate)} | {t}Add Late Fee{/t} {/if} {/if} | {if ($billInfo.bill_note eq "")}{t}Add Note{/t}{else}{t}Edit Note{/t}{/if} ]
{if strlen($billInfo.bill_date_due)} {$billInfo.bill_date_due|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT} {else} {/if} {if $billInfo.bill_paydate eq ""} {else} {/if} {if $billInfo.pmtsum.pmt_sum} {else} {/if}
{t}Invoice{/t} {$billInfo.bill_number|wash}/{$billInfo.bill_date|wash}{if strlen($billInfo.rbill_id)} (recurring invoice #{$billInfo.rbill_id|wash}){/if}
{t}Invoice nr.{/t}: {$billInfo.bill_number|wash} {t}Invoice date{/t}: {$billInfo.bill_date|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}
{t}Company{/t}: {$billInfo.cpn_name|wash} {t}Date due{/t}: {t}not set{/t}
{t}Contact person{/t}: {$billInfo.bill_person_recipient|wash|default:" "} {t}Date paid{/t}: {t}not paid{/t} {$billInfo.bill_paydate|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}
{t}Invoice type{/t}: {$billInfo.bmt_description|wash} {t}Total Payments{/t}: {$config.MONETARY_SYMBOL|wash}{$billInfo.pmtsum.pmt_sum|number_format:2:$config.SEPARATOR_DECIMALS:$config.SEPARATOR_THOUSANDS|default:" "}{t}no payments yet{/t}
{t}Currency{/t}: {$billInfo.curr_name|default:" "} {t}Balance Due{/t}: {$billInfo.bill_balance_due|number_format:2:$config.SEPARATOR_DECIMALS:$config.SEPARATOR_THOUSANDS|default:" "}
{t}Additional line{/t}: {$billInfo.bill_additional_line|default:" "}
{t}Details{/t}: {section name=details loop=$billInfo.bill_details} {if $billInfo.bill_details[details].text eq ""} {else} {/if} {if $billInfo.bill_details[details].amount eq ""} {else} {/if} {/section}
  {$billInfo.bill_details[details].text|wash}   {$billInfo.bill_details[details].amount}
{t}Notes{/t}: {$billInfo.bill_note|wash}
{section name=lit loop=$billInfo.lineitems} {/section}
{t}Line items{/t}
{t}Product code{/t} {t}Description{/t} {t}Qty./Hours{/t} {t}Net price{/t}
{$billInfo.lineitems[lit].lit_prodcode|wash|default:" "} {if strlen($billInfo.lineitems[lit].op_id)} {if strlen($billInfo.lineitems[lit].lit_prodcode)}
{/if} {if (is_numeric($billInfo.lineitems[lit].op_id) && ($billInfo.lineitems[lit].op_id > 0))} {t}View{/t} {else} {t}Multiple tasks are associated with this line item{/t} {/if} {/if} {if strlen($billInfo.lineitems[lit].mat_id)}
{t}View{/t} {/if}
{$billInfo.lineitems[lit].lit_desc|wash|nl2br} {$billInfo.lineitems[lit].lit_qty|wash|default:" "} {$config.MONETARY_SYMBOL|wash}{$billInfo.lineitems[lit].lit_netprice|wash|phpaga_formatamount|default:" "}
{if not strlen($billInfo.bill_paydate)} {else} {/if} {if count($billInfo.payments)} {section name=pmt loop=$billInfo.payments} {/section} {/if}
{t}Payments{/t}
{t}Date{/t} {t}Note{/t} {t}Amount{/t} {t}Actions{/t} {t}Amount{/t}
{$billInfo.payments[pmt].pmt_date|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT} {$billInfo.payments[pmt].pmt_note|wash|default:" "} {$config.MONETARY_SYMBOL|wash}{$billInfo.payments[pmt].pmt_amt|number_format:2:$config.SEPARATOR_DECIMALS:$config.SEPARATOR_THOUSANDS|default:" "} {strip} {if not strlen($billInfo.bill_paydate)} {t}Edit{/t} {t}Delete{/t} {/if} {/strip}
{if not strlen($billInfo.bill_paydate)} {else} {/if} {if count($billInfo.latefees)} {section name=fee loop=$billInfo.latefees} {/section} {/if}
{t}Late Fees{/t}
{t}Date{/t} {t}Amount{/t} {t}Actions{/t} {t}Amount{/t}
{$billInfo.latefees[fee].fee_date|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT} {$config.MONETARY_SYMBOL|wash}{$billInfo.latefees[fee].fee_amt|number_format:2:$config.SEPARATOR_DECIMALS:$config.SEPARATOR_THOUSANDS|default:"&dbsp;"}
{strip} {if not strlen($billInfo.bill_paydate)} {t}Delete{/t} {/if} {/strip}
{if count($billInfo.expenses)}
{section name=exp loop=$billInfo.expenses} {/section}
{t}Expenses{/t}
{t}Project{/t} {t}Date{/t} {t}Description{/t} {t}Cost{/t} {t}Person{/t}
{$billInfo.expenses[exp].prj_title|wash} {$billInfo.expenses[exp].exp_date|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT} {$billInfo.expenses[exp].exp_desc|wash} {$config.MONETARY_SYMBOL}{$billInfo.expenses[exp].exp_sum|phpaga_formatamount|default:" "} {$billInfo.expenses[exp].pe_person}
{/if} {if isset($billInfo.operations.oprows) && is_array($billInfo.operations.oprows) && count($billInfo.operations.oprows) > 0}
{section name=operations loop=$billInfo.operations.oprows} {/section}
{t}Associated tasks{/t}
{t}Project{/t} {t}Task{/t} {t}Date{/t} {t}Person{/t} {t}Category{/t} {t}Hours{/t} {t}Actions{/t}
{$billInfo.operations.oprows[operations].prj_title|wash} $smarty.const.PHPAGA_SHOWOPDESCLENGHT))} class="tTip" title="{$billInfo.operations.oprows[operations].op_desc|phpaga_popup_sanitizestr}"{/if}> {$billInfo.operations.oprows[operations].op_desc|wash|trnc:$smarty.const.PHPAGA_SHOWOPDESCLENGHT:"...":true} {$billInfo.operations.oprows[operations].op_startdate|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT} {$billInfo.operations.oprows[operations].op_person|wash} {$billInfo.operations.oprows[operations].opcat_title|wash} {$billInfo.operations.oprows[operations].duration} {t}View{/t}
{t}Total duration{/t}: {$billInfo.operations.duration}  
{/if}