{include file="delete_company.tpl.js"} {if ($opcatresult && isset($opcats) && (count($opcats) > 0))} {/if} {if (isset($cpnInfo.projects) && is_array($cpnInfo.projects) && (count($cpnInfo.projects) > 0))} {/if} {if (isset($cpnInfo.billing_summary) && is_array($cpnInfo.billing_summary))} {if (isset($cpnInfo.billing_summary.issued) && is_array($cpnInfo.billing_summary.issued) && (count(($cpnInfo.billing_summary.issued)) > 0))} {/if} {if (isset($cpnInfo.billing_summary.outstanding) && is_array($cpnInfo.billing_summary.outstanding) && (count(($cpnInfo.billing_summary.outstanding)) > 0))} {/if} {/if} {if (isset($cpnInfo.bills) && is_array($cpnInfo.bills) && (count($cpnInfo.bills) > 0))} {/if} {if (isset($cpnInfo.quotations) && is_array($cpnInfo.quotations) && (count($cpnInfo.quotations) > 0))} {/if} {if (isset($persons) && is_array($persons) && (count($persons) > 0))} {/if}
{t}Company{/t}: {$cpnInfo.cpn_name|wash} {if ($perm_companies) || ($cpnInfo.pe_id == $smarty.session.auth_user.pe_id)} [ {t}Delete{/t} | {t}Edit{/t} ] {else}   {/if}
{t}Company{/t}: {$cpnInfo.cpn_name|wash|default:" "}
{t}Address{/t}: {$cpnInfo.cpn_address|wash|default:" "}
{t}Address 2{/t}: {$cpnInfo.cpn_address2|wash|default:" "}
{t}Location{/t}: {$cpnInfo.full_location|wash|default:" "}
{t}Country{/t}: {$cpnInfo.ctr_name|wash|default: {$cpnInfo.ctr_name|wash|default:" "}
{t}Category{/t}: {$cpnInfo.ccat_title|wash|default:" "}
{t}Tax number{/t}: {$cpnInfo.cpn_taxnr|wash|default:" "}
{t}Default term of payment{/t}: {$cpnInfo.cpn_defaultpayterm|wash|default:" "}
{t}Phone{/t}: {$cpnInfo.cpn_phone|wash|default:" "}
{t}Fax{/t}: {$cpnInfo.cpn_fax|wash|default:" "}
{t}Url{/t}: {if strlen($cpnInfo.cpn_url)}{$cpnInfo.cpn_url|wash|phpaga_urlmodifier}{else} {/if}
{t}Email{/t}: {if strlen($cpnInfo.cpn_email)}{$cpnInfo.cpn_email|wash}{else} {/if}
{t}Record owner{/t}: {$cpnInfo.owner_pe_person|wash|default:" "}
{t}Task categories{/t} [ {if $opcat_byproject == 0}{t}Details{/t}{else}{t}Overall{/t}{/if} ]
{if ($opcat_byproject == 0)}
{section name=opcdet loop=$opcats} {/section}
{$opcats[opcdet].opcat_title|wash}:   {$opcats[opcdet].opcat_duration|phpaga_minutes2duration} 
 
{t}Total duration{/t}: {$TOTAL_DURATION|phpaga_minutes2duration}
{t}Task categories{/t}
{else} {foreach item=prj from=$opcats.projects} {/foreach} {foreach key=opckey item=opc from=$opcats.opcats} {foreach item=row from=$opcats.rows[$opckey]} {/foreach} {/foreach} {foreach item=prj from=$opcats.projects} {/foreach}
  {$prj.prj_title|wash} 
{$opc.opcat_title|wash} {if strlen($row.opcat_duration)}{$row.opcat_duration|phpaga_minutes2duration}{else} {/if} {$opc.duration|phpaga_minutes2duration}
  {$prj.duration|phpaga_minutes2duration} {$TOTAL_DURATION|phpaga_minutes2duration}
{/if}
{t}Projects{/t}
{section name=prjs loop=$cpnInfo.projects} {/section}
{t}Title{/t} {t}Status{/t} {t}Start date{/t} {t}Projected end{/t} {t}End date{/t} {t}Category{/t} {t}Hours{/t} {t}Actions{/t}
{$cpnInfo.projects[prjs].prj_title|wash} {$cpnInfo.projects[prjs].prjstat_title|wash} {$cpnInfo.projects[prjs].prj_startdate|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT} {if strlen($cpnInfo.projects[prjs].prj_estimatedend)} {$cpnInfo.projects[prjs].prj_estimatedend|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}{else} {/if} {if strlen($cpnInfo.projects[prjs].prj_enddate)}{$cpnInfo.projects[prjs].prj_enddate|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}{else} {/if} {$cpnInfo.projects[prjs].prjcat_title|wash} {$cpnInfo.projects[prjs].prj_duration|phpaga_minutes2duration} {strip} {t}View{/t} {t}Edit{/t} {t}Add task{/t} {/strip}
{t}Invoices issued{/t}
{section name=isum loop=$cpnInfo.billing_summary.issued} {/section}
{t}Nr. of invoices{/t} {t}Time frame{/t} {t}Total amount{/t} {t}Currency{/t}
{$cpnInfo.billing_summary.issued[isum].count|default:" "} {$cpnInfo.billing_summary.issued[isum].min_date|wash|default:" "} - {$cpnInfo.billing_summary.issued[isum].max_date|default:" "} {$cpnInfo.billing_summary.issued[isum].amount|phpaga_formatamount|default:" "} {$cpnInfo.billing_summary.issued[isum].curr_name|wash|default:" "}
{t}Outstanding invoices{/t}
{section name=isum loop=$cpnInfo.billing_summary.outstanding} {/section}
{t}Nr. of invoices{/t} {t}Time frame{/t} {t}Total amount{/t} {t}Currency{/t}
{$cpnInfo.billing_summary.outstanding[isum].count|default:" "} {$cpnInfo.billing_summary.outstanding[isum].min_date|wash|default:" "} - {$cpnInfo.billing_summary.outstanding[isum].max_date|default:" "} {$cpnInfo.billing_summary.outstanding[isum].amount|phpaga_formatamount|default:" "} {$cpnInfo.billing_summary.outstanding[isum].curr_name|wash|default:" "}
{t}Invoices{/t}
{section name=inv loop=$cpnInfo.bills} {/section}
{t}Invoice nr.{/t} {t}Invoice date{/t} {t}Amount{/t} {t}Currency{/t} {t}Date paid{/t}
{$cpnInfo.bills[inv].bill_number|wash} {$cpnInfo.bills[inv].bill_date|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT} {$cpnInfo.bills[inv].bill_endsum|phpaga_formatamount|default:" "} {$cpnInfo.bills[inv].curr_name|wash|default:" "} {$cpnInfo.bills[inv].bill_paydate|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}
{t}Quotations{/t}
{section name=quot loop=$cpnInfo.quotations} {/section}
{t}Quotation nr.{/t} {t}Quotation date{/t} {t}Amount{/t} {t}Currency{/t}
{$cpnInfo.quotations[quot].quot_number|wash} {$cpnInfo.quotations[quot].quot_date|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT} {$cpnInfo.quotations[quot].quot_endsum|phpaga_formatamount|default:" "} {$cpnInfo.quotations[quot].curr_name|wash|default:" "}
{t}Employees{/t}
{section name=idx loop=$persons} {/section}
{t}Name{/t} {t}Address{/t} {t}City{/t} {t}Country{/t} {t}Work phone{/t}: {t}Email{/t}
{$persons[idx].pe_person|wash} {$persons[idx].pe_address|wash|default:" "} {$persons[idx].pe_location|wash|default:" "} {$persons[idx].ctr_name|wash|default:" "} {$persons[idx].pe_phonework|wash|default:" "} {if (isset($persons[idx].pe_email) && strlen($persons[idx].pe_email))}{$persons[idx].pe_email|wash}{else} {/if}