my $field = $options{column} || 'dst';
my $intl = $options{international_prefix} || '011';
+ # Still, don't break anyone's CDR rating if they have an empty string in
+ # there. Require an explicit statement that there's no prefix.
+ $intl = '' if lc($intl) eq 'none';
my $countrycode = '';
my $number = $self->$field();
# by default, set the included minutes for this region/time to
# what's in the rate_detail
- $included_min->{$regionnum}{$ratetimenum} = $rate_detail->min_included
- unless exists $included_min->{$regionnum}{$ratetimenum};
+ if (!exists( $included_min->{$regionnum}{$ratetimenum} )) {
+ $included_min->{$regionnum}{$ratetimenum} =
+ ($rate_detail->min_included * $cust_pkg->quantity || 1);
+ }
if ( $included_min->{$regionnum}{$ratetimenum} >= $minutes ) {
$charge_sec = 0;
'name' => 'Number of calls, one line per service',
'invoice_header' => 'Caller,Rate,Messages,Price',
},
+ 'sum_duration' => {
+ 'name' => 'Summary, one line per service',
+ 'invoice_header' => 'Caller,Rate,Calls,Minutes,Price',
+ },
'sum_duration_prefix' => {
'name' => 'Summary, one line per destination prefix',
'invoice_header' => 'Caller,Rate,Calls,Minutes,Price',
'name' => 'Summary, one line per usage class',
'invoice_header' => 'Caller,Class,Calls,Price',
},
+ 'sum_duration_accountcode' => {
+ 'name' => 'Summary, one line per accountcode',
+ 'invoice_header' => 'Caller,Rate,Calls,Minutes,Price',
+ },
);
my %export_formats = ();