X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fview%2Fcust_main%2Fpayment_history.html;h=66008ee29a79ebf9cafd2fa1490684c6b8287748;hb=8e73bf5782dc6fe2b299ba759ad15780a8946cc4;hp=7701cb6b047c0b56be330a280576a21014164b46;hpb=97356847f631d26f42a8fe0ea7adac580e41549c;p=freeside.git diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 7701cb6b0..66008ee29 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -263,7 +263,7 @@ %my $old_history = 0; %my $lastdate = 0; % -%foreach my $item ( sort { $a->{'date'} <=> $b->{'date'} } @history ) { +%foreach my $item ( @history ) { % % $lastdate = $item->{'date'}; % @@ -533,6 +533,13 @@ foreach my $cust_refund ($cust_main->cust_refund) { } +# sort history +if ( $curuser->option('history_order') eq 'newest' ) { + @history = sort { $b->{date} <=> $a->{date} } @history; +} else { + @history = sort { $a->{date} <=> $b->{date} } @history; +} # no other sort orders for now + sub translate_payby { my ($payby,$payinfo) = (shift,shift); my %payby = (