X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/679db39f627675838659464293d384b0f8a79a96..ca12e8dfc4773aabc13818a0398e06e44028e2bc:/SL/AR.pm diff --git a/SL/AR.pm b/SL/AR.pm index d9a42ce36..0a8987979 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -468,12 +468,10 @@ sub ar_transactions { my @a = (transdate, invnumber, name); push @a, "employee" if $form->{l_employee}; - my $sortdir = $form->{sortdir} ? 'ASC' : 'DESC'; + my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; my $sortorder = join(', ', map { "$_ $sortdir" } @a); - if (grep({ $_ eq $form->{sort} } - qw(id transdate duedate invnumber ordnumber name - datepaid employee shippingpoint shipvia))) { + if (grep({ $_ eq $form->{sort} } qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description))) { $sortorder = $form->{sort} . " $sortdir"; }