{if strlen($BILLING_ERR)}

{$BILLING_ERR}

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

{$STATUSMSG}

{/if} {if (is_array($bill_details) && (count($bill_details) > 0))} {/if}
{t}Create invoice{/t}
{t}Invoice nr.{/t}: {t}Invoice date{/t}: {t}Term of payment{/t}:
{t}Recipient (company){/t}:
{t}Invoice type{/t}: {t}Currency{/t}:
{t}Line items{/t}
{section name=lit loop=$billinfo.lineitems} {/section}
{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}Preview (select Re-calculate to refresh){/t}:
{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 $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))} {if (isset($humancost.details) && (count($humancost.details) > 0))} {/if} {if ($billinfo.taskassociation != $smarty.const.PHPAGA_BILL_TASKASSOC_LOCKED)} {/if} {section name=idx loop=$operations} $smarty.const.PHPAGA_SHOWOPDESCLENGHT))} onmouseover="return escape('{$operations[idx].op_desc|phpaga_popup_sanitizestr}')"{/if}> {$operations[idx].op_desc|wash|truncate:$smarty.const.PHPAGA_SHOWOPDESCLENGHT:"...":true} {/section} {if ($billinfo.taskassociation != $smarty.const.PHPAGA_BILL_TASKASSOC_LOCKED)} {/if}
{t}Associated tasks{/t}
{t}Human cost{/t}
{section name=members loop=$humancost.details} {/section}
{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} {$humancost.details[members].prjmem_hourlyrate|wash|phpaga_formatamount} {$humancost.details[members].amount|phpaga_formatamount}
{t}Total{/t} {$humancost.total_duration|phpaga_minutes2duration} {$humancost.total_amount|phpaga_formatamount}
{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 to 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}
{literal} {/literal}