Index: /changelog
===================================================================
--- /changelog	(revision 8412)
+++ /changelog	(revision 8414)
@@ -627,2 +627,4 @@
 #4.4.8
 - Feature: Vorauswahl Leer bei Zahlungsarten zugelassen
+- Feature: Suche nach Bestellungen eines speziellen Gutscheins im Backend
+- Bugfix: Korrektur Gutschein mit % Wert auf Rechnung
Index: /model/wpsg_order.class.php
===================================================================
--- /model/wpsg_order.class.php	(revision 8412)
+++ /model/wpsg_order.class.php	(revision 8414)
@@ -1187,4 +1187,5 @@
 			$bJoinInvoice = false;
 			$bJoinOrderAdress = false;
+			$bJoinVoucher = false;
 
 			if (wpsg_isSizedInt($arFilter['id'])) $strQueryWHERE .= " AND O.`id` = '".wpsg_q($arFilter['id'])."' ";
@@ -1198,4 +1199,11 @@
 			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 (intval($arFilter['voucher_id']??0) > 0) {
+				
+				$bJoinVoucher = true;
+				$strQueryWHERE .= " AND OV.`voucher_id` = '".intval($arFilter['voucher_id'])."' ";
+				
+			}
 			
 			if (wpsg_isSizedString($arFilter['payment_key'])) $strQueryWHERE .= " AND O.`payment_key` = '".wpsg_q($arFilter['payment_key'])."' ";
@@ -1341,4 +1349,5 @@
             }
 			if ($bJoinOrderAdress === true) $strQueryJOIN .= " LEFT JOIN `".WPSG_TBL_ADRESS."` AS OA ON (OA.`id` = O.`adress_id`) ";
+			if ($bJoinVoucher === true) $strQueryJOIN .= " LEFT JOIN `".WPSG_TBL_ORDER_VOUCHER."` AS OV ON (OV.`order_id` = O.`id`) ";
 			
 			return array($strQuerySELECT, $strQueryWHERE, $strQueryJOIN, $strQueryHAVING, $strQueryORDER);
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 8412)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 8414)
@@ -869,5 +869,5 @@
 					
 					foreach ($arVoucher as $v) {
-						
+				
 						$oCalculation->addVoucher(
 							$v['set'],
@@ -1185,5 +1185,5 @@
 			
 			if (intval($_REQUEST['wpsg_rechnungen_discount_voucher_coupon']??0) > 0) {
-				
+	
 				$discount = $oCalculationOrder->getDiscount();
 				
@@ -1200,8 +1200,9 @@
 				
 				$arVoucher = $oCalculationOrder->getVoucher();
+				
 				if ($arVoucher !== null) {
 					
 					foreach ($arVoucher as $v) {
-						
+					 
 						$oCalculation->addVoucher(
 							$v['set'],
@@ -1210,6 +1211,6 @@
 							$v['amount'],
 							$v['data']['code']??false,
-							$v['code']['id']??0,
-							$v['code']['order_voucher_id']??0
+							$v['data']['id']??0,
+							$v['data']['order_voucher_id']??0
 						);
 						
@@ -1547,5 +1548,5 @@
 			$this->shop->view['storno'] = false;
 			$this->shop->view['invoice'] = true;
-			
+	 
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_rechnungen/invoice_pdf.phtml');
  
Index: /views/mods/mod_gutschein/index.phtml
===================================================================
--- /views/mods/mod_gutschein/index.phtml	(revision 8412)
+++ /views/mods/mod_gutschein/index.phtml	(revision 8414)
@@ -102,4 +102,6 @@
 									|
 									<span class="delete"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie diesen Gutschein lÃ¶schen mÃ¶chten?', 'wpsg'); ?>');" title="<?php echo __('Diese Gutschein lÃ¶schen', 'wpsg'); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_gutschein&subaction=delete&noheader=1&voucher_id=<?php echo $oVoucher->getId(); ?>"><?php echo __('LÃ¶schen', 'wpsg'); ?></a></span>
+									|
+									<span><a title="<?php echo __('Bestellungen anzeigen', 'wpsg'); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter[status]=-1&filter[voucher_id]=<?php echo $oVoucher->getId(); ?>"><?php echo __('Bestellungen suchen', 'wpsg'); ?></a></span>
 								</div>
                                                         
