diff options
author | Mark Wells <mark@freeside.biz> | 2012-02-24 08:45:46 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-02-24 09:30:12 -0800 |
commit | 81a993ab0d0f15d896144f60cbf9477fdf693f76 (patch) | |
tree | d165b9445ad92bf55f4b47299fda586225f4d742 /FS/FS/detail_format.pm | |
parent | 7cfa84ec05dd75cd550cbb2c1ddac4161518fd1e (diff) |
CDR rewriting and included-calls feature, #16271
Diffstat (limited to 'FS/FS/detail_format.pm')
-rw-r--r-- | FS/FS/detail_format.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/detail_format.pm b/FS/FS/detail_format.pm index 144aaa7..af97f36 100644 --- a/FS/FS/detail_format.pm +++ b/FS/FS/detail_format.pm @@ -171,8 +171,11 @@ sub single_detail { die "$me error combining ".$self->csv->error_input."\n" if !$status; + my $rated_price = $cdr->rated_price; + $rated_price = 0 if $cdr->freesidestatus eq 'no-charge'; + FS::cust_bill_pkg_detail->new( { - 'amount' => $cdr->rated_price, + 'amount' => $rated_price, 'classnum' => $cdr->rated_classnum, 'duration' => $cdr->rated_seconds, 'regionname' => $cdr->rated_regionname, @@ -250,6 +253,7 @@ sub price { my $cdr = shift; my $object = $self->{inbound} ? $cdr->cdr_termination(1) : $cdr; my $price = $object->rated_price if $object; + $price = '0.00' if $object->freesidestatus eq 'no-charge'; length($price) ? $self->money_char . $price : ''; } |