Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 8286)
+++ /controller/wpsg_ShopController.class.php	(revision 8287)
@@ -2873,4 +2873,12 @@
 			}
 
+// $arInvoice = \wpsg\wpsg_invoice::findByOrderId(intval($order_id));
+// wpsg_debug(intval($order_id));
+// foreach ($arInvoice as $oInvoice) {
+// 	$arAttachment[] = $oInvoice->getFilePath();
+// }	
+// wpsg_debug($arAttachment);
+// die();
+
 			$this->db->UpdateQuery(WPSG_TBL_ORDER, array(
 				'status' => wpsg_q($status_id)
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 8286)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 8287)
@@ -1565,5 +1565,5 @@
 				]
 			];
-			
+
 			// DATA FOREACH ORDER IN INVOICE
 			foreach ($order_ids as $o_id) {
@@ -1635,5 +1635,5 @@
 				
 			}
-			
+
 			$this->shop->view['arCalculationSum'] = $arCalculationSum;
  
@@ -1718,5 +1718,5 @@
 
 			if (!$preview) {
-				 				
+			
 				if (@$_REQUEST['wpsg_Multirechnung_sendmail'] == "1") {
 					
@@ -1725,6 +1725,5 @@
 					$oInvoice->setMeta('version', '3');
 
-					$file = dirname($oInvoice->getFilePath()); 
-
+					$file = $oInvoice->getFilePath(); 
 					$file = $this->copyTemp($file, $rnr);
 
@@ -1738,5 +1737,5 @@
 					$header = "";
 					$arFiles = array($file);
-	 
+
 					if ($this->shop->get_option('wpsg_widerrufsformular_invoice') === '1' && wpsg_isSizedString($this->shop->get_option('wpsg_revocationform'))) {
 					
@@ -2043,4 +2042,8 @@
 			
 			$path = $this->shop->getTempDir();
+
+// wpsg_debug('Source: '.$file);
+// wpsg_debug('Destination: '.$path.'/'.$rnr.'.pdf');
+
 			wpsg_copy($file, $path.'/'.$rnr.'.pdf');
 
