# (or calling station id for toll free calls)
###
+ my $eff_ratenum = $self->is_tollfree('accountcode')
+ ? $part_pkg->option_cacheable('accountcode_tollfree_ratenum')
+ : '';
+
my( $to_or_from, $column );
- if ( $self->is_tollfree && ! $part_pkg->option_cacheable('disable_tollfree') )
+ if(
+ ( $self->is_tollfree
+ && ! $part_pkg->option_cacheable('disable_tollfree')
+ )
+ or ( $eff_ratenum
+ && $part_pkg->option_cacheable('accountcode_tollfree_field') eq 'src'
+ )
+ )
{ #tollfree call
$to_or_from = 'from';
$column = 'src';
#asterisks here causes inserting the detail to barf, so:
$pretty_dst =~ s/\*//g;
- my $eff_ratenum = $self->is_tollfree('accountcode')
- ? $part_pkg->option_cacheable('accountcode_tollfree_ratenum')
- : '';
-
my $ratename = '';
my $intrastate_ratenum = $part_pkg->option_cacheable('intrastate_ratenum');
if ( $intrastate_ratenum && !$self->is_tollfree ) {
#${$opt{region_group_included_min}} -= $minutes
# if $region_group && $rate_detail->region_group;
- if ( $included_min->{$regionnum}{$ratetimenum} > $minutes ) {
+ if ( $included_min->{$regionnum}{$ratetimenum} >= $minutes ) {
$charge_sec = 0;
$included_min->{$regionnum}{$ratetimenum} -= $minutes;
} else {