USTVA Ist-Soll Testskript für Steuerzone Inland überarbeitet
[kivitendo-erp.git] / SL / CT.pm
index 3057391..8a3ff85 100644 (file)
--- a/SL/CT.pm
+++ b/SL/CT.pm
@@ -182,10 +182,10 @@ sub get_tuple {
   }
   $sth->finish;
 
-  # get languages
+  # 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"});