X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FCT.pm;h=8a3ff853cbbff576d7ebb5642f788ae2d687294b;hb=15d5b55d84399cc17b24c7800a5faeeb02a665bf;hp=a4eb0b216b83f9f705822bf0c3df8f5e90f0e8a6;hpb=1f96f65b7459fc74081553c6cf9f953090941b53;p=kivitendo-erp.git diff --git a/SL/CT.pm b/SL/CT.pm index a4eb0b216..8a3ff853c 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -185,7 +185,7 @@ sub get_tuple { # get payment terms $query = qq|SELECT id, description FROM payment_terms - ORDER BY 1|; + ORDER BY sortkey|; $sth = $dbh->prepare($query); $sth->execute || $form->dberror($query); @@ -315,7 +315,7 @@ sub taxaccounts { # get payment terms $query = qq|SELECT id, description FROM payment_terms - ORDER BY 1|; + ORDER BY sortkey|; $sth = $dbh->prepare($query); $sth->execute || $form->dberror($query); @@ -695,6 +695,9 @@ sub search { my $where = "1 = 1"; $form->{sort} = "name" unless ($form->{sort}); + if ($form->{sort} eq "address") { + $form->{sort} = "country,city,street"; + } if ($form->{"$form->{db}number"}) { my $companynumber = $form->like(lc $form->{"$form->{db}number"});