From: Mark Wells <mark@freeside.biz>
Date: Wed, 10 Apr 2013 00:31:54 +0000 (-0700)
Subject: avoid error when there is no payment history, #19698
X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=bc1bbd506cfa5f005002fef01d8b0f8961f536eb;p=freeside.git

avoid error when there is no payment history, #19698
---

diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html
index 235b513ab..915be49e5 100644
--- a/httemplate/view/cust_main/payment_history.html
+++ b/httemplate/view/cust_main/payment_history.html
@@ -536,7 +536,7 @@ foreach my $item (@history) {
   }
   $i++;
 }
-if ( $history[-1]->{'hide'} ) {
+if ( @history and $history[-1]->{'hide'} ) {
   # then everything is hidden
   $history[-1]->{'balance_forward'} = 1;
 }