avoid error when there is no payment history, #19698
authorMark Wells <mark@freeside.biz>
Wed, 10 Apr 2013 00:31:54 +0000 (17:31 -0700)
committerMark Wells <mark@freeside.biz>
Wed, 10 Apr 2013 00:32:06 +0000 (17:32 -0700)
httemplate/view/cust_main/payment_history.html

index 235b513..915be49 100644 (file)
@@ -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;
 }