Index: /lib/filter_functions.inc.php
===================================================================
--- /lib/filter_functions.inc.php	(revision 7494)
+++ /lib/filter_functions.inc.php	(revision 7495)
@@ -167,5 +167,5 @@
                     echo '<script type="text/javascript"> ';
                     
-                    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_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"); ';
Index: /model/wpsg_order.class.php
===================================================================
--- /model/wpsg_order.class.php	(revision 7494)
+++ /model/wpsg_order.class.php	(revision 7495)
@@ -248,4 +248,22 @@
 			
 		} // public function getShippingTaxAmount()
+		
+		
+		public function getToPay($brutto_netto = WPSG_BRUTTO) {
+			
+			if ($brutto_netto == WPSG_BRUTTO)
+			{
+				
+				return wpsg_tf($this->data['topay_brutto']);
+				
+			}
+			else
+			{
+				
+				return wpsg_tf($this->data['topay_netto']);
+				
+			}
+			
+		}
 		
 		/**
Index: /mods/wpsg_mod_downloadplus.class.php
===================================================================
--- /mods/wpsg_mod_downloadplus.class.php	(revision 7494)
+++ /mods/wpsg_mod_downloadplus.class.php	(revision 7495)
@@ -799,5 +799,5 @@
                 $pdf->addPage();
 
-                if ($this->shop->get_option("wpsg_mod_downloadplus_range") != "1" || ($pagei >= $this->shop->get_option("wpsg_mod_downloadplus_range_von") && $pagei <= $this->shop->get_option("wpsg_mod_downloadplus_range_bis")))
+                if (wpsg_isSizedArray($arTexte) && $this->shop->get_option("wpsg_mod_downloadplus_range") != "1" || ($pagei >= $this->shop->get_option("wpsg_mod_downloadplus_range_von") && $pagei <= $this->shop->get_option("wpsg_mod_downloadplus_range_bis")))
                 {
 
Index: /mods/wpsg_mod_paypal.class.php
===================================================================
--- /mods/wpsg_mod_paypal.class.php	(revision 7494)
+++ /mods/wpsg_mod_paypal.class.php	(revision 7495)
@@ -229,5 +229,5 @@
  
 			// Bestellungen mit 0 geben nix aus
-			if ($done_view['basket']['sum']['preis_gesamt_brutto'] <= 0 || $this->shop->view['basket']['checkout']['payment'] != $this->id) return;
+			if ($done_view['basket']['arCalculation']['sum']['topay_brutto'] <= 0 || $this->shop->view['basket']['checkout']['payment'] != $this->id) return;
 							
             $oOrder = wpsg_order::getInstance($order_id);
@@ -610,10 +610,10 @@
 			 $details = new \PayPal\Api\Details();
 			 $details->setShipping($oOrder->getShippingAmount(WPSG_BRUTTO));
-			 $details->setSubtotal($oOrder->getAmount(WPSG_BRUTTO) - $oOrder->getShippingAmount(WPSG_BRUTTO) - $oOrder->getPaymentAmount(WPSG_BRUTTO));
+			 $details->setSubtotal($oOrder->getToPay(WPSG_BRUTTO) - $oOrder->getShippingAmount(WPSG_BRUTTO) - $oOrder->getPaymentAmount(WPSG_BRUTTO));
 			*/
 				
 			$amount = new \PayPal\Api\Amount();
 			$amount->setCurrency($this->shop->get_option('wpsg_mod_paypal_currency'));
-			$amount->setTotal($oOrder->getAmount(WPSG_BRUTTO));
+			$amount->setTotal($oOrder->getToPay(WPSG_BRUTTO));
 			//$amount->setDetails($details);
 				
@@ -809,5 +809,5 @@
 			$amount = new \PayPal\Api\Amount();
 			$amount->setCurrency($this->shop->get_option('wpsg_mod_paypal_currency'));
-			$amount->setTotal($oOrder->getAmount(WPSG_BRUTTO));
+			$amount->setTotal($oOrder->getToPay(WPSG_BRUTTO));
 				
 			$refund = new \PayPal\Api\Refund();
Index: /views/mods/mod_downloadplus/pdfdownloadmail.phtml
===================================================================
--- /views/mods/mod_downloadplus/pdfdownloadmail.phtml	(revision 7494)
+++ /views/mods/mod_downloadplus/pdfdownloadmail.phtml	(revision 7495)
@@ -4,9 +4,6 @@
 	 * Mail, die die PDF Downloads an den Kunden sendet
 	 */
-
-    $arPflicht = $this->loadPflichtFeldDaten();
-    $arTitle = explode('|', $arPflicht['anrede_auswahl']);
-
-?><?php echo wpsg_translate(__('Hallo #1# #2# #3#,', 'wpsg'), @$arTitle[$this->view['basket']['checkout']['title']], $this->view['basket']['checkout']['vname'], $this->view['basket']['checkout']['name']); ?>
+ 
+?><?php echo wpsg_translate(__('Hallo #2# #3#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?>
  
 <?php echo __('hiermit erhalten Sie die Downloadlinks fÃŒr Ihre gekauften PDFs:', 'wpsg'); ?> 
