{if !count($cpndetails.details)}
{t}No data matching your search criteria was found.{/t}
{else}
{t escape="0" 1=$curr_name 2=$YEAR 3=$fy_dates.start 4=$fy_dates.end}Amounts invoiced and received in %1, FY %2 (%3-%4){/t} 
{if count($cpndetails) > 0} {section name=i loop=$cpndetails.details} {/section}
{t}Per customer{/t}
{t}Customer{/t} {t escape="0" 1=$YEAR}Invoiced in FY %1{/t} {t escape="0" 1=$YEAR}Received in FY %1{/t} {t}Still unpaid{/t}
{$cpndetails.details[i].cpn_name|wash} {$config.MONETARY_SYMBOL|wash}{$cpndetails.details[i].sum_billed|phpaga_formatamount} {$config.MONETARY_SYMBOL|wash}{$cpndetails.details[i].sum_paid|phpaga_formatamount} {$config.MONETARY_SYMBOL|wash}{$cpndetails.details[i].sum_missing|phpaga_formatamount}
{t}Totals{/t} {$config.MONETARY_SYMBOL|wash}{$cpndetails.totals.billed|phpaga_formatamount} {$config.MONETARY_SYMBOL|wash}{$cpndetails.totals.paid|phpaga_formatamount} {$config.MONETARY_SYMBOL|wash}{$cpndetails.totals.missing|phpaga_formatamount}
{/if} {/if}