[freeside-commits] branch FREESIDE_2_3_BRANCH updated. bb8515fe4d9b5c6e67813bae051ce8943f6b3dcf

Ivan ivan at 420.am
Tue Jun 12 01:29:38 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  bb8515fe4d9b5c6e67813bae051ce8943f6b3dcf (commit)
      from  a33279c7c63c2bae19204d0a583794fada01ae13 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bb8515fe4d9b5c6e67813bae051ce8943f6b3dcf
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Jun 12 01:29:35 2012 -0700

    fix discount-show_avail without invoice_sections from hiding previous balances, RT#15159

diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index 8cd508c..46172f3 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -2981,6 +2981,12 @@ sub print_generic {
   my $late_sections = [];
   my $extra_sections = [];
   my $extra_lines = ();
+
+  my $default_section = { 'description' => '',
+                          'subtotal'    => '', 
+                          'no_subtotal' => 1,
+                        };
+
   if ( $multisection ) {
     ($extra_sections, $extra_lines) =
       $self->_items_extra_usage_sections($escape_function_nonbsp, $format)
@@ -3012,8 +3018,7 @@ sub print_generic {
     }
   } else {# not multisection
     # make a default section
-    push @sections, { 'description' => '', 'subtotal' => '', 
-      'no_subtotal' => 1 };
+    push @sections, $default_section;
     # and calculate the finance charge total, since it won't get done otherwise.
     # XXX possibly other totals?
     # XXX possibly finance_pkgclass should not be used in this manner?
@@ -3046,7 +3051,8 @@ sub print_generic {
       };
       $detail->{'ref'} = $line_item->{'pkgnum'};
       $detail->{'quantity'} = 1;
-      $detail->{'section'} = $previous_section;
+      $detail->{'section'} = $multisection ? $previous_section
+                                           : $default_section;
       $detail->{'description'} = &$escape_function($line_item->{'description'});
       if ( exists $line_item->{'ext_description'} ) {
         @{$detail->{'ext_description'}} = map {

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_bill.pm |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list