X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fchange_history_common.html;h=34ce70b6cba2330f5b2c67c84c8119ad462b7d12;hb=5f5fbed30812124e5865c4aaf20c927f7d2d01bd;hp=9e19539d096258f82b3b5ec5e2c61dfc668caa68;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git
diff --git a/httemplate/elements/change_history_common.html b/httemplate/elements/change_history_common.html
index 9e19539d0..34ce70b6c 100644
--- a/httemplate/elements/change_history_common.html
+++ b/httemplate/elements/change_history_common.html
@@ -15,13 +15,7 @@
Description |
-% 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/ ) {
@@ -138,7 +132,7 @@ my %action = (
my %cust_pkg_date_fields = map { $_=>1 } qw(
start_date setup bill last_bill susp adjourn cancel expire contract_end
- change_date
+ resume change_date
);
# finding the other replace row
@@ -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>