use strict;
use vars qw( $DEBUG );
-use parent qw(FS::detail_format);
+use base qw(FS::detail_format);
use List::Util qw(sum);
$DEBUG = 0;
# but interstate-ness should be symmetric, yes? if A places an
# interstate call to B, then B receives an interstate call from A.
my $subtotal = $prefixes->{$prefix}{$cdr->rated_ratename}
- or die "unknown rated_ratename '" .$cdr->rated_ratename.
- "' in CDR #".$cdr->acctid."\n";
+ or next;
+ # silently skip calls that are neither interstate nor intrastate
+ #or die "unknown rated_ratename '" .$cdr->rated_ratename.
+ # "' in CDR #".$cdr->acctid."\n";
$subtotal->{count}++;
$subtotal->{duration} += $object->rated_seconds;
- $subtotal->{amount} += $object->rated_price;
+ $subtotal->{amount} += $object->rated_price
+ if $object->freesidestatus ne 'no-charge';
}
}
$prefix,
map({
$_->{count},
- (int($_->{duration}/60) . ' min'),
+ sprintf('%.01f min', $_->{duration}/60),
} @subtotals ),
$self->money_char . sprintf('%.02f',$total_amount),
);