{if strlen($BILLING_ERR)}

{$BILLING_ERR}

{/if}
{literal} {/literal} {if strlen($STATUSMSG)}

{$STATUSMSG}

{/if}
{t}Create invoice{/t}
{t}Invoice nr.{/t}: {t}Invoice date{/t}: {t}Date due{/t}: {t}Term of payment{/t}:
{t}Recipient (company){/t}: {t}Contact person{/t}:
{t}Invoice type{/t}: {t}Currency{/t}:
{t}Recurring invoice{/t}: {if strlen($billinfo.rbill_id)} {t 1=$billinfo.rbill_id}Part of recurring bill %1.{/t} {else} {t}End (optional){/t}: {/if}
{t}Additional information{/t}:
{literal} {/literal} {section name=lit loop=$billinfo.lineitems} {/section}
{t}Line items{/t}
{t}Product code{/t} {t}Description{/t} {t}Qty./Hours{/t} {t}Unit price net{/t} {t}Net price{/t} {t}Actions{/t}
{* *} {* *} {if strlen($billinfo.lineitems[lit].op_id)}
{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} {if (!strlen($billinfo.lineitems[lit].op_id) && !strlen($billinfo.lineitems[lit].mat_id) && !strlen($billinfo.lineitems[lit].lit_prodcode))} {t}Products{/t} {/if}
{$billinfo.lineitems[lit].lit_unitnetprice|wash|phpaga_formatamount|default:" "} {if !strlen($billinfo.lineitems[lit].op_id)} {t}Delete{/t} {else}   {/if}
{t}Add line item{/t} {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} {t}Actions{/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|wash}{$billinfo.expenses[exp].exp_sum|phpaga_formatamount} {$billinfo.expenses[exp].pe_person} {t}Delete{/t}
{/if}
{t}Preview{/t} {t}(select Re-calculate to refresh){/t} 
{if (is_array($bill_details) && (count($bill_details) > 0))} {section name=details loop=$bill_details} {if $bill_details[details].text eq ""} {else} {/if} {if $bill_details[details].amount eq ""} {else} {/if} {/section}
  {$bill_details[details].text|wash}   {$bill_details[details].amount}
{/if} {if $STATUSMSG != ""}

{$STATUSMSG}

{/if}
{section name=pr loop=$products} {/section}
{t}Products{/t} X
{t}Product code{/t} {t}Name{/t} {t}Price{/t} {t}Stock{/t} {t}Category{/t}
{$products[pr].prod_code|wash|default:" "} {$products[pr].prod_name|wash|default:" "} {$products[pr].prod_price|wash|phpaga_formatamount|default:" "} {$products[pr].prod_stock|wash|default:" "} {$products[pr].prcat_title|wash|default:" "}
{if (isset($operations) && is_array($operations) && (count($operations) > 0))}
{t}Associated tasks{/t} 
{if (isset($humancost.details) && (count($humancost.details) > 0))} {section name=members loop=$humancost.details} {/section}
{t}Human cost{/t}
{t}Person{/t} {t}Duration{/t} {t}Hourly wage rate{/t} {t}Cost{/t}
{$humancost.details[members].pe_person|wash} {$humancost.details[members].sum_duration|phpaga_minutes2duration} {$config.MONETARY_SYMBOL}{$humancost.details[members].prjmem_hourlyrate|wash|phpaga_formatamount} {$config.MONETARY_SYMBOL}{$humancost.details[members].amount|phpaga_formatamount}
{t}Total{/t} {$humancost.total_duration|phpaga_minutes2duration} {$config.MONETARY_SYMBOL}{$humancost.total_amount|phpaga_formatamount}
{/if} {if ($billinfo.taskassociation != $smarty.const.PHPAGA_BILL_TASKASSOC_LOCKED)}
{/if} {section name=idx loop=$operations} $smarty.const.PHPAGA_SHOWOPDESCLENGHT))} class="tTip" title="{$operations[idx].op_desc|phpaga_popup_sanitizestr}"{/if}> {$operations[idx].op_desc|wash|trnc:$smarty.const.PHPAGA_SHOWOPDESCLENGHT:"...":true} {/section}
{t}Associated tasks{/t}
{if ($billinfo.taskassociation != $smarty.const.PHPAGA_BILL_TASKASSOC_LOCKED)} {t}Please deselect the tasks you don't want to be billed with this invoice.{/t} {else} {t}The following tasks are associated with this invoice{/t} {/if}
  {t}Project{/t} {t}Task{/t} {t}Date{/t} {t}Person{/t} {t}Category{/t} {t}Hours{/t} {t}Actions{/t}
{if ($billinfo.taskassociation != $smarty.const.PHPAGA_BILL_TASKASSOC_LOCKED)} {else}   {/if} {$operations[idx].prj_title|wash} {$operations[idx].op_startdate|wash} {$operations[idx].op_person|wash} {$operations[idx].opcat_title|wash} {$operations[idx].op_duration|phpaga_minutes2duration} {t}View{/t}
{t}Total duration{/t}: {$TOTALHOURS}  
{if ($billinfo.taskassociation != $smarty.const.PHPAGA_BILL_TASKASSOC_LOCKED)}
{/if} {/if}