if $self->recur_temporality eq 'preceding'
&& ( $last_bill eq '' || $last_bill == 0 );
- my $spool_cdr = $cust_pkg->cust_main->spool_cdr;
-
-
my $charges = 0;
# my $downstream_cdr = '';
my @call_details = (
$cdr->downstream_csv( 'format' => $output_format,
'charge' => $charge,
- 'seconds' => ($use_duration
- ? $cdr->duration
- : $cdr->billsec
- ),
+ 'seconds' => $seconds,
'granularity' => $granularity,
)
);
'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);
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;