X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=ca35a443aab909645fcf98a0eba036c16aa77c22;hp=ba308bebac24aed3037948c9e93f4b678a08f08c;hb=f9a181e4c2e505df84de16190ee3b75011326f3f;hpb=da86d5a8af2f915a340a74f6c97772451a1e23ef diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index ba308beba..ca35a443a 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2721,7 +2721,7 @@ sub print_generic { sprintf('%.2f', $pr_total), 'summarized' => $summarypage ? 'Y' : '', }; - $previous_section->{posttotal} = '0 / 30 / 60/ 90 days overdue '. + $previous_section->{posttotal} = '0 / 30 / 60 / 90 days overdue '. join(' / ', map { $cust_main->balance_date_range(@$_) } $self->_prior_month30s ) @@ -4578,11 +4578,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; @@ -4590,9 +4596,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; }