diff options
author | jeff <jeff> | 2010-08-23 16:47:13 +0000 |
---|---|---|
committer | jeff <jeff> | 2010-08-23 16:47:13 +0000 |
commit | ec779bea9c39e6da59f8d501c913970a149ce258 (patch) | |
tree | b88fc775454c68204370a5cd3acf336d26432f29 | |
parent | d830c5362596475cf118d715f707994f9ce69bb6 (diff) |
create a default finance section and have hidden sectionless line items remain sectionless
-rw-r--r-- | FS/FS/cust_bill.pm | 4 | ||||
-rw-r--r-- | FS/FS/cust_bill_pkg_display.pm | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 7e0e9957b..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_' : ''; @@ -3313,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; } diff --git a/FS/FS/cust_bill_pkg_display.pm b/FS/FS/cust_bill_pkg_display.pm index e9da18dec..a864ec114 100644 --- a/FS/FS/cust_bill_pkg_display.pm +++ b/FS/FS/cust_bill_pkg_display.pm @@ -55,7 +55,7 @@ sub section { my $section = $self->getfield('section'); unless ($section) { my $cust_bill_pkg = $self->cust_bill_pkg; - if ( $cust_bill_pkg->pkgnum > 0 ) { + if ( $cust_bill_pkg->pkgnum > 0 && !$cust_bill_pkg->hidden ) { my $part_pkg = $cust_bill_pkg->part_pkg; $section = $part_pkg->categoryname if $part_pkg; } |