#'redirect' => $link,
'header' => \@header,
'fields' => \@fields,
+ 'sort_fields' => \@sort_fields,
'align' => $align,
'links' => \@links,
'color' => \@color,
: '';
};
-my (@header, @fields, $align, @links, @color, @style);
+my (@header, @fields, @sort_fields, $align, @links, @color, @style);
$align = '';
#amount
push @header, 'Amount';
push @fields, sub { $money_char .sprintf('%.2f', shift->amount) };
+push @sort_fields, 'amount';
$align .= 'r';
push @links, '';
push @color, '';
if ($unapplied) {
push @header, 'Unapplied';
push @fields, sub { $money_char .sprintf('%.2f', shift->unapplied_amount) };
+ push @sort_fields, '';
$align .= 'r';
push @links, '';
push @color, '';
'reason',
\&FS::UI::Web::cust_fields,
;
+push @sort_fields, '_date', 'otaker', 'reason';
$align .= 'rll'.FS::UI::Web::cust_aligns(),
push @links, '',
'',