projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
option to show payment history in reverse order, #19698
[freeside.git]
/
httemplate
/
elements
/
change_history_common.html
diff --git
a/httemplate/elements/change_history_common.html
b/httemplate/elements/change_history_common.html
index
232664e
..
34ce70b
100644
(file)
--- 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>
<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/ ) {
% 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');
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>
</%init>