summaryrefslogtreecommitdiff
path: root/httemplate/elements/change_history_common.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-03-25 19:32:23 -0700
committerMark Wells <mark@freeside.biz>2013-03-25 19:32:23 -0700
commit8e73bf5782dc6fe2b299ba759ad15780a8946cc4 (patch)
treef813fae3a2d094fdbecdbc21c47d95f33c173d03 /httemplate/elements/change_history_common.html
parent97356847f631d26f42a8fe0ea7adac580e41549c (diff)
option to show payment history in reverse order, #19698
Diffstat (limited to 'httemplate/elements/change_history_common.html')
-rw-r--r--httemplate/elements/change_history_common.html15
1 files changed, 8 insertions, 7 deletions
diff --git a/httemplate/elements/change_history_common.html b/httemplate/elements/change_history_common.html
index 232664e39..34ce70b6c 100644
--- a/httemplate/elements/change_history_common.html
+++ b/httemplate/elements/change_history_common.html
@@ -15,13 +15,7 @@
<TH CLASS="grid" BGCOLOR="#cccccc">Description</TH>
</TR>
-% foreach my $item ( sort { $a->history_date <=> $b->history_date
-% #|| table order
-% || $a->historynum <=> $b->historynum
-% }
-% @history
-% )
-% {
+% foreach my $item ( @history ) {
% my $history_other = '';
% my $act = $item->history_action;
% if ( $act =~ /^replace/ ) {
@@ -196,4 +190,11 @@ $cust_pkg_date_format .= ' %l:%M:%S%P'
if $conf->exists('cust_pkg-display_times')
|| $curuser->option('cust_pkg-display_times');
+@history = sort { $a->history_date <=> $b->history_date
+ || $a->historynum <=> $b->historynum } @history;
+
+if ( $curuser->option('history_order') eq 'newest' ) {
+ @history = reverse @history;
+}
+
</%init>