Index: /model/wpsg_order.class.php
===================================================================
--- /model/wpsg_order.class.php	(revision 8040)
+++ /model/wpsg_order.class.php	(revision 8048)
@@ -1160,10 +1160,6 @@
 			if (wpsg_isSizedString($arFilter['invoicedate_y']) && $arFilter['invoicedate_y'] != '-1') { $bJoinInvoice = true; $strQueryWHERE .= " AND YEAR(I.`datum`) = '".wpsg_q($arFilter['invoicedate_y'])."' "; }
 			if (wpsg_isSizedString($arFilter['invoicedate_m']) && $arFilter['invoicedate_m'] != '-1') { $bJoinInvoice = true; $strQueryWHERE .= " AND MONTH(I.`datum`) = '".wpsg_q(ltrim($arFilter['invoicedate_m'], '0'))."' "; }
-			if (wpsg_isSizedInt($arFilter['productgroup_id'])) {
-				
-				$bJoinProducts = true;
-				$strQueryWHERE .= " AND P.`pgruppe` = '".wpsg_q($arFilter['productgroup_id'])."' ";
-				
-			}
+			if (wpsg_isSizedString($arFilter['rnr'])) { $bJoinInvoice = true; $strQueryWHERE .= " AND I.`rnr` = '".wpsg_q($arFilter['rnr'])."' "; }
+			if (wpsg_isSizedInt($arFilter['productgroup_id'])) { $bJoinProducts = true; $strQueryWHERE .= " AND P.`pgruppe` = '".wpsg_q($arFilter['productgroup_id'])."' "; }
 			
 			if (wpsg_isSizedString($arFilter['payment_key'])) $strQueryWHERE .= " AND O.`payment_key` = '".wpsg_q($arFilter['payment_key'])."' ";
@@ -1178,4 +1174,10 @@
 
                 }
+
+				if (wpsg_ShopController::getShop()->hasMod('wpsg_mod_rechnungen')) {
+
+					$strQueryWHERE_S_OR .= " OR I.`rnr` LIKE '%".wpsg_q($arFilter['s'])."%' ";
+
+				}
 
                 $strQueryWHERE .= "
@@ -1192,4 +1194,5 @@
 				";
 
+				$bJoinInvoice = true;
                 $bJoinOrderAdress = true;
                 $bJoinCustomer = true;
