diff options
author | ivan <ivan> | 2010-08-16 19:45:25 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-08-16 19:45:25 +0000 |
commit | 39a2828f29728d34af96fc6e0aef23ea01f7a7a2 (patch) | |
tree | 0f493b906a9f2bda2beebe04ed1830e133a085cc /httemplate/view/svc_phone.cgi | |
parent | 4774ede40353662ddcb4181d824ab2167c68ff8c (diff) |
fix search of pending/billed CDRs to find src field too, RT#9640
Diffstat (limited to 'httemplate/view/svc_phone.cgi')
-rw-r--r-- | httemplate/view/svc_phone.cgi | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi index 75591c747..3424d34f3 100644 --- a/httemplate/view/svc_phone.cgi +++ b/httemplate/view/svc_phone.cgi @@ -120,19 +120,28 @@ my $html_foot = sub { 'billed' => 'done', ; - #XXX src & charged party (& default prefix) as per voip_cdr.pm - #XXX handle toll free too - my $number = $svc_phone->phonenum; $number = $svc_phone->countrycode. $number unless $svc_phone->countrycode eq '1'; + #src & charged party as per voip_cdr.pm + my $search; + my $cust_pkg = $svc_phone->cust_svc->cust_pkg; + if ( $cust_pkg && $cust_pkg->part_pkg->option('disable_src') ) { + $search = "charged_party_or_src=$number"; + } else { + $search = "src=$number"; + } + + #XXX default prefix as per voip_cdr.pm + #XXX handle toll free too + #my @links = map { # qq(<A HREF="${p}search/cdr.html?src=$number;freesidestatus=$what{$_}">). # "View $_ CDRs</A>"; #} keys(%what); my @links = map { - qq(<A HREF="${p}search/cdr.html?cdrbatchnum=__ALL__;charged_party=$number;freesidestatus=$what{$_}">). + qq(<A HREF="${p}search/cdr.html?cdrbatchnum=__ALL__;$search;freesidestatus=$what{$_}">). "View $_ CDRs</A>"; } keys(%what); |