diff options
author | Mark Wells <mark@freeside.biz> | 2013-03-25 19:32:23 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-03-25 19:32:23 -0700 |
commit | 8e73bf5782dc6fe2b299ba759ad15780a8946cc4 (patch) | |
tree | f813fae3a2d094fdbecdbc21c47d95f33c173d03 /httemplate/view | |
parent | 97356847f631d26f42a8fe0ea7adac580e41549c (diff) |
option to show payment history in reverse order, #19698
Diffstat (limited to 'httemplate/view')
-rw-r--r-- | httemplate/view/cust_main/payment_history.html | 9 |
1 files changed, 8 insertions, 1 deletions
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 = ( |