X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/08c79c2c65b17701c1f42d9a2b4623d7bd806120..c0713b66e59e458d4966b8954ec1c835e2bc0c5b:/SL/CA.pm diff --git a/SL/CA.pm b/SL/CA.pm index cee831609..983f9bd04 100644 --- a/SL/CA.pm +++ b/SL/CA.pm @@ -366,8 +366,8 @@ sub all_transactions { } my $sort = grep({ $form->{sort} eq $_ } qw(transdate reference description)) ? $form->{sort} : 'transdate'; - - $query .= qq|ORDER BY $sort|; + my $sort2 = ($sort eq 'reference')?'transdate':'reference'; + $query .= qq|ORDER BY $sort , $sort2 |; my $sth = prepare_execute_query($form, $dbh, $query, @values); #get detail information for each transaction