[freeside-commits] branch master updated. e0d62e76fe19b44c348b43d4e4fb5aba26647a4a

Mark Wells mark at 420.am
Sat Mar 28 22:59:31 PDT 2015


The branch, master has been updated
       via  e0d62e76fe19b44c348b43d4e4fb5aba26647a4a (commit)
      from  d9db63d82fce670cc3c21f86e577dd99c3d14028 (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 e0d62e76fe19b44c348b43d4e4fb5aba26647a4a
Author: Mark Wells <mark at freeside.biz>
Date:   Sat Mar 28 22:59:16 2015 -0700

    fix accidental removal of "last_bill" from invoice data hash, #34217, from #31273

diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 59899cf..2479ef6 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -697,6 +697,10 @@ sub print_generic {
     # XXX should be an FS::cust_bill method to set the defaults, instead
     # of checking the type here
 
+    # info from customer's last invoice before this one, for some 
+    # summary formats
+    $invoice_data{'last_bill'} = {};
+ 
     my $last_bill = $self->previous_bill;
     if ( $last_bill ) {
 
@@ -757,9 +761,7 @@ sub print_generic {
       # ($pr_total is used elsewhere but not as $previous_balance)
       $invoice_data{'previous_balance'} = sprintf("%.2f", $pr_total);
 
-      $invoice_data{'last_bill'} = {
-        '_date'     => $last_bill->_date, #unformatted
-      };
+      $invoice_data{'last_bill'}{'_date'} = $last_bill->_date; #unformatted
       my (@payments, @credits);
       # for formats that itemize previous payments
       foreach my $cust_pay ( qsearch('cust_pay', {
@@ -801,11 +803,7 @@ sub print_generic {
       $invoice_data{'previous_payments'} = [];
       $invoice_data{'previous_credits'} = [];
     }
-
-    # info from customer's last invoice before this one, for some 
-    # summary formats
-    $invoice_data{'last_bill'} = {};
-  
+ 
     if ( $conf->exists('invoice_usesummary', $agentnum) ) {
       $invoice_data{'summarypage'} = $summarypage = 1;
     }

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

Summary of changes:
 FS/FS/Template_Mixin.pm |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)




More information about the freeside-commits mailing list