[freeside-commits] freeside/FS/FS Conf.pm, 1.324.2.32, 1.324.2.33 cust_bill.pm, 1.263.2.15, 1.263.2.16

Jeff Finucane,420,, jeff at wavetail.420.am
Fri Apr 9 01:09:06 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv6820/FS/FS

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	Conf.pm cust_bill.pm 
Log Message:
modify total items for balance below line and current charges above line with configurable description.  also bug fixes that might close 7896

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.324.2.32
retrieving revision 1.324.2.33
diff -u -w -d -r1.324.2.32 -r1.324.2.33
--- Conf.pm	24 Mar 2010 08:38:00 -0000	1.324.2.32
+++ Conf.pm	9 Apr 2010 08:09:04 -0000	1.324.2.33
@@ -2910,11 +2910,18 @@
   {
     'key'         => 'disable_previous_balance',
     'section'     => 'invoicing',
-    'description' => 'Disable inclusion of previous balancem payment, and credit lines on invoices',
+    'description' => 'Disable inclusion of previous balance, payment, and credit lines on invoices',
     'type'        => 'checkbox',
   },
 
   {
+    'key'         => 'previous_balance-exclude_from_total',
+    'section'     => 'invoicing',
+    'description' => 'Do not include previous balance in the \'Total\' line.  Only meaningful when invoice_sections is false.  Optionally provide text to override the Total New Charges description',
+    'type'        => [ qw(checkbox text) ],
+  },
+
+  {
     'key'         => 'previous_balance-summary_only',
     'section'     => 'invoicing',
     'description' => 'Only show a single line summarizing the total previous balance rather than one line per invoice.',
@@ -2922,6 +2929,13 @@
   },
 
   {
+    'key'         => 'balance_due_below_line',
+    'section'     => 'invoicing',
+    'description' => 'Place the balance due message below a line.  Only meaningful when when invoice_sections is false.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'usps_webtools-userid',
     'section'     => 'UI',
     'description' => 'Production UserID for USPS web tools.   Enables USPS address standardization.  See the <a href="http://www.usps.com/webtools/">USPS website</a>, register and agree not to use the tools for batch purposes.',

Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.263.2.15
retrieving revision 1.263.2.16
diff -u -w -d -r1.263.2.15 -r1.263.2.16
--- cust_bill.pm	8 Mar 2010 10:57:16 -0000	1.263.2.15
+++ cust_bill.pm	9 Apr 2010 08:09:04 -0000	1.263.2.16
@@ -2308,6 +2308,7 @@
     'unitprices'      => $conf->exists('invoice-unitprice'),
     'smallernotes'    => $conf->exists('invoice-smallernotes'),
     'smallerfooter'   => $conf->exists('invoice-smallerfooter'),
+    'balance_due_below_line' => $conf->exists('balance_due_below_line'),
    
     # better hang on to conf_dir for a while (for old templates)
     'conf_dir'        => "$FS::UID::conf_dir/conf.$FS::UID::datasrc",
@@ -2492,6 +2493,7 @@
 
   my $unsquelched = $params{unsquelch_cdr} || $cust_main->squelch_cdr ne 'Y';
   my $multisection = $conf->exists('invoice_sections', $cust_main->agentnum);
+  $invoice_data{'multisection'} = $multisection;
   my $late_sections = [];
   my $extra_sections = [];
   my $extra_lines = ();
@@ -2700,17 +2702,19 @@
 
   {
     my $total = {};
-    $total->{'total_item'} = &$embolden_function('Total');
-    $total->{'total_amount'} =
-      &$embolden_function(
-        $other_money_char.
-        sprintf( '%.2f',
-                 $self->charged + ( $conf->exists('disable_previous_balance')
+    my $item = 'Total';
+    $item = $conf->config('previous_balance-exclude_from_total')
+         || 'Total New Charges'
+      if $conf->exists('previous_balance-exclude_from_total');
+    my $amount = $self->charged +
+                   ( $conf->exists('disable_previous_balance') ||
+                     $conf->exists('previous_balance-exclude_from_total')
                                     ? 0
                                     : $pr_total
-                                  )
-               )
       );
+    $total->{'total_item'} = &$embolden_function($item);
+    $total->{'total_amount'} =
+      &$embolden_function( $other_money_char.  sprintf( '%.2f', $amount ) );
     if ( $multisection ) {
       if ( $adjust_section->{'sort_weight'} ) {
         $adjust_section->{'posttotal'} = 'Balance Forward '. $other_money_char.
@@ -2723,14 +2727,9 @@
       push @total_items, $total;
     }
     push @buf,['','-----------'];
-    push @buf,['Total Charges',
+    push @buf,[$item,
                $money_char.
-               sprintf( '%10.2f', $self->charged +
-                                    ( $conf->exists('disable_previous_balance')
-                                        ? 0
-                                        : $pr_total
-                                    )
-                      )
+               sprintf( '%10.2f', $amount )
               ];
     push @buf,['',''];
   }



More information about the freeside-commits mailing list