diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-01-16 18:37:43 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-01-16 18:37:43 -0800 |
commit | b7cf1606a66cca95e3540f803ffa66d223f23a40 (patch) | |
tree | c31be9b2b863007e19c8d1299ec4a5b3a5fceb22 /FS/FS/part_pkg | |
parent | edb6acc2180c1a00262ef3572560a0a05862c8d1 (diff) | |
parent | d8eb6e54c5bee38f48ee3f7e22210e1b1f373efd (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'FS/FS/part_pkg')
-rw-r--r-- | FS/FS/part_pkg/voip_cdr.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index f007029..205335b 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -19,6 +19,7 @@ tie my %cdr_svc_method, 'Tie::IxHash', 'svc_pbx.svcnum' => 'Freeside service # (svc_pbx.svcnum)', 'svc_pbx.ip.src' => 'PBX name to source IP address', 'svc_pbx.ip.dst' => 'PBX name to destination IP address', + 'svc_acct.username' => 'Username (svc_acct.username)', ; tie my %rating_method, 'Tie::IxHash', @@ -463,16 +464,20 @@ sub calc_usage { #my @invoice_details_sort; # for tagging invoice details + # (unfortunate; should be a svc_x class method or table_info item or + # something) my $phonenum; if ( $svc_table eq 'svc_phone' ) { $phonenum = $svc_x->phonenum; } elsif ( $svc_table eq 'svc_pbx' ) { $phonenum = $svc_x->title; + } elsif ( $svc_table eq 'svc_acct' ) { + $phonenum = $svc_x->username; } $formatter->phonenum($phonenum); #first rate any outstanding CDRs not yet rated - # XXX eventually use an FS::Cursor for this + # use FS::Cursor for this starting in 4.x my $cdr_search = $svc_x->psearch_cdrs(%options); $cdr_search->limit(1000); $cdr_search->increment(0); # because we're changing their status as we go |