Index: /controller/wpsg_OrderController.class.php
===================================================================
--- /controller/wpsg_OrderController.class.php	(revision 6891)
+++ /controller/wpsg_OrderController.class.php	(revision 6895)
@@ -15,8 +15,4 @@
 			parent::dispatch();
 			
-			if (wpsg_isSizedString($_REQUEST['subaction'], 'orderData'))
-			{
-				$this->orderDataAction();
-			}
 			if (wpsg_isSizedString($_REQUEST['subaction'], 'productData'))
 			{
@@ -54,8 +50,4 @@
 			{
 				$this->stornoAction();
-			}
-			else if (wpsg_isSizedString($_REQUEST['action'], 'resign'))
-			{
-				$this->resignAction();
 			}
 			else if (wpsg_isSizedString($_REQUEST['action'], 'delete'))
@@ -237,13 +229,6 @@
 			$oOrder = wpsg_order::getInstance($oid);
 			$country_id = $oOrder->getCustomer()->getCountryId();
-			// Land aus der Bestellungsadresse nehmen, weil Kundenadresse nur optional geÃ€ndert wird.
-			$country_id = $oOrder->adress_data['land'];
 			//$country_id = 1;
 			$country = wpsg_country::getInstance($country_id);
-			
-			$mwst = 1;
-			$oCustomer = $oOrder->getCustomer();
-			if ($country->mwst == 1) $mwst = 0;		// keine MwSt
-			if (($country->mwst == 2) && (wpsg_isSizedString($oCustomer->ustidnr))) $mwst = 0;		// keine MwSt
 			
 			// Tabelle Order die Preise korrigieren
@@ -254,6 +239,4 @@
 			$data['price_gesamt_netto'] = 0;
 			$data['price_gesamt_brutto'] = 0;
-			//$option = $this->shop->get_option('wpsg_preisangaben');
-			$option = $oOrder->price_frontend;
 			
 			foreach ($arOrderProd as $p)
@@ -275,5 +258,4 @@
 				{
 					$price = $p['menge'] * $p['price_brutto'];
-					if ($mwst == 0) $price = $p['menge'] * $p['price_netto']; // keine MwSt -> von Netto ausgehen
 					$data['price_gesamt'] += $price;
 					$data['price_gesamt_netto'] += $price / ((100.0 + $tax_value) / 100.0);
@@ -284,17 +266,17 @@
 			
 			// Zusatzkosten (Gutschein, Rabatt, Versand, Zahlung) zusammenfassen
-			$o = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_ORDER."` WHERE `id` = '".wpsg_q($oid)."'");
-			$zusatz = $o['price_gs'] * -1;
-			$zusatz_netto = $o['price_gs_netto'] * -1;
-			$zusatz_brutto = $o['price_gs_brutto'] * -1;
-			$zusatz -= $o['price_rabatt'];
-			$zusatz_netto -= $o['price_rabatt_netto'];
-			$zusatz_brutto -= $o['price_rabatt_brutto'];
-			$zusatz += $o['price_shipping'];
-			$zusatz_netto += $o['price_shipping_netto'];
-			$zusatz_brutto += $o['price_shipping_brutto'];
-			$zusatz += $o['price_payment'];
-			$zusatz_netto += $o['price_payment_netto'];
-			$zusatz_brutto += $o['price_payment_brutto'];
+			$p = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_ORDER."` WHERE `id` = '".wpsg_q($oid)."'");
+			$zusatz = $p['price_gs'] * -1;
+			$zusatz_netto = $p['price_gs_netto'] * -1;
+			$zusatz_brutto = $p['price_gs_brutto'] * -1;
+			$zusatz -= $p['price_rabatt'];
+			$zusatz_netto -= $p['price_rabatt_netto'];
+			$zusatz_brutto -= $p['price_rabatt_brutto'];
+			$zusatz += $p['price_shipping'];
+			$zusatz_netto += $p['price_shipping_netto'];
+			$zusatz_brutto += $p['price_shipping_brutto'];
+			$zusatz += $p['price_payment'];
+			$zusatz_netto += $p['price_payment_netto'];
+			$zusatz_brutto += $p['price_payment_brutto'];
 			
 			$data['price_gesamt'] += $zusatz;
@@ -398,5 +380,4 @@
 			$sval = 0.0;
 			$option = $this->shop->get_option('wpsg_preisangaben');
-			$_SESSION['wpsg']['order_id'] = wpsg_q($_REQUEST['edit_id']);
 			if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
 			if (isset($_REQUEST['s_id'])) $sid = wpsg_q($_REQUEST['s_id']);
@@ -830,7 +811,4 @@
 						*/
 					}
-					
-					$this->correctPrice($order_id);
-					
 				}
 				die("1");
@@ -947,18 +925,4 @@
 		} // public function stornoAction()
 
