X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fvoip_cdr.pm;h=205335b7ef1afc2c46905bbaceb521e9904e4e35;hp=f007029d6c6a48d0048a2a5d7150c9814b99bbc7;hb=b7cf1606a66cca95e3540f803ffa66d223f23a40;hpb=edb6acc2180c1a00262ef3572560a0a05862c8d1 diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index f007029d6..205335b7e 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