Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 7137)
+++ /controller/wpsg_ShopController.class.php	(revision 7138)
@@ -1579,5 +1579,5 @@
 			$strReturn = '<a class="wpsg_button wpsg_button_categorie_basket wpsg_addProdukt ';
 
-			/* Varianten=true -> ï¿œffnet Lightbox mit Variantenauswahl */
+			/* Varianten=true -> Ã¶ffnet Lightbox mit Variantenauswahl */
 			$strReturn .= (($this->callMod('wpsg_mod_productvariants', 'isVariantsProduct', array($product_id)))?'wpsg_variantProduct':'');
 
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 7137)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 7138)
@@ -109,13 +109,5 @@
 			
 		} // public function template_redirect()
-		
-		public function init()
-		{
-			
-//			wpsg_debug($this->shop->arLizenz);
-//			wpsg_debug(date('d.m.Y', $this->shop->get_option(get_class($this))));
-			
-		} // public function init()
-		
+				
 		public function be_ajax()
 		{
@@ -187,25 +179,29 @@
 		{
 
-			if (file_exists($_FILES['wpsg_rechnungen_bp']['tmp_name']))
-			{
+			if (file_exists($_FILES['wpsg_rechnungen_bp']['tmp_name'])) {
 
 				$ending = strtolower(preg_replace("/(.*)\./", "", $_FILES['wpsg_rechnungen_bp']['name']));
 
-				if ($ending != "jpg" && $ending != "jpeg" && $ending != "pdf")
-				{
+				if ($ending != "jpg" && $ending != "jpeg" && $ending != "pdf") {
+				    
 					$this->shop->addBackendError(__("UngÃŒltiger Dateityp (Briefpapier) ! Es sind nur JPG und PDF Dateien erlaubt!", "wpsg"));
-				}
-				else if ($ending == "jpg" || $ending == "jpeg")
-				{
+					
+				} else if ($ending == "jpg" || $ending == "jpeg") {
+
+                    @unlink($this->getFilePath('').'wpsg_rechnungen_bp.jpg');
+                    @unlink($this->getFilePath('').'wpsg_rechnungen_bp.pdf');
+				    
 					move_uploaded_file($_FILES['wpsg_rechnungen_bp']['tmp_name'], $this->getFilePath('').'wpsg_rechnungen_bp.jpg');
-				}
-				else if ($ending == "pdf")
-				{
+					
+				} else if ($ending == "pdf") {
+
+                    @unlink($this->getFilePath('').'wpsg_rechnungen_bp.jpg');
+                    @unlink($this->getFilePath('').'wpsg_rechnungen_bp.pdf');
+
 					move_uploaded_file($_FILES['wpsg_rechnungen_bp']['tmp_name'], $this->getFilePath('').'wpsg_rechnungen_bp.pdf');
-				}
-
-			}
-			else if ((array_key_exists('wpsg_rechnungen_bp_del', $_REQUEST)) && ($_REQUEST['wpsg_rechnungen_bp_del'] == "1"))
-			{
+                
+                }
+
+			} else if ((array_key_exists('wpsg_rechnungen_bp_del', $_REQUEST)) && ($_REQUEST['wpsg_rechnungen_bp_del'] == "1")) {
 
 				@unlink($this->getFilePath('').'wpsg_rechnungen_bp.jpg');
@@ -232,11 +228,14 @@
 				$ending = strtolower(preg_replace("/(.*)\./", "", $_FILES['wpsg_rechnungen_logo']['name']));
 
-				if ($ending != "jpg" && $ending != "jpeg")
-				{
+				if ($ending != "jpg" && $ending != "jpeg") {
+				    
 					$this->shop->addBackendError(__("UngÃŒltiger Dateityp (Logo) ! Es sind nur JPG und PDF Dateien erlaubt!", "wpsg"));
-				}
-				else if ($ending == "jpg" || $ending == "jpeg")
-				{
+					
+				} else {
+
+                    $_REQUEST['wpsg_rechnungen_logo_transparency'] = 100;
+				    
 					move_uploaded_file($_FILES['wpsg_rechnungen_logo']['tmp_name'], $this->getFilePath('').'wpsg_rechnungen_logo.jpg');
+					
 				}
 
@@ -252,4 +251,5 @@
 
 			$this->shop->update_option("wpsg_mod_rechnungen_texte", $_REQUEST['text']);
+			 
 
 			$this->shop->update_option("wpsg_rechnungen_url", $_REQUEST['wpsg_rechnungen_url']);
@@ -793,14 +793,4 @@
 				$this->shop->view['storno_fee_value_brutto'] = $storno_fee_value_brutto;
 					
-				/*
-				 wpsg_debug($this->shop->view['basket']['mwst']);
-					
-				wpsg_debug("GebÃŒhr Steuer (Satz): ".$storno_fee_tax_value);
-				wpsg_debug("GebÃŒhr Steuer: ".$storno_fee_tax);
-				wpsg_debug("GebÃŒhr Netto: ".$storno_fee_value_netto);
-				wpsg_debug("GebÃŒhr Brutto: ".$storno_fee_value_brutto);
-				die();
-				*/
-				
 			}
 									
@@ -908,7 +898,5 @@
                 	
 			}
-            
-			//wpsg_debug($this->shop->view['basket']);die();
-			
+            			
 			$this->shop->view['kunde']['land'] = $this->db->fetchRow("SELECT L.* FROM `".WPSG_TBL_LAND."` AS L WHERE L.`id` = '".wpsg_q($this->shop->view['kunde']['land'])."'");
 			$this->shop->view['data']['shipping_land'] = $this->db->fetchRow("SELECT L.* FROM `".WPSG_TBL_LAND."` AS L WHERE L.`id` = '".wpsg_q($this->shop->view['data']['shipping_land'])."'");
@@ -1004,6 +992,4 @@
 				$this->shop->view['rnr'] = $rnr.' - '.__('Vorschau', 'wpsg');
 				$r_id = "Vorschau";
-
-				//wpsg_debug($this->shop->view);
 												
 			}
Index: /views/mods/mod_rechnungen/invoice_pdf.phtml
===================================================================
--- /views/mods/mod_rechnungen/invoice_pdf.phtml	(revision 7137)
+++ /views/mods/mod_rechnungen/invoice_pdf.phtml	(revision 7138)
@@ -48,15 +48,14 @@
 			$pdf->AddPage();
 
-			if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf"))
-			{
-
-				$pagecount = $pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf");
+			if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf")) {
+
+				$pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf");
 				$tplidx = $pdf->importPage(1, '/MediaBox');
 				$pdf->useTemplate($tplidx, 0, 0, 210);
 
-			}
-			if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg"))
-			{
-				//$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
+			} else if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg")) {
+			    
+				$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
+				
 			}
 
@@ -173,5 +172,5 @@
 
 	}
