Index: /lib/filter_functions.inc.php
===================================================================
--- /lib/filter_functions.inc.php	(revision 7493)
+++ /lib/filter_functions.inc.php	(revision 7494)
@@ -124,5 +124,5 @@
                     echo '<script type="text/javascript"> ';
                     
-                    echo 'jQuery("input[name=\'wpsg_insertlicence_submit\']").on("click", function() { jQuery("tr[data-slug=\''.WPSG_FOLDERNAME.'\']").find("input[type=\'checkbox\']").prop("checked", true); } ); ';
+                    echo 'jQuery("input[name=\'wpsg_insertlicence_submit\']").on("click", function() { jQuery(this).closest("tr").prev().find("input[type=\'checkbox\']").prop("checked", true); } ); ';
                     echo 'jQuery("input[name=\'wpsg_licence_file\']").on("keydown", function(event) { if(event.which == 10 || event.which == 13) { jQuery("#wpsg_insertlicence_hidden").attr("name", "wpsg_insertlicence_submit"); jQuery("#wpsg_insertlicence_submit").click(); }  } ); ';
                     echo 'jQuery("#the-list").parent().parent().attr("enctype", "multipart/form-data"); ';
@@ -167,5 +167,5 @@
                     echo '<script type="text/javascript"> ';
                     
-                    echo 'jQuery("input[name=\'wpsg_insertlicence_submit\']").on("click", function() { jQuery("tr[data-slug=\''.WPSG_FOLDERNAME.'\']").find("input[type=\'checkbox\']").prop("checked", true); } ); ';
+                    echo 'jQuery("input[name=\'wpsg_insertlicence_submit\']").on("click", function() { jQuery(this).closest("tr").find("input[type=\'checkbox\']").prop("checked", true); } ); ';
                     echo 'jQuery("input[name=\'wpsg_licence_file\']").on("keydown", function(event) { if(event.which == 10 || event.which == 13) { jQuery("#wpsg_insertlicence_hidden").attr("name", "wpsg_insertlicence_submit"); jQuery("#wpsg_insertlicence_submit").click(); }  } ); ';
                     echo 'jQuery("#the-list").parent().parent().attr("enctype", "multipart/form-data"); ';
Index: /model/wpsg_customer.class.php
===================================================================
--- /model/wpsg_customer.class.php	(revision 7493)
+++ /model/wpsg_customer.class.php	(revision 7494)
@@ -562,5 +562,5 @@
 			//if (wpsg_isSizedString($arFilter['order'], 'nr')) { $strQueryORDER = " K.`knr`, K.`vname`, K.`name` "; }
 			if (wpsg_isSizedString($arFilter['order'], 'nr')) { $strQueryORDER = " K.`knr` "; }
-			else if (wpsg_isSizedString($arFilter['order'], 'adress')) { $strQueryORDER = " CONCAT(K.`plz`, K.`ort`) "; }
+			else if (wpsg_isSizedString($arFilter['order'], 'adress')) { $bJoinAdress = true; $strQueryORDER = " CONCAT(CA.`plz`, CA.`ort`) "; }
 			else if (wpsg_isSizedString($arFilter['order'], 'status')) { $strQueryORDER = " order_count "; }
 			else $strQueryORDER = " K.`id` ";
