X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fvoip_inbound.pm;h=15af706c1c899398287d6b68dc5f3b77c61afac0;hb=d82acd06f8f8a431c69c3b14e3c5cb8252edb02d;hp=81f276500b9b2acdc64dab8fba7d82814ccf37e0;hpb=d22baa4e71bfa9e153c1fe1152ff4c748f1d935c;p=freeside.git diff --git a/FS/FS/part_pkg/voip_inbound.pm b/FS/FS/part_pkg/voip_inbound.pm index 81f276500..15af706c1 100644 --- a/FS/FS/part_pkg/voip_inbound.pm +++ b/FS/FS/part_pkg/voip_inbound.pm @@ -292,10 +292,7 @@ sub calc_usage { my @call_details = ( $cdr->downstream_csv( 'format' => $output_format, 'charge' => $charge, - 'seconds' => ($use_duration - ? $cdr->duration - : $cdr->billsec - ), + 'seconds' => $seconds, 'granularity' => $granularity, ) ); @@ -317,10 +314,10 @@ sub calc_usage { 'done', $charge, $cust_svc->svcnum, - 'rated_seconds' => $use_duration ? $cdr->duration : $cdr->billsec, + 'rated_seconds' => $seconds, 'rated_granularity' => $granularity, 'rated_classnum' => $cdr->calltypenum, - 'inbound' => 1, + 'inbound' => 1, # to update cdr_termination, not cdr ); die $error if $error; $formatter->append($cdr); @@ -402,15 +399,5 @@ sub is_free { 0; } -# This equates svc_phone records; perhaps svc_phone should have a field -# to indicate it represents a line -# #XXX no count_available_phones? -sub calc_units { - my($self, $cust_pkg ) = @_; - my $count = - scalar(grep { $_->part_svc->svcdb eq 'svc_phone' } $cust_pkg->cust_svc); - $count; -} - 1;