-	//wpsg_debug($this->view); die();
+	
 	$pdf = new wpsg_fpdf();
 	$pdf->SetAutoPageBreak(true, 5);
Index: /views/mods/mod_rechnungen/settings_edit.phtml
===================================================================
--- /views/mods/mod_rechnungen/settings_edit.phtml	(revision 7137)
+++ /views/mods/mod_rechnungen/settings_edit.phtml	(revision 7138)
@@ -57,5 +57,5 @@
 				<?php $alignRight = $logo_pos === 'right' ? "align-buttons-active" : ""; ?>
 
-				<?php $logo_transparency = $this->get_option("wpsg_rechnungen_logo_transparency") ?: "0%"; ?>
+				<?php $logo_transparency = $this->get_option("wpsg_rechnungen_logo_transparency") ?: "100%"; ?>
 
 				<?php $strSuffix = ''; if ($this->view['logo'] !== false) { $strSuffix = '
@@ -235,5 +235,6 @@
 		} );
 
-		let onloadActiveBtn = $(".align-buttons-active")[0];
+		var  onloadActiveBtn = $(".align-buttons-active")[0];
+		
 		if(onloadActiveBtn)
 		{
@@ -285,5 +286,5 @@
 	{
 
-		let url = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=orderAjax&noheader=1&wpsg_rechnungen_preview=1";
+		var url = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=orderAjax&noheader=1&wpsg_rechnungen_preview=1";
 
 		window.open(url, '_blank');