-		/**
-		 * Wird beim KÃŒndigen eines Abos aufgerufen
-		 */
-		public function resignAction()
-		{
-			
-			//$this->shop->setOrderStatus($_REQUEST['edit_id'], wpsg_ShopController::STATUS_GEKUENDIGTEABOS, true);
-			$this->shop->callMod('wpsg_mod_abo', setAboStatus, array($_REQUEST['edit_id'], wpsg_ShopController::STATUS_GEKUENDIGTEABOS, true));
-			$this->shop->addBackendMessage(__('Abo wurde gekÃŒndigt und Kunde benachrichtigt.', 'wpsg'));
-			
-			$this->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Abo');
-			
-		} // public function resignAction()
-		
 		/**
 		 * Zeigt eine Bestellung an
@@ -985,10 +949,10 @@
 			"); 
 			
-			$this->shop->view['oOrder'] = wpsg_order::getInstance($_REQUEST['edit_id']);
+			$this->shop->view['oOrder'] = wpsg_order::getInstance($_REQUEST['edit_id']);			
 
 			$custom_data = @unserialize($this->shop->view['data']['custom_data']);
-			
+			 
 			$basket = new wpsg_basket();
-			$basket->initFromDB($this->shop->view['data']['id'], true);
+			$basket->initFromDB($this->shop->view['data']['id'], true); 
 			$this->shop->view['basket'] = $basket->toArray(true);
 			
@@ -1082,6 +1046,4 @@
 			}
 			
-			$_SESSION['wpsg']['order_id'] = $_REQUEST['edit_id'];
-			
 			$this->shop->render(WPSG_PATH_VIEW.'/order/view.phtml');
 			
@@ -1106,10 +1068,6 @@
 
 			$this->shop->addBackendMessage(__('Bestellung erfolgreich gelÃ¶scht.', 'wpsg'));
-			
-			if (isset($_REQUEST['abo']))
-				$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Abo');
-			else
-				$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order');
-			
+			$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order');
+						
 		} // public function deleteAction()
 		
@@ -1167,6 +1125,14 @@
 					}
 
-					die($pdf->Output());
-
+					//$fname = '/wp-content/plugins/wpshopgermany-free/controller/aaaa.pdf';
+					//$fname = 'C:\Android\aaaa.pdf';
+					//$fname = '/var/home/htdocs/shop.maennchen1.de/www/wp-content/plugins/wpshopgermany-free/controller/aaaa.pdf';
+					//$data = $pdf->Output($fname, 'I');
+					//$data = $pdf->Output('', 'S');
+					//$d = $pdf->Output($fname, 'F');
+					//file_put_contents($fname, $data);
+					
+					//die($pdf->Output());
+					die($pdf->Output('doc.pdf', 'I'));
 				}
 				else
@@ -1344,6 +1310,5 @@
 
 			if (!isset($this->shop->view['arFilter']['status'])) $this->shop->view['arFilter']['status'] = '0';
-			if ($this->shop->view['arFilter']['status'] >= wpsg_ShopController::STATUS_AKTIVABO) $this->shop->view['arFilter']['status'] = '0';
-			
+
             // Filter gesetzt?
             foreach (Array('s', 'k_id', 'cdate_m', 'cdate_y', 'invoicedate_m', 'invoicedate_y') as $field)
@@ -1354,6 +1319,4 @@
             }
             
-            if ($this->shop->get_option('wpsg_showincompleteorder') != '1')
-            	unset($this->shop->arStatus[wpsg_ShopController::STATUS_UNVOLLSTAENDIG]);
             
 			foreach ($this->shop->arStatus as $status_key => $status_label)
@@ -1399,35 +1362,4 @@
 		} // public function indexAction()
 		
-		/**
-		 * Wird aufgerufen wenn die Bestelldaten verÃ€ndert wurden
-		 */
-		public function orderDataAction()
-		{
-			
-			$oid = 0;
-			$oid = $_SESSION['wpsg']['order_id'];
-			$option = $this->shop->get_option('wpsg_preisangaben');
-			//if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
-			if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'actual')
-			{
-				
-				// Order-Daten sammeln und Tabelle neu generieren
-				$basket = new wpsg_basket();
-				$basket->initFromDB($oid, true);
-				$this->shop->view['basket'] = $basket->toArray(true);
-				
-				$data = array();
-				$data['preis'] = $this->shop->view['basket']['sum']['preis_gesamt_brutto'].' '.$this->get_option('wpsg_currency');
-				$data['vname'] = $this->shop->view['basket']['checkout']['vname'];
-				$data['name'] = $this->shop->view['basket']['checkout']['name'];
-				
-				echo json_encode($data, JSON_FORCE_OBJECT);
-			}
-			
-			exit;
-			
-		}	// public function orderDataAction()
-		
-		
 	} // class wpsg_OrderController extends wpsg_SystemController
 
Index: /lib/fpdf/fpdf.php
===================================================================
--- /lib/fpdf/fpdf.php	(revision 6891)
+++ /lib/fpdf/fpdf.php	(revision 6895)
@@ -1005,4 +1005,5 @@
 			{
 				// We send to a browser
+				header("Pragma: cache"); 
 				header('Content-Type: application/pdf');
 				header('Content-Disposition: inline; filename="'.$name.'"');
Index: /mods/wpsg_mod_stock.class.php
===================================================================
--- /mods/wpsg_mod_stock.class.php	(revision 6891)
+++ /mods/wpsg_mod_stock.class.php	(revision 6895)
@@ -314,5 +314,15 @@
 		{
 
-			$ses_amount = max(array($this->getAmountSession($product_key), $this->getAmountSessionById($this->shop->getProduktId($product_key))));
+			//$ses_amount = max(array($this->getAmountSession($product_key), $this->getAmountSessionById($this->shop->getProduktId($product_key))));
+
+			if ($this->shop->hasMod('wpsg_mod_productvariants') && $this->shop->callMod('wpsg_mod_productvariants', 'isVariantsProductKey', array($product_key)))
+			{
+				$ses_amount = $this->getAmountSession($product_key);
+			}
+			else 
+			{
+				$ses_amount = $this->getAmountSessionById($this->shop->getProduktId($product_key));
+			}
+			
 			$check_amount = $amount_set + $ses_amount;
 
