summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-03-28 22:58:47 -0700
committerMark Wells <mark@freeside.biz>2015-03-28 22:58:47 -0700
commit2d87542ac3afb01da050006a76875b13c0973aff (patch)
treea655e823224385513544cb885941bdae0a0ace71 /FS
parent64419f5890a16922f5692dc263bb43fba3e4b22d (diff)
fix accidental removal of "last_bill" from invoice data hash, #34217, from #31273
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Template_Mixin.pm14
1 files changed, 6 insertions, 8 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 08875b31c..14fc7fcdd 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -698,6 +698,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 ) {
@@ -758,9 +762,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', {
@@ -802,11 +804,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;
}