diff options
author | ivan <ivan> | 2011-03-09 20:54:14 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-03-09 20:54:14 +0000 |
commit | cca6ce92e9806fd909f5a6540f921ad9de064483 (patch) | |
tree | edb8589e20531ad41cdb6fa645b1b62d63a8b09a | |
parent | 2a7db34383fbce13cb5bc6a9d7aee9242f544400 (diff) |
should fix usage showing up without omitting package details, RT#11905, RT#11561
-rw-r--r-- | FS/FS/cust_bill.pm | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 461403a7b..3bec6dd38 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -4547,11 +4547,17 @@ sub _items_cust_bill_pkg { } - warn "$me _items_cust_bill_pkg adding details\n" - if $DEBUG > 1; + unless ( $is_summary ) { + warn "$me _items_cust_bill_pkg adding details\n" + if $DEBUG > 1; - push @d, $cust_bill_pkg->details(%details_opt) - unless $is_summary; # || ($type && $type eq 'R'); + #instead of omitting details entirely in this case (unwanted side + # effects), just omit CDRs + $details_opt{'format_function'} = sub { () } + if $type && $type eq 'R'; + + push @d, $cust_bill_pkg->details(%details_opt); + } warn "$me _items_cust_bill_pkg calculating amount\n" if $DEBUG > 1; @@ -4559,9 +4565,9 @@ sub _items_cust_bill_pkg { my $amount = 0; if (!$type) { $amount = $cust_bill_pkg->recur; - }elsif($type eq 'R') { + } elsif ($type eq 'R') { $amount = $cust_bill_pkg->recur - $cust_bill_pkg->usage; - }elsif($type eq 'U') { + } elsif ($type eq 'U') { $amount = $cust_bill_pkg->usage; } |