Index: /controller/wpsg_OrderController.class.php
===================================================================
--- /controller/wpsg_OrderController.class.php	(revision 7214)
+++ /controller/wpsg_OrderController.class.php	(revision 7215)
@@ -88,7 +88,5 @@
 
         public function updateOrderAction() {
-
-		    $oDefaultCountry = $this->shop->getDefaultCountry();
-		    
+ 
 		    $oCalculation = new \wpsg\wpsg_calculation();
 		    $oCalculation->fromDB($_REQUEST['edit_id']);
@@ -198,6 +196,6 @@
                 
                 $order_id = $this->db->ImportQuery(WPSG_TBL_ORDER, Array(
-                    'type_payment' => wpsg_q($_REQUEST['add_payment']),
-                    'type_shipping' => wpsg_q($_REQUEST['add_shipping']),
+                    'payment_key' => wpsg_q($_REQUEST['add_payment']),
+                    'shipping_key' => wpsg_q($_REQUEST['add_shipping']),
                     'price_frontend' => $this->shop->getFrontendTaxview(),
                     'cdate' => 'NOW()',
@@ -1498,5 +1496,5 @@
 		public function indexAction()
 		{
-
+ 
 			if (wpsg_isSizedString($_REQUEST['do'], 'writeMultiRechnung') || wpsg_isSizedString($_REQUEST['wpsg_action'], 'showRechnung'))
 			{
Index: /lib/install.php
===================================================================
--- /lib/install.php	(revision 7214)
+++ /lib/install.php	(revision 7215)
@@ -118,7 +118,5 @@
    		price_gesamt DOUBLE(10,4) NOT NULL,
 		price_gesamt_netto DOUBLE(10,4) NOT NULL,
-		price_gesamt_brutto DOUBLE(10,4) NOT NULL,   		
-   		discount_tax_key VARCHAR(10) NOT NULL,
-   		discount_set VARCHAR(100) NOT NULL COMMENT 'Eventuell in %',		
+		price_gesamt_brutto DOUBLE(10,4) NOT NULL,   	 
 		price_frontend INT(1) NOT NULL,   		   		
 	  	bname VARCHAR(500) NOT NULL,
@@ -165,5 +163,5 @@
    		price_rabatt_netto DOUBLE(10,4) NOT NULL COMMENT 'DEPRECATED',
    		price_rabatt_brutto DOUBLE(10,4) NOT NULL COMMENT 'DEPRECATED',   		
-   		voucher_tax_key VARCHAR(10) COMMENT 'SteuerschlÃŒssel Gutschein'   		
+   		voucher_tax_key VARCHAR(10) COMMENT 'SteuerschlÃŒssel Gutschein',   		
    		price_gs DOUBLE(10,4) NOT NULL COMMENT 'DEPRECATED sollte nicht verwendet werden',
 		price_gs_netto DOUBLE(10,4) NOT NULL COMMENT 'DEPRECATED sollte nicht verwendet werden',
@@ -194,5 +192,5 @@
    		PRIMARY KEY  (id)
    	) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
-	 	
+	 	 
 	dbDelta($sql);
 	
Index: /lib/wpsg_calculation.class.php
===================================================================
--- /lib/wpsg_calculation.class.php	(revision 7214)
+++ /lib/wpsg_calculation.class.php	(revision 7215)
@@ -92,4 +92,10 @@
         public function getTargetCountryID() {
 	
+        	if (sizeof($this->arCountry) === 1) {
+        		
+        		return array_keys($this->arCountry)[0];
+        		
+			}
+        	
 			foreach ($this->arCountry as $country_id => $c) {
 		
@@ -97,5 +103,5 @@
 		
 			}
-	
+			
 			throw new \Exception(__('Kein Rechnungslaud fÃŒr die Berechnung gesetzt.', 'wpsg'));
         	
@@ -295,5 +301,6 @@
 						'brutto' => 0,
 						'tax' => 0
-					]
+					],
+					'product' => []
             	];
             	
@@ -805,4 +812,6 @@
         private function calculateTaxPart($bruttonetto, $val, $tax_key) {
 	        	
+        	if (!wpsg_isSizedInt($val)) return [0, 0];
+        	
         	if ($tax_key == '0') {
 		
