Bei Lieferanschrift-Drop-Down auch die Straße und den Ort anzeigen.
[kivitendo-erp.git] / SL / AP.pm
index e9e1a7e..763fd33 100644 (file)
--- a/SL/AP.pm
+++ b/SL/AP.pm
@@ -464,12 +464,10 @@ sub ap_transactions {
 
   my @a = (transdate, invnumber, name);
   push @a, "employee" if $self->{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(transdate id invnumber ordnumber name netamount tax amount
-              paid datepaid due duedate notes employee))) {
+  if (grep({ $_ eq $form->{sort} } qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee transaction_description))) {
     $sortorder = $form->{sort} . " $sortdir";
   }