X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=85f8285eafdffff2e5daf3dd789b0834a1b9c713;hb=ec779bea9c39e6da59f8d501c913970a149ce258;hp=8e7973d33d76b83abcefa500fd88441693c2cdb7;hpb=74b4068002a318228b327ef0709eda85811d6ab2;p=freeside.git diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 8e7973d33..85f8285ea 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2340,7 +2340,8 @@ sub print_generic { qsearchs('pkg_class', { classnum => $conf->config('finance_pkgclass') }); $invoice_data{finance_section} = $pkg_class->categoryname; } - $invoice_data{finance_amount} = '0.00'; + $invoice_data{finance_amount} = '0.00'; + $invoice_data{finance_section} ||= 'Finance Charges'; #avoid config confusion my $countrydefault = $conf->config('countrydefault') || 'US'; my $prefix = $cust_main->has_ship_address ? 'ship_' : ''; @@ -2611,6 +2612,7 @@ sub print_generic { $options{'skip_usage'} = scalar(@$extra_sections) && !grep{$section == $_} @$extra_sections; $options{'multilocation'} = $multilocation; + $options{'multisection'} = $multisection; foreach my $line_item ( $self->_items_pkg(%options) ) { my $detail = { @@ -3312,6 +3314,7 @@ sub _items_sections { if ( $summarypage ) { @sections = grep { exists($subtotal{$_}) || ! _pkg_category($_)->disabled } map { $_->categoryname } qsearch('pkg_category', {}); + push @sections, '' if exists($subtotal{''}); } else { @sections = keys %subtotal; } @@ -3946,6 +3949,7 @@ sub _items_cust_bill_pkg { my $section = $opt{section}->{description} if $opt{section}; my $summary_page = $opt{summary_page} || ''; my $multilocation = $opt{multilocation} || ''; + my $multisection = $opt{multisection} || ''; my @b = (); my ($s, $r, $u) = ( undef, undef, undef ); @@ -3967,7 +3971,8 @@ sub _items_cust_bill_pkg { ? $_->section eq $section : 1 } - grep { !$_->summary || !$summary_page } + #grep { !$_->summary || !$summary_page } # bunk! + grep { !$_->summary || $multisection } $cust_bill_pkg->cust_bill_pkg_display ) { @@ -4026,7 +4031,7 @@ sub _items_cust_bill_pkg { } - if ( $cust_bill_pkg->recur != 0 && + if ( ( $cust_bill_pkg->recur != 0 || $cust_bill_pkg->setup == 0 ) && ( !$type || $type eq 'R' || $type eq 'U' ) ) { @@ -4096,7 +4101,7 @@ sub _items_cust_bill_pkg { }; } - } elsif ( $amount ) { # && $type eq 'U' + } else { # $type eq 'U' if ( $cust_bill_pkg->hidden ) { $u->{amount} += $amount;