X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_phone.cgi;h=6f39860836216943cdc695d51362a1a404a3e030;hp=f540555d4f495799965d09cda7de92c08b10d00f;hb=1203e278e2ec38fcf1468da2e4f10862004bebeb;hpb=2b73cfffe496ac9dc13302d6469871c1d3e13e57 diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi index f540555d4..6f3986083 100644 --- a/httemplate/view/svc_phone.cgi +++ b/httemplate/view/svc_phone.cgi @@ -1,10 +1,40 @@ <% include('elements/svc_Common.html', - 'table' => 'svc_phone', - 'fields' => [qw( countrycode phonenum pin )], - 'labels' => { - 'countrycode' => 'Country code', - 'phonenum' => 'Phone number', - 'pin' => 'PIN', - }, - ) + 'table' => 'svc_phone', + 'fields' => [qw( countrycode phonenum pin )], + 'labels' => { + 'countrycode' => 'Country code', + 'phonenum' => 'Phone number', + 'pin' => 'PIN', + }, + 'html_foot' => $html_foot, + ) %> +<%init> + +my $html_foot = sub { + my $svc_phone = shift; + + tie my %what, 'Tie::IxHash', + 'pending' => 'NULL', + 'billed' => 'done', + ; + + #XXX src & charged party (& default prefix) as per voip_cdr.pm + #XXX handle toll free too + + my $number = $svc_phone->phonenum; + + #my @links = map { + # qq(). + # "View $_ CDRs"; + #} keys(%what); + my @links = map { + qq(). + "View $_ CDRs"; + } keys(%what); + + join(' | ', @links). '
'; + +}; + +