Index: /controller/wpsg_AdminController.class.php
===================================================================
--- /controller/wpsg_AdminController.class.php	(revision 5932)
+++ /controller/wpsg_AdminController.class.php	(revision 5934)
@@ -1030,18 +1030,12 @@
 			$oid = 0;
 			$pval = 0.0;
+			$option = $this->shop->get_option('wpsg_preisangaben');
 			if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
 			if (isset($_REQUEST['p_id'])) $pid = wpsg_q($_REQUEST['p_id']);
-			if (isset($_REQUEST['p_value'])) $pid = wpsg_q($_REQUEST['p_value']);
+			if (isset($_REQUEST['p_value'])) $pval = wpsg_tf($_REQUEST['p_value']);
 			if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'change')
 			{
 				//'wp-admin/admin.php?page=wpsg-Admin&subaction=paymentData&do=change&edit_id=12&p_id=34&p_value=56&noheader=1';
 			
-				//TODO
-				//price_payment (-/_netto/_brutto)
-				//type_payment
-				
-				
-				$val = abs(wpsg_tf($_REQUEST['p_value']));
-				
 				$arTaxKey = explode('_', wpsg_q($_REQUEST['mwst']));
 				$country_id = $arTaxKey[1];
@@ -1051,21 +1045,121 @@
 				if (wpsg_q($_REQUEST['noMwSt']) == 1) $noMwSt = true;
 				if ($noMwSt === true) $tax_value = 0; else $tax_value = $country->getTax($tax_key);
-				if (wpsg_q($_REQUEST['price_frontend']) == WPSG_NETTO)
-				{
-					$val = wpsg_calculatePreis($val, WPSG_BRUTTO, $tax_value);
-				}
-				$data = array('price_rabatt' => $val);
-				$sql = "`id` = '".wpsg_q($_REQUEST['edit_id'])."'";
-				
-				
-				
-				//$ogs = array('gs_id' => $gs_id, 'price_gs' => 10.0);
-				//$this->db->UpdateQuery(WPSG_TBL_ORDER, $ogs, "`id` = '".$oid."'");
-			
-			}
-				
-		
-		
+				//if (wpsg_q($_REQUEST['price_frontend']) == WPSG_NETTO)
+				/*
+				if ($this->shop->get_option('wpsg_preisangaben') == WPSG_NETTO)
+				{
+					$valb = wpsg_calculatePreis($pval, WPSG_BRUTTO, $tax_value);
+					$valn = $pval;
+				}
+				else
+				{
+					$valn = wpsg_calculatePreis($pval, WPSG_NETTO, $tax_value);
+					$valb = $pval;
+				}
+				
+				$data = array('price_payment' => $pval, 'price_payment_brutto' => $valb, 'price_payment_netto' => $valn,
+						      'type_payment' => $pid);
+				*/
+				if ($option == WPSG_NETTO)
+				{
+					$data = array('price_payment' => $pval, 'price_payment_netto' => $pval,	'type_payment' => $pid);
+				}
+				else
+				{
+					$data = array('price_payment' => $pval, 'price_payment_brutto' => $pval, 'type_payment' => $pid);
+				}
+				$this->db->UpdateQuery(WPSG_TBL_ORDER, $data, "`id` = '".$oid."'");
+			
+			}
+		
+			// Order-Daten sammeln und Tabelle neu generieren
+			$basket = new wpsg_basket();
+			$basket->initFromDB($oid, true);
+			$this->shop->view['basket'] = $basket->toArray(true);
+
+			//$pval = 7.9646;
+			// Aufruf in wpsg_basket mit Wert = 7.9646 ergibt 1.0354
+			//$taxp = $this->addMwSt($arReturn, $arReturn['sum']['preis_payment_netto']);
+			//$taxp = $bc->addMwSt($this->shop->view['basket'], $pval);
+			//$taxp = abs($taxp);
+				
+			if ($option == WPSG_NETTO)
+			{
+				$data = array('price_payment_brutto' => $this->shop->view['basket']['sum']['preis_payment_brutto']);
+			}
+			else
+			{
+				$data = array('price_payment_netto' => $this->shop->view['basket']['sum']['preis_payment_netto']);
+			}
+			$this->db->UpdateQuery(WPSG_TBL_ORDER, $data, "`id` = '".$oid."'");
+			
+			$this->shop->view['colspan'] = 3;
+			if ($this->shop->get_option('wpsg_showMwstAlways') == '1' || sizeof($this->shop->view['basket']['mwst']) > 1) $this->shop->view['colspan'] ++;
+			
+			$this->shop->render(WPSG_PATH_VIEW.'/order/view_orderdata.phtml');
+			
+			exit;
+				
 		}	// public function paymentDataAction()
+		
+		/**
+		 * Wird aufgerufen wenn die Versandart verÃ€ndert wird
+		 */
+		public function shippingDataAction()
+		{
+			$sid = 0;
+			$oid = 0;
+			$sval = 0.0;
+			$option = $this->shop->get_option('wpsg_preisangaben');
+			if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
+			if (isset($_REQUEST['s_id'])) $sid = wpsg_q($_REQUEST['s_id']);
+			if (isset($_REQUEST['s_value'])) $sval = wpsg_tf($_REQUEST['s_value']);
+			if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'change')
+			{
+				//'wp-admin/admin.php?page=wpsg-Admin&subaction=shippingData&do=change&edit_id=12&p_id=34&p_value=56&noheader=1';
+					
+				$arTaxKey = explode('_', wpsg_q($_REQUEST['mwst']));
+				$country_id = $arTaxKey[1];
+				$country = wpsg_country::getInstance($country_id);
+				$tax_key = 'c';
+				$noMwSt = false;
+				if (wpsg_q($_REQUEST['noMwSt']) == 1) $noMwSt = true;
+				if ($noMwSt === true) $tax_value = 0; else $tax_value = $country->getTax($tax_key);
+				//if (wpsg_q($_REQUEST['price_frontend']) == WPSG_NETTO)
+				if ($option == WPSG_NETTO)
+				{
+					$data = array('price_shipping' => $sval, 'price_shipping_netto' => $sval, 'type_shipping' => $sid);
+				}
+				else
+				{
+					$data = array('price_shipping' => $sval, 'price_shipping_brutto' => $sval, 'type_shipping' => $sid);
+				}
+				$this->db->UpdateQuery(WPSG_TBL_ORDER, $data, "`id` = '".$oid."'");
+					
+			}
+		
+			// Order-Daten sammeln und Tabelle neu generieren
+			$basket = new wpsg_basket();
+			$basket->initFromDB($oid, true);
+			$this->shop->view['basket'] = $basket->toArray(true);
+			
+			if ($option == WPSG_NETTO)
+			{
+				$data = array('price_shipping_brutto' => $this->shop->view['basket']['sum']['preis_shipping_brutto']);
+			}
+			else
+			{
+				$data = array('price_shipping_netto' => $this->shop->view['basket']['sum']['preis_shipping_netto']);
+			}
+			$this->db->UpdateQuery(WPSG_TBL_ORDER, $data, "`id` = '".$oid."'");
+			
+			$this->shop->view['colspan'] = 3;
+			if ($this->shop->get_option('wpsg_showMwstAlways') == '1' || sizeof($this->shop->view['basket']['mwst']) > 1) $this->shop->view['colspan'] ++;
+				
+			$this->shop->render(WPSG_PATH_VIEW.'/order/view_orderdata.phtml');
+				
+			exit;
+		
+		}	// public function shippingDataAction()
 		
 		/**
@@ -1077,4 +1171,5 @@
 			$t1 = 0;
 			$oid = 0;
+			$option = $this->shop->get_option('wpsg_preisangaben');
 			if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
 			
@@ -1100,5 +1195,5 @@
 				// Gutschein lÃ¶schen
 				$this->db->Query("DELETE FROM `".WPSG_TBL_GUTSCHEIN."` WHERE `id` = '".wpsg_q($_REQUEST['gs_id'])."'");
-				$ogs = array('gs_id' => 0, 'price_gs' => 0);
+				$ogs = array('gs_id' => 0, 'price_gs' => 0, 'price_gs_netto' => 0, 'price_gs_brutto' => 0);
 				$this->db->UpdateQuery(WPSG_TBL_ORDER, $ogs, "`id` = '".$oid."'");
 				$_REQUEST['gs_id'] = 0;
@@ -1117,5 +1212,5 @@
 				//wp-admin/admin.php?page=wpsg-Admin&subaction=voucherData&do=editname&oid=34&noheader=1
 				//submitdata: { field: 'code', gs_id: 92 }
-				$val = abs(wpsg_tf($_REQUEST['value']));
+				$sval = abs(wpsg_tf($_REQUEST['value']));
 				
 				$arTaxKey = explode('_', wpsg_q($_REQUEST['mwst']));
@@ -1126,10 +1221,13 @@
 				if (wpsg_q($_REQUEST['noMwSt']) == 1) $noMwSt = true;
 				if ($noMwSt === true) $tax_value = 0; else $tax_value = $country->getTax($tax_key);
-				if (wpsg_q($_REQUEST['price_frontend']) == WPSG_NETTO)
-				{
-			        //$val = wpsg_calculatePreis($val, WPSG_BRUTTO, $tax_value);
-				}
-				$data = array('price_gs' => $val);
-				$sql = "`id` = '".wpsg_q($_REQUEST['edit_id'])."'";
+				//if (wpsg_q($_REQUEST['price_frontend']) == WPSG_NETTO)
+				if ($option == WPSG_NETTO)
+				{
+					$data = array('price_gs' => $sval, 'price_gs_netto' => $sval);
+				}
+				else
+				{
+					$data = array('price_gs' => $sval, 'price_gs_brutto' => $sval);
+				}
 				$this->db->UpdateQuery(WPSG_TBL_ORDER, $data, "`id` = '".wpsg_q($_REQUEST['edit_id'])."'");
 					
@@ -1141,4 +1239,17 @@
 			$this->shop->view['basket'] = $basket->toArray(true);
 			
+			if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'editvalue')
+			{
+				if ($option == WPSG_NETTO)
+				{
+					$data = array('price_gs_brutto' => $this->shop->view['basket']['sum']['gs_brutto']);
+				}
+				else
+				{
+					$data = array('price_gs_netto' => $this->shop->view['basket']['sum']['gs_netto']);
+				}
+				$this->db->UpdateQuery(WPSG_TBL_ORDER, $data, "`id` = '".wpsg_q($_REQUEST['edit_id'])."'");
+			}
+			
 			$this->shop->view['colspan'] = 3;
 			if ($this->shop->get_option('wpsg_showMwstAlways') == '1' || sizeof($this->shop->view['basket']['mwst']) > 1) $this->shop->view['colspan'] ++;
@@ -1158,4 +1269,5 @@
 			$t1 = 0;
 			$oid = 0;
+			$option = $this->shop->get_option('wpsg_preisangaben');
 			if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
 				
@@ -1171,5 +1283,5 @@
 			{	
 				// Rabatt lÃ¶schen
-				$ogs = array('price_rabatt' => 0);
+				$ogs = array('price_rabatt' => 0, 'price_rabatt_netto' => 0, 'price_rabatt_brutto' => 0);
 				$this->db->UpdateQuery(WPSG_TBL_ORDER, $ogs, "`id` = '".$oid."'");
 		
@@ -1184,5 +1296,5 @@
 			else if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'editvalue')
 			{	
-				$val = abs(wpsg_tf($_REQUEST['value']));
+				$sval = abs(wpsg_tf($_REQUEST['value']));
 				
 				$arTaxKey = explode('_', wpsg_q($_REQUEST['mwst']));
@@ -1193,10 +1305,13 @@
 				if (wpsg_q($_REQUEST['noMwSt']) == 1) $noMwSt = true;
 				if ($noMwSt === true) $tax_value = 0; else $tax_value = $country->getTax($tax_key);
-				if (wpsg_q($_REQUEST['price_frontend']) == WPSG_NETTO)
-				{
-					//$val = wpsg_calculatePreis($val, WPSG_BRUTTO, $tax_value);
-				}
-				$data = array('price_rabatt' => $val);
-				$sql = "`id` = '".wpsg_q($_REQUEST['edit_id'])."'";
+				//if (wpsg_q($_REQUEST['price_frontend']) == WPSG_NETTO)
+				if ($option == WPSG_NETTO)
+				{
+					$data = array('price_rabatt' => $sval, 'price_rabatt_netto' => $sval);
+				}
+				else
+				{
+					$data = array('price_rabatt' => $sval, 'price_rabatt_brutto' => $sval);
+				}
 				$this->db->UpdateQuery(WPSG_TBL_ORDER, $data, "`id` = '".wpsg_q($_REQUEST['edit_id'])."'");
 
@@ -1208,4 +1323,17 @@
 			$this->shop->view['basket'] = $basket->toArray(true);
 				
+			if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'editvalue')
+			{
+				if ($option == WPSG_NETTO)
+				{
+					$data = array('price_rabatt_brutto' => $this->shop->view['basket']['sum']['preis_rabatt_brutto']);
+				}
+				else
+				{
+					$data = array('price_rabatt_netto' => $this->shop->view['basket']['sum']['preis_rabatt_netto']);
+				}
+				$this->db->UpdateQuery(WPSG_TBL_ORDER, $data, "`id` = '".wpsg_q($_REQUEST['edit_id'])."'");
+			}
+			
 			$this->shop->view['colspan'] = 3;
 			if ($this->shop->get_option('wpsg_showMwstAlways') == '1' || sizeof($this->shop->view['basket']['mwst']) > 1) $this->shop->view['colspan'] ++;
@@ -1216,4 +1344,150 @@
 		
 		} // public function discountDataAction()
+		
+		/**
+		 * Wird aufgerufen wenn die Produkte bearbeitet werden
+		 */
+		public function productDataAction()
+		{
+			
+			$t1 = 0;
+			$oid = 0;
+			$option = $this->shop->get_option('wpsg_preisangaben');
+			if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
+			
+			// Steuersatz berechnen
+			$oOrder = wpsg_order::getInstance($oid);
+			$country_id = $oOrder->getCustomer()->getCountryId();
+			//TODO
+			$country_id = 1;
+			$country = wpsg_country::getInstance($country_id);
+		
+			if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'add')
+			{
+				//url: 'wp-admin/admin.php?page=wpsg-Admin&subaction=productData&do=add&edit_id=' + this.o_id + '&p_id=' + pid + '&noheader=1',
+				if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
+				if (isset($_REQUEST['p_id'])) $pid = wpsg_q($_REQUEST['p_id']);
+				
+				$arProd = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($pid)."'");
+				
+				$data = array('o_id' => $oid, 'p_id' => $pid, 'productkey' => $pid,
+						'menge' => 1, 'mwst_key' => $arProd['mwst_key'], 'mod_vp_varkey' => $pid,
+						'allowedpayments' => $arProd['allowedpayments'],
+						'allowedshipping' => $arProd['allowedshipping'], 'weight' => $arProd['weight']
+				);
+
+				$noMwSt = false;
+				if (isset($_REQUEST['noMwSt']))
+				{
+					if (wpsg_q($_REQUEST['noMwSt']) == 1) $noMwSt = true;
+					$tax_key = $arProd['mwst_key'];
+					if ($noMwSt === true) $tax_value = 0; else $tax_value = $country->getTax($tax_key);
+				}
+				
+				$price = $arProd['preis'];
+
+				if ($option == WPSG_NETTO)
+				{
+					$netto = $price;
+					$brutto = $price * ((100.0 + $tax_value) / 100.0);
+					
+				}
+				else 
+				{
+					$netto = $price / ((100.0 + $tax_value) / 100.0);
+					$brutto = $price;
+					
+				}
+				$diff = $brutto - $netto;
+				
+				$data['price'] = $price;
+				$data['price_netto'] = $netto;
+				$data['price_brutto'] = $brutto;
+				////$data['mwst_value'] = $diff;
+				$data['mwst_value'] = $tax_value;
+				
+				$op_id = $this->db->ImportQuery(WPSG_TBL_ORDERPRODUCT, $data);
+				//$this->db->UpdateQuery(WPSG_TBL_ORDER, $ogs, "`id` = '".$oid."'");
+
+			}
+			else if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'remove')
+			{
+				// Order-Produkt lÃ¶schen
+				//url: 'wp-admin/admin.php?page=wpsg-Admin&subaction=productData&do=remove&edit_id=' + o_id + '&p_id=' + op_id + '&noheader=1',
+				if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
+				if (isset($_REQUEST['op_id'])) $opid = wpsg_q($_REQUEST['op_id']);
+				
+				$this->db->Query("DELETE FROM `".WPSG_TBL_ORDERPRODUCT."` WHERE `id` = '".wpsg_q($opid)."' ");
+				
+			}
+			else if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'change')
+			{
+				//url1 = 'wp-admin/admin.php?page=wpsg-Admin&subaction=productData&do=change&edit_id=' + this.o_id + '&op_id=' + this.op_id + '&p_id=' + pid + '&noheader=1';
+				if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
+				if (isset($_REQUEST['p_id'])) $pid = wpsg_q($_REQUEST['p_id']);
+				if (isset($_REQUEST['op_id'])) $opid = wpsg_q($_REQUEST['op_id']);
+
+				$arProd = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `id` = '".wpsg_q($pid)."'");
+				
+				$data = array('o_id' => $oid, 'p_id' => $pid, 'productkey' => $pid,
+						'mod_vp_varkey' => $pid,
+						'allowedpayments' => $arProd['allowedpayments'],
+						'allowedshipping' => $arProd['allowedshipping'], 'weight' => $arProd['weight']
+				);
+				
+				$pval = abs(wpsg_tf($_REQUEST['p_val']));
+				$pme = abs(wpsg_tf($_REQUEST['p_me']));
+				
+				$noMwSt = false;
+				if (isset($_REQUEST['noMwSt']))
+				{
+					if (wpsg_q($_REQUEST['noMwSt']) == 1) $noMwSt = true;
+					//$tax_key = $arProd['mwst_key'];
+					$tax_key = wpsg_q($_REQUEST['p_mwst']);
+					if ($noMwSt === true) $tax_value = 0; else $tax_value = $country->getTax($tax_key);
+				}
+				//TODO
+				
+				$price = $pval;
+				
+				if ($option == WPSG_NETTO)
+				{
+					$netto = $price;
+					$brutto = $price * ((100.0 + $tax_value) / 100.0);
+						
+				}
+				else
+				{
+					$netto = $price / ((100.0 + $tax_value) / 100.0);
+					$brutto = $price;
+						
+				}
+				$diff = $brutto - $netto;
+				
+				$data['mwst_key'] = wpsg_q($_REQUEST['p_mwst']);
+				$data['menge'] = $pme;
+				$data['price'] = $price;
+				$data['price_netto'] = $netto;
+				$data['price_brutto'] = $brutto;
+				////$data['mwst_value'] = $diff;
+				$data['mwst_value'] = $tax_value;
+				
+				$this->db->UpdateQuery(WPSG_TBL_ORDERPRODUCT, $data, "`id` = '".$opid."'");
+				
+			}
+				
+			// Order-Daten sammeln und Tabelle neu generieren
+			$basket = new wpsg_basket();
+			$basket->initFromDB($oid, true);
+			$this->shop->view['basket'] = $basket->toArray(true);
+		
+			$this->shop->view['colspan'] = 3;
+			if ($this->shop->get_option('wpsg_showMwstAlways') == '1' || sizeof($this->shop->view['basket']['mwst']) > 1) $this->shop->view['colspan'] ++;
+		
+			$this->shop->render(WPSG_PATH_VIEW.'/order/view_orderdata.phtml');
+		
+			exit;
+		
+		} // public function productDataAction()
 		
 		
Index: /controller/wpsg_OrderController.class.php
===================================================================
--- /controller/wpsg_OrderController.class.php	(revision 5932)
+++ /controller/wpsg_OrderController.class.php	(revision 5934)
@@ -276,5 +276,5 @@
 			$basket->initFromDB($this->shop->view['data']['id'], true); 
 			$this->shop->view['basket'] = $basket->toArray(true);
-						 
+			
 			$this->shop->view['colspan'] = 3;
 			if ($this->shop->get_option('wpsg_showMwstAlways') == '1' || sizeof($this->shop->view['basket']['mwst']) > 1) $this->shop->view['colspan'] ++;
Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 5932)
+++ /controller/wpsg_ShopController.class.php	(revision 5934)
@@ -1486,4 +1486,14 @@
 				
 			}
+			
+			// Daten aus Order-Produkt nehmen, da die Bestellung im Backend bearbeitbar ist
+			if (isset($produkt['op_mwst_key']))
+			{
+				$produkt['mwst_key'] = $produkt['op_mwst_key'];
+				$produkt['preis'] = $produkt['price'];
+				$produkt['preis_netto'] = $produkt['price_netto'];
+				$produkt['preis_brutto'] = $produkt['price_brutto'];
+				//$produkt['mwst_value'] = $produkt['op_mwst_value'];
+			}	
 
 			$produkt['product_id'] = $this->getProduktID($produkt_id);
@@ -3363,4 +3373,8 @@
 			if (wpsg_tf($value) <= 0) return 0;
 					
+			$price_option = WPSG_BRUTTO; //$this->get_option('wpsg_preisangaben');
+			//if (isset($arBasket['price_frontend']))
+			//	$price_option = $arBasket['price_frontend'];
+			
 			// Anteilig auf die SÃ€tze verteilen
 			foreach ((array)$arBasket['mwst'] as $mw_id => $mw)
@@ -3369,5 +3383,5 @@
 				if ($mw['base_value'] > 0)
 				{
-					if ((isset($arBasket['price_frontend'])) && ($arBasket['price_frontend'] == WPSG_BRUTTO))
+					if (($price_option == WPSG_BRUTTO))
 					{
 						$proz = $mw['base_value'] / $arBasket['sum']['preis_brutto'];
@@ -3377,5 +3391,5 @@
 						
 					}
-					else if ((isset($arBasket['price_frontend'])) && ($arBasket['price_frontend'] == WPSG_NETTO))
+					else
 					{
 						$proz = $mw['base_value'] / $arBasket['sum']['preis_netto'];
@@ -3383,12 +3397,4 @@
 						$arBasket['mwst'][$mw_id]['base_value'] -= $proz * $value;
 						$arBasket['mwst'][$mw_id]['sum'] = wpsg_calculateSteuer($arBasket['mwst'][$mw_id]['base_value'], WPSG_NETTO, $mw['value']);
-						
-					}
-					else
-					{
-						$proz = $mw['base_value'] / $arBasket['sum']['preis_brutto'];
-						
-						$arBasket['mwst'][$mw_id]['base_value'] -= $proz * $value;
-						$arBasket['mwst'][$mw_id]['sum'] = wpsg_calculateSteuer($arBasket['mwst'][$mw_id]['base_value'], WPSG_BRUTTO, $mw['value']);
 						
 					}
@@ -3424,4 +3430,9 @@
 			if (wpsg_tf($value) <= 0) return 0;
 			
+			$price_option = WPSG_BRUTTO; //$this->get_option('wpsg_preisangaben');
+			//if (isset($arBasket['price_frontend']))
+			//	$price_option = $arBasket['price_frontend'];
+			
+			// Anteilig auf die SÃ€tze verteilen
 			foreach ((array)$arBasket['mwst'] as $mw_id => $mw)
 			{
@@ -3429,5 +3440,5 @@
 				if ($mw['base_value'] > 0)
 				{
-					if ((isset($arBasket['price_frontend'])) && ($arBasket['price_frontend'] == WPSG_BRUTTO))
+					if (($price_option == WPSG_BRUTTO))
 					{
 						$proz = $mw['base_value'] / $arBasket['sum']['preis_brutto'];
@@ -3437,5 +3448,5 @@
 						
 					}
-					else if ((isset($arBasket['price_frontend'])) && ($arBasket['price_frontend'] == WPSG_NETTO))
+					else
 					{
 						$proz = $mw['base_value'] / $arBasket['sum']['preis_netto'];
@@ -3444,12 +3455,4 @@
 						$arBasket['mwst'][$mw_id]['base_value'] -= $proz * $value;
 						$arBasket['mwst'][$mw_id]['sum'] = wpsg_calculateSteuer($arBasket['mwst'][$mw_id]['base_value'], WPSG_NETTO, $mw['value']);
-						
-					}
-					else
-					{
-						$proz = $mw['base_value'] / $arBasket['sum']['preis_brutto'];
-						
-						$arBasket['mwst'][$mw_id]['base_value'] -= wpsg_calculatePreis($proz * $value, WPSG_BRUTTO, $mw['value']);
-						$arBasket['mwst'][$mw_id]['sum'] = wpsg_calculateSteuer($arBasket['mwst'][$mw_id]['base_value'], WPSG_BRUTTO, $mw['value']);
 						
 					}
Index: /lib/install.php
===================================================================
--- /lib/install.php	(revision 5932)
+++ /lib/install.php	(revision 5934)
@@ -121,6 +121,10 @@
 		price_payment_brutto DOUBLE(10,4) NOT NULL,
    		price_rabatt DOUBLE(10,4) NOT NULL,
-   		price_gs DOUBLE(10,4) NOT NULL,
-	  	price_frontend INT(1) NOT NULL,
+   		price_rabatt_netto DOUBLE(10,4) NOT NULL,
+   		price_rabatt_brutto DOUBLE(10,4) NOT NULL,
+		price_gs DOUBLE(10,4) NOT NULL,
+		price_gs_netto DOUBLE(10,4) NOT NULL,
+		price_gs_brutto DOUBLE(10,4) NOT NULL,
+		price_frontend INT(1) NOT NULL,
    		mwst_payment DOUBLE(10,4) NOT NULL,
    		mwst_shipping DOUBLE(10,4) NOT NULL,
Index: /lib/wpsg_basket.class.php
===================================================================
--- /lib/wpsg_basket.class.php	(revision 5932)
+++ /lib/wpsg_basket.class.php	(revision 5934)
@@ -369,4 +369,5 @@
 				SELECT
 					OP.`menge`, OP.`price` AS preis_brutto, 
+					OP.`price`, OP.`price_netto`, OP.`price_brutto`, OP.`mwst_key` AS op_mwst_key,
 					OP.`mwst_value` AS `mwst_value`,
 					IF (OP.`productkey` != '', OP.`productkey`, P.`id`) AS `productkey`, 
@@ -432,5 +433,4 @@
 			
 			// Gutschein-Wert aus der Order-Tabelle wegen Bearbeitung
-			//if ($order['price_frontend'] == WPSG_NETTO)
 			if ($backend)
 			{
@@ -593,5 +593,5 @@
 				$arBasket = $this->toArray();
 			 
-				// Keien Produkte nix speichern 
+				// Keine Produkte nix speichern 
 				// Sonst wurden schon beim Betreten des leeren Warenkorb (Bots) leere Bestellungen erzeugt 
 				if (!wpsg_isSizedArray($arBasket['produkte'])) return;
@@ -805,4 +805,41 @@
 				}
 				
+				// Rabatt und Gutschein netto und brutto speichern
+				$data['price_rabatt_netto'] = $arBasket['sum']['preis_rabatt_netto'];
+				$data['price_rabatt_brutto'] = $arBasket['sum']['preis_rabatt_brutto'];
+				if (isset($arBasket['sum']['gs']))
+				{
+					$data['price_gs_netto'] = $arBasket['sum']['gs_netto'];
+					$data['price_gs_brutto'] = $arBasket['sum']['gs_brutto'];
+				}
+				
+				/*
+				if ($this->shop->getFrontendTaxview() == WPSG_BRUTTO)
+				{
+					$tax = $this->shop->subMwSt($arBasket, $arBasket['sum']['preis_rabatt']);
+					$data['price_rabatt_netto'] = $arBasket['sum']['preis_rabatt'] - $tax;
+					$data['price_rabatt_brutto'] = $arBasket['sum']['preis_rabatt'];
+					if (isset($arBasket['sum']['gs']))
+					{
+						$tax = $this->shop->subMwSt($arBasket, $arBasket['sum']['gs']);
+						$data['price_gs_netto'] = $arBasket['sum']['gs'] - $tax;
+						$data['price_gs_brutto'] = $arBasket['sum']['gs'];
+					}
+					
+				}
+				else
+				{
+					$tax = $this->shop->addMwSt($arBasket, $arBasket['sum']['preis_rabatt']);
+					$data['price_rabatt_netto'] = $arBasket['sum']['preis_rabatt'];
+					$data['price_rabatt_brutto'] = $arBasket['sum']['preis_rabatt'] + $tax;
+					if (isset($arBasket['sum']['gs']))
+					{
+						$tax = $this->shop->addMwSt($arBasket, $arBasket['sum']['gs']);
+						$data['price_gs_netto'] = $arBasket['sum']['gs'];
+						$data['price_gs_brutto'] = $arBasket['sum']['gs'] + $tax;
+					}
+					
+				}
+				*/
 				$this->shop->callMods('basket_save_order', array(&$data, &$this->arCheckout, &$arBasket, $finish_order));
 				
@@ -1345,5 +1382,5 @@
 				}
 				
-			}
+			}	// if (($this->o_id > 0) && false)
 			
 			$arReturn = array();
@@ -1417,5 +1454,5 @@
 					unset($b['preis_netto']);
 					unset($b['preis_brutto']);
-					unset($b['mwst_key']); // Key muss auch gelÃ¶scht werden, damit die loadProduktArray den Preis korrekt ermittelt (Sonst funnktioniert es beim 2. Mal nicht)
+					unset($b['mwst_key']); // Key muss auch gelÃ¶scht werden, damit die loadProduktArray den Preis korrekt ermittelt (Sonst funktioniert es beim 2. Mal nicht)
 						
 					// in $b sind eventuell auch Moduldaten drin (Produktvariablen)
@@ -1538,5 +1575,5 @@
 				if (!$noMwSt)
 				{
-					
+					/*
 					if ((isset($this->arOrder['price_frontend'])) && ($this->arOrder['price_frontend'] == WPSG_BRUTTO))
 					{
@@ -1551,5 +1588,5 @@
 						
 					}
-					else
+					else */
 					{
 						wpsg_addSet($arReturn['mwst'][$tax_key_lang]['sum'], $sum_tax_value);
@@ -1597,6 +1634,7 @@
 			$this->shop->callMods('basket_toArray_preshippayment', array(&$this, &$arReturn));
 			  
-			// Die Versandkosten fÃŒr den Warenkorb berechnen berechnen
+			// Die Versandkosten fÃŒr den Warenkorb berechnen
 			// Dies darf im checkout2 nicht passieren, oder wenn der Parameter auf true
+//			if (false && $this->o_id > 0)
 			if ($this->o_id > 0)
 			{
@@ -1605,5 +1643,11 @@
 				$price_shipping = $order_data['price_shipping'];
 				$price_payment = $order_data['price_payment'];
-
+				$arReturn['sum']['preis_payment_brutto'] = $order_data['price_payment_brutto'];
+				$arReturn['sum']['preis_payment_netto'] = $order_data['price_payment_netto'];
+				$arReturn['sum']['preis_shipping_brutto'] = $order_data['price_shipping_brutto'];
+				$arReturn['sum']['preis_shipping_netto'] = $order_data['price_shipping_netto'];
+				
+				/*
+//TODO
 				if ($this->shop->getFrontendTaxview() == WPSG_BRUTTO)
 				{
@@ -1626,5 +1670,5 @@
 					
 				}
-				
+				*/
 			}
 			else
@@ -1750,5 +1794,5 @@
 						
 					}
-										
+					
 					$this->shop->callMods('calcPayment', array(&$arReturn));
 										
@@ -1756,42 +1800,22 @@
 				
 			}
-			
+			/*
 			// Zahlungskosten der Summe hinzurechnen
 			if (isset($arReturn['sum']['preis_payment_netto'])) $arReturn['sum']['preis_gesamt_netto'] += $arReturn['sum']['preis_payment_netto'];
 			if (isset($arReturn['sum']['preis_payment_brutto'])) $arReturn['sum']['preis_gesamt_brutto'] += $arReturn['sum']['preis_payment_brutto'];
-
+	
 			// Versandkosten der Summe hinzurechnen
 			if (isset($arReturn['sum']['preis_shipping_netto'])) $arReturn['sum']['preis_gesamt_netto'] += $arReturn['sum']['preis_shipping_netto'];
 			if (isset($arReturn['sum']['preis_shipping_brutto'])) $arReturn['sum']['preis_gesamt_brutto'] += $arReturn['sum']['preis_shipping_brutto'];
-			
+			*/
 			if ($backend)
 			{
-				
-				// Preisangaben fÃŒrs Backend
-				if ($this->shop->get_option('wpsg_preisangaben') == WPSG_NETTO)
-				{
-					
-					$arReturn['sum']['preis_gesamt'] += $arReturn['sum']['preis_shipping_netto'];
-					$arReturn['sum']['preis_shipping'] = $arReturn['sum']['preis_shipping_netto'];
-					
-					$arReturn['sum']['preis_gesamt'] += $arReturn['sum']['preis_payment_netto'];
-					$arReturn['sum']['preis_payment'] = $arReturn['sum']['preis_payment_netto'];
-					
-				}
-				else
-				{
-					
-					$arReturn['sum']['preis_gesamt'] += $arReturn['sum']['preis_shipping_brutto'];
-					$arReturn['sum']['preis_shipping'] = $arReturn['sum']['preis_shipping_brutto'];
-					
-					$arReturn['sum']['preis_gesamt'] += wpsg_getInt($arReturn['sum']['preis_payment_brutto']);
-					$arReturn['sum']['preis_payment'] = wpsg_getInt($arReturn['sum']['preis_payment_brutto']);
-					
-				}
-				
-				// Preise so anzeigen wie im Frontend (Firmenkunde/Endkunde)
+
+				// Preise so anzeigen wie im Backend eingestellt
+				$price_option = $this->shop->get_option('wpsg_preisangaben');
 				foreach ($arReturn['produkte'] as $produkt_key => &$p) {
-					if ($arReturn['price_frontend'] == WPSG_NETTO)
-					{
+					//if ($arReturn['price_frontend'] == WPSG_NETTO)
+					if ($price_option == WPSG_NETTO)
+							{
 						$p['preis'] = $p['preis_netto'];
 					}
@@ -1801,6 +1825,72 @@
 					}
 				}
-				if ($arReturn['price_frontend'] == WPSG_NETTO)
-				{
+				
+/*
+				// Zahlungskosten der Summe hinzurechnen
+				if (isset($arReturn['sum']['preis_payment_netto'])) $arReturn['sum']['preis_gesamt_netto'] += $arReturn['sum']['preis_payment_netto'];
+				if (isset($arReturn['sum']['preis_payment_brutto'])) $arReturn['sum']['preis_gesamt_brutto'] += $arReturn['sum']['preis_payment_brutto'];
+				
+				// Versandkosten der Summe hinzurechnen
+				if (isset($arReturn['sum']['preis_shipping_netto'])) $arReturn['sum']['preis_gesamt_netto'] += $arReturn['sum']['preis_shipping_netto'];
+				if (isset($arReturn['sum']['preis_shipping_brutto'])) $arReturn['sum']['preis_gesamt_brutto'] += $arReturn['sum']['preis_shipping_brutto'];
+*/
+				//if ($arReturn['price_frontend'] == WPSG_NETTO)
+				if ($price_option == WPSG_NETTO)
+				{
+					$taxp = 0.0;
+					//$taxp = $this->addMwSt($arReturn, $arReturn['sum']['preis_payment_netto']);
+					//$taxs = $this->addMwSt($arReturn, $arReturn['sum']['preis_shipping_netto']);
+					//$taxp = abs($taxp);
+					//$taxs = abs($taxs);
+					
+					$mb = new wpsg_mod_basic;
+					//$t = $this->shop->get_option('wpsg_mod_targo_mwst');	// 0=anteilig, sonst a,b,c,d,e
+					$pricep = $arReturn['sum']['preis_payment_brutto'];
+					$prices = $arReturn['sum']['preis_shipping_brutto'];
+					unset($arReturn['sum']['preis_payment_netto']);
+					unset($arReturn['sum']['preis_payment_brutto']);
+					unset($arReturn['sum']['preis_shipping_netto']);
+					unset($arReturn['sum']['preis_shipping_brutto']);
+						
+					$id = $this->arOrder['type_payment'];
+					$tax_keyp = $this->shop->arPayment[$id]['mwst_key'];
+					$mb->setPaymentKosten($arReturn, $pricep, $tax_keyp);
+					$taxp = $arReturn['payment']['mwst'];
+						
+					$id = $this->arOrder['type_shipping'];
+					$tax_keys = $this->shop->arShipping[$id]['mwst_key'];
+					$mb->setShippingKosten($arReturn, 'x', $prices, $tax_keys);
+					$taxs = $arReturn['shipping']['mwst'];
+						
+					if ($this->shop->addRoundedValues === true)
+					{
+							
+						$arReturn['sum']['preis_payment_brutto'] = round($arReturn['sum']['preis_payment_brutto'], 2);
+						$arReturn['sum']['preis_payment_netto'] = round($arReturn['sum']['preis_payment_netto'], 2);
+						$arReturn['sum']['preis_shipping_brutto'] = round($arReturn['sum']['preis_shipping_brutto'], 2);
+						$arReturn['sum']['preis_shipping_netto'] = round($arReturn['sum']['preis_shipping_netto'], 2);
+						
+					}
+					else
+					{
+						
+						$arReturn['sum']['preis_payment_brutto'] = $arReturn['sum']['preis_payment_netto'] + $taxp;
+						$arReturn['sum']['preis_payment_netto'] = $arReturn['sum']['preis_payment_netto'];
+						$arReturn['sum']['preis_shipping_brutto'] = $arReturn['sum']['preis_shipping_netto'] + $taxs;
+						$arReturn['sum']['preis_shipping_netto'] = $arReturn['sum']['preis_shipping_netto'];
+						
+					}
+						
+					// Zahlungskosten der Summe hinzurechnen
+					if (isset($arReturn['sum']['preis_payment_netto'])) $arReturn['sum']['preis_gesamt_netto'] += $arReturn['sum']['preis_payment_netto'];
+					if (isset($arReturn['sum']['preis_payment_brutto'])) $arReturn['sum']['preis_gesamt_brutto'] += $arReturn['sum']['preis_payment_brutto'];
+					
+					// Versandkosten der Summe hinzurechnen
+					if (isset($arReturn['sum']['preis_shipping_netto'])) $arReturn['sum']['preis_gesamt_netto'] += $arReturn['sum']['preis_shipping_netto'];
+					if (isset($arReturn['sum']['preis_shipping_brutto'])) $arReturn['sum']['preis_gesamt_brutto'] += $arReturn['sum']['preis_shipping_brutto'];
+					
+					foreach ($arReturn['mwst'] as $key => $value) {
+						$arReturn['sum']['preis_gesamt_netto'] += $value['sum'];
+					}
 					$arReturn['sum']['preis'] = $arReturn['sum']['preis_netto'];
 					$arReturn['sum']['preis_gesamt'] = $arReturn['sum']['preis_gesamt_netto'];
@@ -1814,6 +1904,58 @@
 						
 				}
-				else
-				{
+				else	// if ($price_option == WPSG_NETTO)
+				{
+					$taxp = 0;
+					$mb = new wpsg_mod_basic;
+					//$t = $this->shop->get_option('wpsg_mod_targo_mwst');	// 0=anteilig, sonst a,b,c,d,e
+					$pricep = $arReturn['sum']['preis_payment_brutto'];
+					$prices = $arReturn['sum']['preis_shipping_brutto'];
+					unset($arReturn['sum']['preis_payment_netto']);
+					unset($arReturn['sum']['preis_payment_brutto']);
+					unset($arReturn['sum']['preis_shipping_netto']);
+					unset($arReturn['sum']['preis_shipping_brutto']);
+					
+					$id = $this->arOrder['type_payment'];
+					$tax_keyp = $this->shop->arPayment[$id]['mwst_key'];
+					$mb->setPaymentKosten($arReturn, $pricep, $tax_keyp);
+					$taxp = $arReturn['payment']['mwst'];
+					
+					$id = $this->arOrder['type_shipping'];
+					$tax_keys = $this->shop->arShipping[$id]['mwst_key'];
+					$mb->setShippingKosten($arReturn, 'x', $prices, $tax_keys);
+					$taxs = $arReturn['shipping']['mwst'];
+					
+					//$taxp = $this->addMwSt($arReturn, $arReturn['sum']['preis_payment_brutto']);
+					//$taxs = $this->addMwSt($arReturn, $arReturn['sum']['preis_shipping_brutto']);
+					//$taxp = abs($taxp);
+					//$taxs = abs($taxs);
+					
+					if ($this->shop->addRoundedValues === true)
+					{
+							
+						$arReturn['sum']['preis_payment_brutto'] = round($arReturn['sum']['preis_payment_brutto'], 2);
+						$arReturn['sum']['preis_payment_netto'] = round($arReturn['sum']['preis_payment_brutto'] - $taxp, 2);
+						$arReturn['sum']['preis_shipping_brutto'] = round($arReturn['sum']['preis_shipping_brutto'], 2);
+						$arReturn['sum']['preis_shipping_netto'] = round($arReturn['sum']['preis_shipping_brutto'] - $taxs, 2);
+						
+					}
+					else
+					{
+						
+						$arReturn['sum']['preis_payment_brutto'] = $arReturn['sum']['preis_payment_netto'];
+						$arReturn['sum']['preis_payment_netto'] = $arReturn['sum']['preis_payment_brutto'] - $taxp;
+						$arReturn['sum']['preis_shipping_brutto'] = $arReturn['sum']['preis_shipping_brutto'];
+						$arReturn['sum']['preis_shipping_netto'] = $arReturn['sum']['preis_shipping_brutto'] - $taxs;
+						
+					}
+					
+					// Zahlungskosten der Summe hinzurechnen
+					if (isset($arReturn['sum']['preis_payment_netto'])) $arReturn['sum']['preis_gesamt_netto'] += $arReturn['sum']['preis_payment_netto'];
+					if (isset($arReturn['sum']['preis_payment_brutto'])) $arReturn['sum']['preis_gesamt_brutto'] += $arReturn['sum']['preis_payment_brutto'];
+					
+					// Versandkosten der Summe hinzurechnen
+					if (isset($arReturn['sum']['preis_shipping_netto'])) $arReturn['sum']['preis_gesamt_netto'] += $arReturn['sum']['preis_shipping_netto'];
+					if (isset($arReturn['sum']['preis_shipping_brutto'])) $arReturn['sum']['preis_gesamt_brutto'] += $arReturn['sum']['preis_shipping_brutto'];
+					
 					$arReturn['sum']['preis'] = $arReturn['sum']['preis_brutto'];
 					$arReturn['sum']['preis_gesamt'] = $arReturn['sum']['preis_gesamt_brutto'];
@@ -1825,9 +1967,17 @@
 						$arReturn['sum']['gs'] = $arReturn['sum']['gs_brutto'];
 					}
-				}
-				
-			}
-			else 
-			{
+				}	// else if ($price_option == WPSG_NETTO)
+				
+			}
+			else 	// if ($backend)
+			{
+				
+				// Zahlungskosten der Summe hinzurechnen
+				if (isset($arReturn['sum']['preis_payment_netto'])) $arReturn['sum']['preis_gesamt_netto'] += $arReturn['sum']['preis_payment_netto'];
+				if (isset($arReturn['sum']['preis_payment_brutto'])) $arReturn['sum']['preis_gesamt_brutto'] += $arReturn['sum']['preis_payment_brutto'];
+				
+				// Versandkosten der Summe hinzurechnen
+				if (isset($arReturn['sum']['preis_shipping_netto'])) $arReturn['sum']['preis_gesamt_netto'] += $arReturn['sum']['preis_shipping_netto'];
+				if (isset($arReturn['sum']['preis_shipping_brutto'])) $arReturn['sum']['preis_gesamt_brutto'] += $arReturn['sum']['preis_shipping_brutto'];
 				
 				// Preisangaben fÃŒrs Frontend 
@@ -1853,5 +2003,5 @@
 				}
 				
-			}
+			}	// else if ($backend)
 			
 			// Leere MwSt. SÃ€tze entfernen
@@ -1875,4 +2025,63 @@
 		} // public function toArray()
 		
+		
+		/**
+		 * Verteilt den Wert $value auf die MwSt SÃ€tze in $arBasket
+		 * $value wird Netto ÃŒbergeben
+		 */
+		public function addMwSt(&$arBasket, $value)
+		{
+				
+			if (wpsg_tf($value) <= 0) return 0;
+				
+			$price_option = $this->shop->get_option('wpsg_preisangaben');
+				
+			// Anteilig auf die SÃ€tze verteilen
+			foreach ((array)$arBasket['mwst'] as $mw_id => $mw)
+			{
+					
+				if ($mw['base_value'] > 0)
+				{
+					if (($price_option == WPSG_BRUTTO))
+					{
+						$proz = $mw['base_value'] / $arBasket['sum']['preis_brutto'];
+
+						$arBasket['mwst'][$mw_id]['base_value'] += $proz * $value;
+						$arBasket['mwst'][$mw_id]['sum'] = wpsg_calculateSteuer($arBasket['mwst'][$mw_id]['base_value'], WPSG_BRUTTO, $mw['value']);
+		
+					}
+					else
+					{
+						$proz = $mw['base_value'] / $arBasket['sum']['preis_netto'];
+						
+						$arBasket['mwst'][$mw_id]['base_value'] -= wpsg_calculatePreis($proz * $value, WPSG_NETTO, $mw['value']);
+						//$arBasket['mwst'][$mw_id]['base_value'] += $proz * $value;
+						$arBasket['mwst'][$mw_id]['sum'] = wpsg_calculateSteuer($arBasket['mwst'][$mw_id]['base_value'], WPSG_NETTO, $mw['value']);
+		
+					}
+		
+				}
+		
+			}
+				
+			// Mehrwertsteuer Summe korrigieren
+			$sum_mwst = 0;
+			foreach ($arBasket['mwst'] as $mw_id => $mw)
+			{
+		
+				$sum_mwst += $arBasket['mwst'][$mw_id]['sum'];
+		
+			}
+				
+			$sub = $arBasket['sum']['mwst'];
+				
+			$arBasket['sum']['mwst'] = abs($sum_mwst);
+		
+			return $sub - $arBasket['sum']['mwst'];
+				
+		} // public function addMwSt(&$arBasket, $value)
+		
+		
+		
 		/**
 		 * Gibt die Anzahl zurÃŒck, die im Warenkorb zu einem ProduktKEY enthalten ist
Index: /mods/wpsg_mod_basic.class.php
===================================================================
--- /mods/wpsg_mod_basic.class.php	(revision 5932)
+++ /mods/wpsg_mod_basic.class.php	(revision 5934)
@@ -805,10 +805,10 @@
 				
 		/**
-		 *  Hilfsfunktion, die die Versandkosten auf den Warenkorb Array draufschlÃ€ft
+		 *  Hilfsfunktion, die die Versandkosten auf den Warenkorb Array draufschlÃ€gt
 		 *  @param $arBasket Der Array des Warenkorbs
 		 *  @param $shipping_price Die absoluten Versandkosten 
 		 *  @param $mwst_id Die ID der MwSt, 0 fÃŒr anteilig
 		 */
-		protected function setShippingKosten(&$arBasket, $shipping_key, $shipping_price, $tax_key)
+		public function setShippingKosten(&$arBasket, $shipping_key, $shipping_price, $tax_key)
 		{
 			
@@ -948,5 +948,5 @@
 		 *  @param $mwst_id Die ID der MwSt, 0 fÃŒr anteilig
 		 */
-		protected function setPaymentKosten(&$arBasket, $payment_price, $tax_key)
+		public function setPaymentKosten(&$arBasket, $payment_price, $tax_key)
 		{
 						
@@ -982,7 +982,13 @@
 				wpsg_addSet($arBasket['sum']['mwst'], $payment_mwst);
 				
-				$arBasket['payment']['mwst'] = $tax_value; // Der Steuersatz der Zahlungsmethode
+				$arBasket['payment']['mwst'] = $payment_mwst;
+				$arBasket['payment']['tax_value'] = $tax_value;
+				$arBasket['payment']['preis_payment_netto'] = $payment_netto;
+				$arBasket['payment']['preis_payment_brutto'] = $payment_brutto;
 				$arBasket['payment']['tax_rata'] = false;
-								
+				
+				//$arBasket['payment']['mwst'] = $tax_value; // Der Steuersatz der Zahlungsmethode
+				//$arBasket['payment']['tax_rata'] = false;
+
 			}
 			else
@@ -1013,6 +1019,17 @@
 				}
 				
-				$mwst_sum = 0;	
-				
+				// Sollte es keine MwSt Verteilung geben, dann auf den ersten Satz draufrechnen
+				if (!wpsg_isSizedArray($arMwStAnteile) && wpsg_isSizedArray($arBasket['mwst']))
+				{
+
+					foreach ((array)$arBasket['mwst'] as $tax_key => $mw) { $arMwStAnteile[$tax_key] = 1; break; }
+
+				}
+				
+				$mwst_sum = 0;
+				$tax_netto_gesamt = 0;
+				$tax_brutto_gesamt = 0;
+				$tax_sum = 0;
+				/* HR
 				foreach ($arMwStAnteile as $tax_key => $mw_anteil)
 				{
@@ -1042,7 +1059,42 @@
 					 					
 				}
-					
+				*/
+
+				foreach ($arMwStAnteile as $tax_key => $mw_anteil)
+				{
+						
+					// Eventuell Nettopreis bestimmen
+					if ($this->shop->getBackendTaxview() == WPSG_BRUTTO)
+					{
+							
+						$defaultCountry = $this->shop->getDefaultCountry();
+						$defaultTax = $defaultCountry->getTax(substr($tax_key, 0, 1));
+				
+						$tax_netto = wpsg_calculatePreis(($payment_price * $mw_anteil), WPSG_NETTO, $defaultTax); // * $mw_anteil;
+				
+					}
+					else
+					{
+				
+						$tax_netto = $payment_price * $mw_anteil;
+				
+					}
+						
+					$tax_brutto = wpsg_calculatePreis($tax_netto, WPSG_BRUTTO, $arBasket['mwst'][$tax_key]['value']);
+						
+					$tax = $tax_brutto - $tax_netto;
+					$tax_sum += $tax;
+				
+					$tax_netto_gesamt += $tax_netto;
+					$tax_brutto_gesamt += $tax_brutto;
+						
+					$arBasket['mwst'][$tax_key]['sum'] += $tax;
+					$arBasket['mwst'][$tax_key]['base_value'] += $tax_brutto;
+				
+				}
+				
 				wpsg_addSet($arBasket['sum']['mwst'], $mwst_sum);
 				
+				/* HR
 				if ($this->shop->getFrontendTaxview() == WPSG_NETTO)
 				{
@@ -1059,5 +1111,12 @@
 																			
 				}
-									
+				*/
+				
+				wpsg_addSet($arBasket['sum']['preis_payment_netto'], $tax_netto_gesamt);
+				wpsg_addSet($arBasket['sum']['preis_payment_brutto'], $tax_brutto_gesamt);
+				
+				$arBasket['payment']['mwst'] = $tax_sum;
+				$arBasket['payment']['preis_payment_netto'] = $tax_netto_gesamt;
+				$arBasket['payment']['preis_payment_brutto'] = $tax_brutto_gesamt;
 				$arBasket['payment']['tax_rata'] = true;
 				
Index: /mods/wpsg_mod_discount.class.php
===================================================================
--- /mods/wpsg_mod_discount.class.php	(revision 5932)
+++ /mods/wpsg_mod_discount.class.php	(revision 5934)
@@ -511,18 +511,19 @@
 			{
 				// Im Backend Rabatt nicht neu berechnen aus Bestellung entnehmen
-				$discount = $arReturn['order_rabatt'];
-				$discount_value = $discount;
-				$price_frontend = $arReturn['price_frontend'];
+				$discount_brutto = $basket->arOrder['price_rabatt_brutto'];
+				$discount_netto = $basket->arOrder['price_rabatt_netto'];
+				//$price_option = $arReturn['price_frontend'];
+				$price_option = $this->shop->get_option('wpsg_preisangaben');
 				$discount_tax = 0.0;
-				if ($price_frontend == WPSG_NETTO)
+				if ($price_option == WPSG_BRUTTO)
 				{
 						
 					if ($this->shop->get_option('wpsg_kleinunternehmer') != '1')
 					{
-							
-						$discount_tax = $this->shop->addMwSt($arReturn, $discount);
-						//$discount_tax = $this->shop->subMwSt($arReturn, $discount);
-						//$discount_value = $discount - $discount_tax;
-						$discount_tax = 0.0;
+					
+						// Rabatt auf die verschiedenen Produkte aufteilen.
+						//$discount_tax = $this->shop->addMwSt($arReturn, $discount);
+						$discount_tax = $this->shop->subMwSt($arReturn, $discount_brutto);
+
 					}
 						
@@ -530,6 +531,6 @@
 					{
 					
-						$discount_brutto = round($discount_value + $discount_tax, 2);
-						$discount_netto = round($discount_value, 2);
+						$discount_brutto = round($discount_brutto, 2);
+						$discount_netto = round($discount_brutto - $discount_tax, 2);
 					
 					}
@@ -537,19 +538,17 @@
 					{
 					
-						$discount_brutto = $discount_value + $discount_tax;
-						$discount_netto = $discount_value;
-					
-					}
-						
-				}
-				else
-				{
-						
-					$discount_value = $discount;
+						$discount_brutto = $discount_brutto;
+						$discount_netto = $discount_brutto - $discount_tax;
+					
+					}
+						
+				}
+				else	// if ($price_option == WPSG_BRUTTO)
+				{
 						
 					if ($this->shop->get_option('wpsg_kleinunternehmer') != '1')
 					{
 			
-						$discount_tax = $this->shop->subMwSt($arReturn, $discount);
+						$discount_tax = $this->shop->addMwSt($arReturn, $discount_netto);
 						
 					}
@@ -558,6 +557,6 @@
 					{
 					
-						$discount_brutto = round($discount_value, 2);
-						$discount_netto = round($discount_value - $discount_tax, 2);
+						$discount_brutto = round($discount_netto + $discount_tax, 2);
+						//$discount_netto = round($discount_value - $discount_tax, 2);
 					
 					}
@@ -565,9 +564,10 @@
 					{
 					
-						$discount_brutto = $discount_value;
-						$discount_netto = $discount_value - $discount_tax;
-					
-					}
-				}	// if ($price_frontend == WPSG_NETTO)
+						//$discount_brutto = $discount_value;
+						$discount_netto = $discount_brutto - $discount_tax;
+					
+					}
+
+				}	// else if ($price_option == WPSG_BRUTTO)
 				
 				
Index: /mods/wpsg_mod_gutschein.class.php
===================================================================
--- /mods/wpsg_mod_gutschein.class.php	(revision 5932)
+++ /mods/wpsg_mod_gutschein.class.php	(revision 5934)
@@ -519,5 +519,6 @@
 			$product_allowed = wpsg_explode(',', $gs_db['products']);
 					
-			if (wpsg_isSizedArray(wpsg_explode(',', $gs_db['productgroups'])))
+			$temp = wpsg_explode(',', $gs_db['productgroups']);
+			if (wpsg_isSizedArray($temp))
 			{
 
@@ -590,35 +591,59 @@
 					$gs_tax = 0;
 						
-					if ((isset($arReturn['price_frontend'])) && ($arReturn['price_frontend'] == WPSG_BRUTTO))
-					{
-						//$gs_value = $basket->gs_value;
+					$gs_brutto = $basket->arOrder['price_gs_brutto'];
+					$gs_netto = $basket->arOrder['price_gs_netto'];
+					$gs_tax = $gs_brutto - $gs_netto;
+					$gs_value = $gs_brutto;
+					
+					//if ((isset($arReturn['price_frontend'])) && ($arReturn['price_frontend'] == WPSG_BRUTTO))
+					$price_option = $this->shop->get_option('wpsg_preisangaben');
+					
+					if ($price_option == WPSG_NETTO)
+					{
+						$gs_value = $basket->gs_value;
 				
 						if ($this->shop->get_option('wpsg_kleinunternehmer') != '1')
 						{
 				
-							$gs_tax = $this->shop->subMwSt($arReturn, $basket->gs_value);
+							$gs_tax = $this->shop->addMwSt($arReturn, $gs_netto);
 				
 						}
-						$gs_brutto = $gs_value;
-						$gs_netto = $gs_value - $gs_tax;
-				
-					}
-						
-					if ((isset($arReturn['price_frontend'])) && ($arReturn['price_frontend'] == WPSG_NETTO))
+						$gs_brutto = $gs_netto + $gs_tax;
+				
+						$arReturn['sum']['gs'] = $gs_netto;
+						$arReturn['sum']['gs_netto'] = $gs_netto;
+						$arReturn['sum']['gs_brutto'] = $gs_brutto;
+						$arReturn['sum']['preis'] = $arReturn['sum']['preis_netto'];
+						$arReturn['sum']['preis_gesamt'] = $arReturn['sum']['preis_gesamt_netto'];
+						
+					}
+						
+					//if ((isset($arReturn['price_frontend'])) && ($arReturn['price_frontend'] == WPSG_NETTO))
+					if ($price_option == WPSG_BRUTTO)
 					{
 						if ($this->shop->get_option('wpsg_kleinunternehmer') != '1')
 						{
 				
-							$gs_tax = $this->shop->addMwSt($arReturn, $basket->gs_value);
+							$gs_tax = $this->shop->subMwSt($arReturn, $gs_brutto);
 				
 						}
 						//$gs_value = $basket->gs_value + $gs_tax;
-						$gs_brutto = $gs_value + $gs_tax;
-						$gs_netto = $gs_value;
-				
-					}
-						
-				}
-				else
+						$gs_netto = $gs_brutto - $gs_tax;
+						
+						$arReturn['sum']['gs'] = $gs_brutto;
+						$arReturn['sum']['gs_netto'] = $gs_netto;
+						$arReturn['sum']['gs_brutto'] = $gs_brutto;
+						$arReturn['sum']['preis'] = $arReturn['sum']['preis_brutto'];
+						$arReturn['sum']['preis_gesamt'] = $arReturn['sum']['preis_gesamt_brutto'];
+				
+					}
+					
+					$arReturn['sum']['preis_brutto'] -= $gs_brutto;
+					$arReturn['sum']['preis_netto'] -= $gs_netto;
+					$arReturn['sum']['preis_gesamt_brutto'] -= $gs_brutto;
+					$arReturn['sum']['preis_gesamt_netto'] -= $gs_netto;
+					
+				}
+				else	// if ((isset($arReturn['backend'])) && $arReturn['backend'])
 				{
 					$arReturn['gs'] = array(
@@ -680,33 +705,32 @@
 					$gs_netto = $gs_value - $gs_tax;
 					
-				}
-				
-
-				$arReturn['sum']['preis_brutto'] -= $gs_brutto;
-				$arReturn['sum']['preis_netto'] -= $gs_netto;
-				$arReturn['sum']['preis_gesamt_brutto'] -= $gs_brutto;
-				$arReturn['sum']['preis_gesamt_netto'] -= $gs_netto;
-												
-				if ($this->shop->getFrontendTaxview() == WPSG_NETTO)
-				{
-
-					$arReturn['sum']['gs'] = $gs_netto;
-					$arReturn['sum']['gs_netto'] = $gs_netto;
-					$arReturn['sum']['gs_brutto'] = $gs_brutto;
-					$arReturn['sum']['preis'] = $arReturn['sum']['preis_netto'];
-					$arReturn['sum']['preis_gesamt'] = $arReturn['sum']['preis_gesamt_netto'];
-					
-				}
-				else if ($this->shop->getFrontendTaxview() == WPSG_BRUTTO)
-				{
-					
-					$arReturn['sum']['gs'] = $gs_brutto;
-					$arReturn['sum']['gs_netto'] = $gs_netto;
-					$arReturn['sum']['gs_brutto'] = $gs_brutto;
-					$arReturn['sum']['preis'] = $arReturn['sum']['preis_brutto'];
-					$arReturn['sum']['preis_gesamt'] = $arReturn['sum']['preis_gesamt_brutto'];
-					
-				} 
-				 
+					$arReturn['sum']['preis_brutto'] -= $gs_brutto;
+					$arReturn['sum']['preis_netto'] -= $gs_netto;
+					$arReturn['sum']['preis_gesamt_brutto'] -= $gs_brutto;
+					$arReturn['sum']['preis_gesamt_netto'] -= $gs_netto;
+					
+					if ($this->shop->getFrontendTaxview() == WPSG_NETTO)
+					{
+					
+						$arReturn['sum']['gs'] = $gs_netto;
+						$arReturn['sum']['gs_netto'] = $gs_netto;
+						$arReturn['sum']['gs_brutto'] = $gs_brutto;
+						$arReturn['sum']['preis'] = $arReturn['sum']['preis_netto'];
+						$arReturn['sum']['preis_gesamt'] = $arReturn['sum']['preis_gesamt_netto'];
+							
+					}
+					else if ($this->shop->getFrontendTaxview() == WPSG_BRUTTO)
+					{
+							
+						$arReturn['sum']['gs'] = $gs_brutto;
+						$arReturn['sum']['gs_netto'] = $gs_netto;
+						$arReturn['sum']['gs_brutto'] = $gs_brutto;
+						$arReturn['sum']['preis'] = $arReturn['sum']['preis_brutto'];
+						$arReturn['sum']['preis_gesamt'] = $arReturn['sum']['preis_gesamt_brutto'];
+							
+					}
+						
+				}	// else if ((isset($arReturn['backend'])) && $arReturn['backend'])
+				
 			} // gs_value 
 			
Index: /mods/wpsg_mod_kundenverwaltung.class.php
===================================================================
--- /mods/wpsg_mod_kundenverwaltung.class.php	(revision 5932)
+++ /mods/wpsg_mod_kundenverwaltung.class.php	(revision 5934)
@@ -134,5 +134,5 @@
 			$this->shop->update_option('wpsg_mod_kundenverwaltung_showCheckoutLogout', $_REQUEST['wpsg_mod_kundenverwaltung_showCheckoutLogout']);
 			$this->shop->update_option('wpsg_mod_kundenverwaltung_showCheckoutRegister', $_REQUEST['wpsg_mod_kundenverwaltung_showCheckoutRegister']);
-			$this->shop->update_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand', $_REQUEST['wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand']);
+			$this->shop->update_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang', $_REQUEST['wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang']);
 			$this->shop->update_option('wpsg_mod_kundenverwaltung_loginZwang', $_REQUEST['wpsg_mod_kundenverwaltung_loginZwang']);
 			$this->shop->update_option('wpsg_mod_kundenverwaltung_preisAnzeige', $_REQUEST['wpsg_mod_kundenverwaltung_preisAnzeige']);
@@ -237,5 +237,5 @@
 										
 					// Registrierungszwang und leer
-					if ((isset($_REQUEST['wpsg_mod_kundenverwaltung_register']) || $this->shop->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') && trim($_REQUEST['wpsg']['mod_kundenverwaltung']['pwd1']) == '' && $_REQUEST['wpsg']['mod_kundenverwaltung']['pwd2'] == '')
+					if ((isset($_REQUEST['wpsg_mod_kundenverwaltung_register']) || $this->shop->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1') && trim($_REQUEST['wpsg']['mod_kundenverwaltung']['pwd1']) == '' && $_REQUEST['wpsg']['mod_kundenverwaltung']['pwd2'] == '')
 					{
 						
Index: /mods/wpsg_mod_prepayment.class.php
===================================================================
--- /mods/wpsg_mod_prepayment.class.php	(revision 5932)
+++ /mods/wpsg_mod_prepayment.class.php	(revision 5934)
@@ -104,5 +104,5 @@
 				'name' => __($this->shop->get_option('wpsg_mod_prepayment_bezeichnung'), 'wpsg'),
 				'preis' => $this->shop->get_option('wpsg_mod_prepayment_gebuehr'),
-				'mwst' => $this->shop->get_option('wpsg_mod_prepayment_mwst'),
+				'mwst_key' => $this->shop->get_option('wpsg_mod_prepayment_mwst'),
 				'mwst_value' => $mwst_value,
 				'mwst_null' => $this->shop->get_option('wpsg_mod_prepayment_mwstland'),
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 5932)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 5934)
@@ -857,10 +857,10 @@
 			$this->shop->view['basket'] = $custom_data['basket'];
 			
-			if (!is_array($custom_data['basket']))
+			////if (!is_array($custom_data['basket']))
 			{
 				
 				$basket = new wpsg_basket();
-				$basket->initFromDB($order_id);
-				$this->shop->view['basket'] = $basket->toArray();
+				$basket->initFromDB($order_id, true);
+				$this->shop->view['basket'] = $basket->toArray(true);
 				
 			}
Index: /mods/wpsg_mod_targo.class.php
===================================================================
--- /mods/wpsg_mod_targo.class.php	(revision 5932)
+++ /mods/wpsg_mod_targo.class.php	(revision 5934)
@@ -142,5 +142,5 @@
 						'name' => __($this->shop->get_option('wpsg_mod_targo_bezeichnung'), 'wpsg'),
 						'preis' => $this->shop->get_option('wpsg_mod_targo_gebuehr'),
-						'mwst' => $this->shop->get_option('wpsg_mod_targo_mwst'),
+						'mwst_key' => $this->shop->get_option('wpsg_mod_targo_mwst'),
 						'mwst_value' => $mwst_value,
 						'mwst_null' => $this->shop->get_option('wpsg_mod_targo_mwstland'),
@@ -195,5 +195,5 @@
 			if ($arBasket['checkout']['payment'] == $this->id)
 			{
-			 
+				
 				$payment_price = $this->getPreis($this->shop->get_option('wpsg_mod_targo_gebuehr'), $arBasket['sum']['preis']);
 				
Index: /mods/wpsg_mod_userpayment.class.php
===================================================================
--- /mods/wpsg_mod_userpayment.class.php	(revision 5932)
+++ /mods/wpsg_mod_userpayment.class.php	(revision 5934)
@@ -194,5 +194,5 @@
 					'mwst_value' => $mwst_value,
 					'mwst_null' => $zv['mwst_laender'],
-					'deleted' => $zv['deleted']
+					'deleted' => wpsg_getInt($zv['deleted'])
 				);	
 				
Index: /views/admin/form/text.phtml
===================================================================
--- /views/admin/form/text.phtml	(revision 5932)
+++ /views/admin/form/text.phtml	(revision 5934)
@@ -23,5 +23,5 @@
         jQuery(document).ready(function() {
 
-            jQuery('#<?php echo $this->view['field_id']; ?>').wspg_editable('<?php echo $this->view['field_config']['inlineEdit_url']; ?>', {
+            jQuery('#<?php echo $this->view['field_id']; ?>').wpsg_editable('<?php echo $this->view['field_config']['inlineEdit_url']; ?>', {
                 'placement': 'bottom'
                 <?php if (wpsg_isSizedString($this->view['field_config']['inlineEdit_type'])) { ?>
Index: /views/admin/kundendaten_tab2.phtml
===================================================================
--- /views/admin/kundendaten_tab2.phtml	(revision 5932)
+++ /views/admin/kundendaten_tab2.phtml	(revision 5934)
@@ -48,5 +48,5 @@
 				<script type="text/javascript">/* <![CDATA[ */
 
-					jQuery('#kundenvariable_name_<?php echo $c_id; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
+					jQuery('#kundenvariable_name_<?php echo $c_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
 						submitdata: { 
 				    		field: 'name',
Index: /views/admin/versandzonen_list.phtml
===================================================================
--- /views/admin/versandzonen_list.phtml	(revision 5932)
+++ /views/admin/versandzonen_list.phtml	(revision 5934)
@@ -35,5 +35,5 @@
 			<script type="text/javascript">/* <![CDATA[ */
 
-				jQuery('#vz_<?php echo $vz['id']; ?>_name').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
+				jQuery('#vz_<?php echo $vz['id']; ?>_name').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
 					submitdata: { 
 			    		field: 'name',
@@ -46,5 +46,5 @@
 				});
 			
-				jQuery('#vz_<?php echo $vz['id']; ?>_value').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
+				jQuery('#vz_<?php echo $vz['id']; ?>_value').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', {
 					submitdata: { 
 			    		field: 'value',
Index: /views/css/admin.css
===================================================================
--- /views/css/admin.css	(revision 5932)
+++ /views/css/admin.css	(revision 5934)
@@ -29,4 +29,5 @@
 #wpsg-bs .editableform textarea { width:500px; height:250px; }
 #wpsg-bs .wpsg-glyphicon { margin-right:10px; }
+#wpsg-bs .wpsg_glyphicon_right { float:right; }
 #wpsg-bs .wpsg-glyphlink-td > span { margin-left:5px; margin-top:5px; }
 #wpsg-bs .wpsg-glyphlink-td:hover { text-decoration:none; }
Index: /views/js/editable.js
===================================================================
--- /views/js/editable.js	(revision 5932)
+++ /views/js/editable.js	(revision 5934)
@@ -3,5 +3,5 @@
 	 * Wrapper, um die Editierfunktion austauschbarer zu machen
 	 */
-	jQuery.fn.wspg_editable = function(url, options) {
+	jQuery.fn.wpsg_editable = function(url, options) {
 	
 		return this.each(function() {
Index: /views/mods/mod_deliverynote/foottext_list.phtml
===================================================================
--- /views/mods/mod_deliverynote/foottext_list.phtml	(revision 5932)
+++ /views/mods/mod_deliverynote/foottext_list.phtml	(revision 5934)
@@ -34,5 +34,5 @@
                     jQuery(document).ready(function() {
 
-                        jQuery('#wpsg_foottext_0_<?php echo $key; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=inlineEdit&noheader=1', {
+                        jQuery('#wpsg_foottext_0_<?php echo $key; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=inlineEdit&noheader=1', {
                             submitdata: {
                                 field: '0',
@@ -45,5 +45,5 @@
                         });
 
-                        jQuery('#wpsg_foottext_1_<?php echo $key; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=inlineEdit&noheader=1', {
+                        jQuery('#wpsg_foottext_1_<?php echo $key; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_deliverynote&do=inlineEdit&noheader=1', {
                             submitdata: {
                                 field: '1',
Index: /views/mods/mod_export/fields.phtml
===================================================================
--- /views/mods/mod_export/fields.phtml	(revision 5932)
+++ /views/mods/mod_export/fields.phtml	(revision 5934)
@@ -91,12 +91,12 @@
                     jQuery(document).ready(function() {
                         
-                        jQuery('#field_name_<?php echo $f_id; ?>').wspg_editable('<?php echo $inlineEdit_url; ?>', { } );
+                        jQuery('#field_name_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', { } );
                         
-                        jQuery('#field_typ_<?php echo $f_id; ?>').wspg_editable('<?php echo $inlineEdit_url; ?>', { 
+                        jQuery('#field_typ_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', { 
                             'type': 'multiarray',
                             'data': '<?php echo json_encode($this->view['fields']); ?>'                            
                         } );
                         
-                        jQuery('#field_format_<?php echo $f_id; ?>').wspg_editable('<?php echo $inlineEdit_url; ?>', {
+                        jQuery('#field_format_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', {
                             'type': 'select',
                             'data': <?php echo wpsg_prepare_for_inlineEdit($this->view['arFieldFormats']); ?>,
@@ -109,5 +109,5 @@
                         } );
                         
-                        jQuery('#field_userformat_<?php echo $f_id; ?>').wspg_editable('<?php echo $inlineEdit_url; ?>', { } );
+                        jQuery('#field_userformat_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', { } );
                         
                     } );
Index: /views/mods/mod_export/profil.phtml
===================================================================
--- /views/mods/mod_export/profil.phtml	(revision 5932)
+++ /views/mods/mod_export/profil.phtml	(revision 5934)
@@ -111,5 +111,5 @@
                                     jQuery(document).ready(function() {
                                         
-                                        jQuery('#orderfilter_cdate_m').wspg_editable('<?php echo $inlineEdit_url; ?>', {
+                                        jQuery('#orderfilter_cdate_m').wpsg_editable('<?php echo $inlineEdit_url; ?>', {
                                             'test': '1', 'placement': 'bottom', 'type': 'select',  'data': <?php echo wpsg_prepare_for_inlineEdit($arMonth); ?>
                                         } );
@@ -125,5 +125,5 @@
                                     jQuery(document).ready(function() {
                                         
-                                        jQuery('#orderfilter_cdate_y').wspg_editable('<?php echo $inlineEdit_url; ?>', {
+                                        jQuery('#orderfilter_cdate_y').wpsg_editable('<?php echo $inlineEdit_url; ?>', {
                                             'placement': 'bottom', 'type': 'select',  'data': <?php echo wpsg_prepare_for_inlineEdit($arYearCdate); ?>
                                         } );
@@ -145,5 +145,5 @@
                                     jQuery(document).ready(function() {
                                         
-                                        jQuery('#orderfilter_invoicedate_m').wspg_editable('<?php echo $inlineEdit_url; ?>', {
+                                        jQuery('#orderfilter_invoicedate_m').wpsg_editable('<?php echo $inlineEdit_url; ?>', {
                                             'placement': 'bottom', 'type': 'select',  'data': <?php echo wpsg_prepare_for_inlineEdit($arMonth); ?>
                                         } );
@@ -159,5 +159,5 @@
                                     jQuery(document).ready(function() {
                                         
-                                        jQuery('#orderfilter_invoicedate_y').wspg_editable('<?php echo $inlineEdit_url; ?>', {
+                                        jQuery('#orderfilter_invoicedate_y').wpsg_editable('<?php echo $inlineEdit_url; ?>', {
                                             'placement': 'bottom', 'type': 'select',  'data': <?php echo wpsg_prepare_for_inlineEdit($arYearInvoice); ?>
                                         } );
Index: /views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml
===================================================================
--- /views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml	(revision 5932)
+++ /views/mods/mod_kundenverwaltung/checkout_customer_inner.phtml	(revision 5934)
@@ -17,14 +17,14 @@
  <div class="wpsg_checkoutblock">
   <label for="wpsg_mod_kundenverwaltung_pwd1"><?php echo __("Passwort", "wpsg"); ?>
-  <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+  <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
   </label>
-  <input class="wpsg_checkout <?php echo (($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1')?'validate[required]':''); ?> <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="mod_kundenverwaltung_pwd1" name="wpsg[mod_kundenverwaltung][pwd1]" value="" />   
+  <input class="wpsg_checkout <?php echo (($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1')?'validate[required]':''); ?> <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="mod_kundenverwaltung_pwd1" name="wpsg[mod_kundenverwaltung][pwd1]" value="" />   
  </div>
 
  <div class="wpsg_checkoutblock">  
   <label for="wpsg_mod_kundenverwaltung_pwd2"><?php echo __("Passwort wiederholen", "wpsg"); ?>
-  <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+  <?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
   </label>
-  <input class="wpsg_checkout <?php echo (($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1')?'validate[required]':''); ?> <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pwd2" name="wpsg[mod_kundenverwaltung][pwd2]" value="" />
+  <input class="wpsg_checkout <?php echo (($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1')?'validate[required]':''); ?> <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pwd2" name="wpsg[mod_kundenverwaltung][pwd2]" value="" />
  </div>
 
Index: /views/mods/mod_kundenverwaltung/index.phtml
===================================================================
--- /views/mods/mod_kundenverwaltung/index.phtml	(revision 5932)
+++ /views/mods/mod_kundenverwaltung/index.phtml	(revision 5934)
@@ -101,5 +101,5 @@
                                 <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie den Kunden lÃ¶schen wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Diesen Kunden lÃ¶schen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=del&edit_id=<?php echo $c->id; ?>&noheader=1"><?php echo __("LÃ¶schen", "wpsg"); ?></a></span>
                                 |
-                                <span class="order"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter%5Bk_id%5D=<?php echo $k['id']; ?>"><?php echo __('Bestellungen einsehen', 'wpsg'); ?></a></span>
+                                <span class="order"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter%5Bk_id%5D=<?php echo $c->id; ?>"><?php echo __('Bestellungen einsehen', 'wpsg'); ?></a></span>
                             </div>
                         </td>
Index: /views/mods/mod_kundenverwaltung/profil.phtml
===================================================================
--- /views/mods/mod_kundenverwaltung/profil.phtml	(revision 5932)
+++ /views/mods/mod_kundenverwaltung/profil.phtml	(revision 5934)
@@ -264,5 +264,5 @@
 		<div class="wpsg_checkoutblock">		
 			<label for="wpsg_mod_kundenverwaltung_pwd1"><?php echo __("Passwort", "wpsg"); ?>
-			<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+			<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
 			</label>
 			<input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pw1" name="wpsg[mod_kundenverwaltung][register_pwd1]" value="" /><span id="wpsg_mod_kundenverwaltung_password_result"></span>	
@@ -271,5 +271,5 @@
 		<div class="wpsg_checkoutblock">		
 			<label for="wpsg_mod_kundenverwaltung_pwd2"><?php echo __("Passwort wiederholen", "wpsg"); ?>
-			<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
+			<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
 			</label>
 			<input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pwd2" name="wpsg[mod_kundenverwaltung][register_pwd2]" value="" />
Index: /views/mods/mod_kundenverwaltung/settings_edit.phtml
===================================================================
--- /views/mods/mod_kundenverwaltung/settings_edit.phtml	(revision 5932)
+++ /views/mods/mod_kundenverwaltung/settings_edit.phtml	(revision 5934)
@@ -12,5 +12,5 @@
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutLogin', __('Login in Checkout integrieren', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutLogin'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutLogin')); ?>
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutRegister', __('Registrierung im Checkout', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegister'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutRegister')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand', __('Registrierungzwang im Checkout', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutRegisterzwand')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang', __('Registrierungzwang im Checkout', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang'), array('help' => 'wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang')); ?>
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_loginZwang', __('E-Mail darf nur einmal registriert werden', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_loginZwang'), array('help' => 'wpsg_mod_kundenverwaltung_loginZwang')); ?>
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_preisAnzeige', __('Bestellung nur fÃŒr eingeloggte Benutzer', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige'), array('help' => 'wpsg_mod_kundenverwaltung_preisAnzeige')); ?>
Index: /views/mods/mod_ordercondition/list.phtml
===================================================================
--- /views/mods/mod_ordercondition/list.phtml	(revision 5932)
+++ /views/mods/mod_ordercondition/list.phtml	(revision 5934)
@@ -14,5 +14,5 @@
 			var oc_id = jQuery(this).attr("id").replace(/wpsg_mod_ordercondition_name_/, '');
 			
-			jQuery(this).wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
+			jQuery(this).wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
 				submitdata: { 
 		    		field: 'name',
@@ -86,5 +86,5 @@
         <script type="text/javascript">/* <![CDATA[ */
 
-            jQuery('#oc_name_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
+            jQuery('#oc_name_<?php echo $oc['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
                 submitdata: {
                     field: 'name',
@@ -106,5 +106,5 @@
         <script type="text/javascript">/* <![CDATA[ */
 
-            jQuery('#oc_typ_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
+            jQuery('#oc_typ_<?php echo $oc['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
                 type: 'string',
                 data: '<?php echo json_encode(array('0' => __('Inaktiv', 'wpsg'), '1' => __('Jede Bestellung', 'wpsg'), '2' => __('Bestimmte Produkte', 'wpsg'))); ?>',
@@ -122,5 +122,5 @@
         <script type="text/javascript">/* <![CDATA[ */
 
-            jQuery('#oc_text_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
+            jQuery('#oc_text_<?php echo $oc['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
                 submitdata: {
                     field: 'text',
@@ -137,5 +137,5 @@
         <script type="text/javascript">/* <![CDATA[ */
 
-            jQuery('#oc_errortext_<?php echo $oc['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
+            jQuery('#oc_errortext_<?php echo $oc['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
                 submitdata: {
                     field: 'errortext',
Index: /views/mods/mod_ordervars/order_view_sidebar.phtml
===================================================================
--- /views/mods/mod_ordervars/order_view_sidebar.phtml	(revision 5932)
+++ /views/mods/mod_ordervars/order_view_sidebar.phtml	(revision 5934)
@@ -19,5 +19,5 @@
 
 				<?php if ($ov['typ'] == '1') { /* Auswahl */ ?>
-				jQuery('#wpsg_ordervar_<?php echo $ov_id; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_ordervars&do=inlinedit&noheader=1', { 
+				jQuery('#wpsg_ordervar_<?php echo $ov_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_ordervars&do=inlinedit&noheader=1', { 
 					submitdata: {
 						order_id: <?php echo $_REQUEST['edit_id']; ?>,
@@ -32,5 +32,5 @@
 				});		
 				<?php } else if ($ov['typ'] == '2') { /* Text */ ?>			                                            
-				jQuery('#wpsg_ordervar_<?php echo $ov_id; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+				jQuery('#wpsg_ordervar_<?php echo $ov_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
 					submitdata: {
 						order_id: <?php echo $_REQUEST['edit_id']; ?>,
@@ -43,5 +43,5 @@
 				});
 				<?php } else if ($ov['typ'] == '3') { /* Checkbox */ ?>
-				jQuery('#wpsg_ordervar_<?php echo $ov_id; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_ordervars&do=inlinedit&noheader=1', { 
+				jQuery('#wpsg_ordervar_<?php echo $ov_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_ordervars&do=inlinedit&noheader=1', { 
 					submitdata: {
 						order_id: <?php echo $_REQUEST['edit_id']; ?>,
Index: /views/mods/mod_ordervars/ov_list.phtml
===================================================================
--- /views/mods/mod_ordervars/ov_list.phtml	(revision 5932)
+++ /views/mods/mod_ordervars/ov_list.phtml	(revision 5934)
@@ -32,5 +32,5 @@
                 <script type="text/javascript">
 
-                    jQuery('#wpsg_ov_name_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+                    jQuery('#wpsg_ov_name_<?php echo $ov['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
                         submitdata: {
                             field: 'name',
@@ -56,5 +56,5 @@
                     } );
 
-                    jQuery('#wpsg_ov_typ_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+                    jQuery('#wpsg_ov_typ_<?php echo $ov['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
                         submitdata: {
                             field: 'typ',
@@ -113,5 +113,5 @@
                 <script type="text/javascript">
 
-                    jQuery('#wpsg_ov_auswahl_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+                    jQuery('#wpsg_ov_auswahl_<?php echo $ov['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
                         submitdata: {
                             field: 'auswahl',
Index: /views/mods/mod_packagetracking/settings_edit_list.phtml
===================================================================
--- /views/mods/mod_packagetracking/settings_edit_list.phtml	(revision 5932)
+++ /views/mods/mod_packagetracking/settings_edit_list.phtml	(revision 5934)
@@ -41,5 +41,5 @@
 				jQuery(document).ready(function() {
 
-					jQuery('#tp_<?php echo $p['id']; ?>_name').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_packagetracking&do=inlinedit&noheader=1', {
+					jQuery('#tp_<?php echo $p['id']; ?>_name').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_packagetracking&do=inlinedit&noheader=1', {
 						submitdata: { 
 				    		field: 'name',
@@ -52,5 +52,5 @@
 					} );
 
-					jQuery('#tp_<?php echo $p['id']; ?>_url').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_packagetracking&do=inlinedit&noheader=1', {
+					jQuery('#tp_<?php echo $p['id']; ?>_url').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_packagetracking&do=inlinedit&noheader=1', {
 						submitdata: { 
 				    		field: 'url',
Index: /views/mods/mod_productvariants/admin_edit.phtml
===================================================================
--- /views/mods/mod_productvariants/admin_edit.phtml	(revision 5932)
+++ /views/mods/mod_productvariants/admin_edit.phtml	(revision 5934)
@@ -51,5 +51,5 @@
 
     					<?php if (!wpsg_isSizedInt($this->view['product_id']) || wpsg_isSizedInt($this->view['variant']['product_id'])) { ?>
-						jQuery('#productvariation_name_<?php echo $vari['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
+						jQuery('#productvariation_name_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
 							submitdata: { 
 					    		field: 'vari_name',
@@ -58,5 +58,5 @@
 						});	
 						
-						jQuery('#productvariation_shortname_<?php echo $vari['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
+						jQuery('#productvariation_shortname_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
 							submitdata: { 
 					    		field: 'vari_shortname',
@@ -83,5 +83,5 @@
 						} );
 						
-						jQuery('#productvariation_anr_<?php echo $vari['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
+						jQuery('#productvariation_anr_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
 							submitdata: { 
 					    		field: 'vari_anr',
@@ -91,5 +91,5 @@
 						});		
 
-						jQuery('#productvariation_price_<?php echo $vari['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
+						jQuery('#productvariation_price_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
 							submitdata: { 
 					    		field: 'vari_price',
@@ -99,5 +99,5 @@
 						});		
 
-						jQuery('#productvariation_stock_<?php echo $vari['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
+						jQuery('#productvariation_stock_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
 							submitdata: { 
 					    		field: 'vari_stock',
Index: /views/mods/mod_productvariants/admin_show.phtml
===================================================================
--- /views/mods/mod_productvariants/admin_show.phtml	(revision 5932)
+++ /views/mods/mod_productvariants/admin_show.phtml	(revision 5934)
@@ -52,5 +52,5 @@
     					<?php if ((wpsg_isSizedInt($this->view['product_id']) && $this->view['product_id'] == $var['product_id']) || (!wpsg_isSizedInt($var['product_id']) && !wpsg_isSizedInt($this->view['product_id']))) { ?>
 
-						jQuery('#productvariants_name_<?php echo $var['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
+						jQuery('#productvariants_name_<?php echo $var['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
 							submitdata: { 
 					    		field: 'name',
@@ -59,5 +59,5 @@
 						});
 
-						jQuery('#productvariants_type_<?php echo $var['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', { 
+						jQuery('#productvariants_type_<?php echo $var['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', { 
 							submitdata: {
 								field: 'type',
Index: /views/mods/mod_productvars/order_view_row.phtml
===================================================================
--- /views/mods/mod_productvars/order_view_row.phtml	(revision 5932)
+++ /views/mods/mod_productvars/order_view_row.phtml	(revision 5934)
@@ -18,5 +18,5 @@
 
 			<?php if ($pv['typ'] == 2) { /* Textfeld */ ?> 		                                            
-			jQuery('#wpsg_productvar_<?php echo $k.'_'.$product_index; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_productvars&do=inlinedit&noheader=1', {
+			jQuery('#wpsg_productvar_<?php echo $k.'_'.$product_index; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_productvars&do=inlinedit&noheader=1', {
 				submitdata: {
 					order_id: <?php echo $_REQUEST['edit_id']; ?>,
@@ -30,5 +30,5 @@
 			});
 			<?php } else if ($pv['typ'] == 1) { /* Auswahl */ ?>			
-			jQuery('#wpsg_productvar_<?php echo $k.'_'.$product_index; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_productvars&do=inlinedit&noheader=1', { 
+			jQuery('#wpsg_productvar_<?php echo $k.'_'.$product_index; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_productvars&do=inlinedit&noheader=1', { 
 				submitdata: {
 					order_id: <?php echo $_REQUEST['edit_id']; ?>,
@@ -44,5 +44,5 @@
 			});					
 			<?php } else if ($pv['typ'] == 3) { /* Checkbox */ ?>
-			jQuery('#wpsg_productvar_<?php echo $k.'_'.$product_index; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_productvars&do=inlinedit&noheader=1', { 
+			jQuery('#wpsg_productvar_<?php echo $k.'_'.$product_index; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_productvars&do=inlinedit&noheader=1', { 
 				submitdata: {
 					order_id: <?php echo $_REQUEST['edit_id']; ?>,
Index: /views/mods/mod_productvars/pv_list.phtml
===================================================================
--- /views/mods/mod_productvars/pv_list.phtml	(revision 5932)
+++ /views/mods/mod_productvars/pv_list.phtml	(revision 5934)
@@ -25,5 +25,5 @@
 				<script type="text/javascript">/* <![CDATA[ */
 	
-					jQuery('#wpsg_pv_auswahl_<?php echo $pv['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&do=inlinedit&noheader=1', {
+					jQuery('#wpsg_pv_auswahl_<?php echo $pv['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&do=inlinedit&noheader=1', {
 						submitdata: {
 							field: 'auswahl',
@@ -47,5 +47,5 @@
 			<script type="text/javascript">/* <![CDATA[ */
 
-				jQuery('#wpsg_pv_name_<?php echo $pv['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&do=inlinedit&noheader=1', {
+				jQuery('#wpsg_pv_name_<?php echo $pv['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&do=inlinedit&noheader=1', {
 					submitdata: {
 						field: 'name',
@@ -71,5 +71,5 @@
 				} );
 
-				jQuery('#wpsg_pv_typ_<?php echo $pv['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&do=inlinedit&noheader=1', { 
+				jQuery('#wpsg_pv_typ_<?php echo $pv['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvars&do=inlinedit&noheader=1', { 
 					submitdata: {
 						field: 'typ',
Index: /views/mods/mod_produktattribute/list.phtml
===================================================================
--- /views/mods/mod_produktattribute/list.phtml	(revision 5932)
+++ /views/mods/mod_produktattribute/list.phtml	(revision 5934)
@@ -84,5 +84,5 @@
 					} );
 				
-					jQuery('#pa_<?php echo $pa['id']; ?>_name').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=module&modul=wpsg_mod_produktattribute&do=inlinedit&noheader=1', {
+					jQuery('#pa_<?php echo $pa['id']; ?>_name').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=module&modul=wpsg_mod_produktattribute&do=inlinedit&noheader=1', {
 						submitdata: { 
 				    		field: 'name',
@@ -107,5 +107,5 @@
 					jQuery(document).ready(function() {
 						
-						jQuery('#pa_<?php echo $pa['id']; ?>_auswahl').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=module&modul=wpsg_mod_produktattribute&do=inlinedit&noheader=1', {
+						jQuery('#pa_<?php echo $pa['id']; ?>_auswahl').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=module&modul=wpsg_mod_produktattribute&do=inlinedit&noheader=1', {
 							submitdata: { 
 					    		field: 'auswahl',
Index: /views/mods/mod_rechnungen/foottext_list.phtml
===================================================================
--- /views/mods/mod_rechnungen/foottext_list.phtml	(revision 5932)
+++ /views/mods/mod_rechnungen/foottext_list.phtml	(revision 5934)
@@ -29,5 +29,5 @@
 				jQuery(document).ready(function() {
  
-					jQuery('#wpsg_foottext_0_<?php echo $key; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=inlinedit&noheader=1', {
+					jQuery('#wpsg_foottext_0_<?php echo $key; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=inlinedit&noheader=1', {
 						submitdata: { 
 				    		field: '0',
@@ -40,5 +40,5 @@
 					});	
 	
-					jQuery('#wpsg_foottext_1_<?php echo $key; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=inlinedit&noheader=1', {
+					jQuery('#wpsg_foottext_1_<?php echo $key; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_rechnungen&do=inlinedit&noheader=1', {
 						submitdata: { 
 				    		field: '1',
Index: /views/mods/mod_rechnungen/rechnung_pdf.phtml
===================================================================
--- /views/mods/mod_rechnungen/rechnung_pdf.phtml	(revision 5932)
+++ /views/mods/mod_rechnungen/rechnung_pdf.phtml	(revision 5934)
@@ -19,5 +19,5 @@
 	$adress_top					= 55;
 	
-	// Positionierund des Rechnungskopfes
+	// Positionierung des Rechnungskopfes
 	$rdata_left					= 25;
 	$rdata_top					= 90;
@@ -48,22 +48,22 @@
 			$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"))
+			{
+				
+				$pagecount = $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');
-			}
-			
-			
-			if (file_exists($shop->callMod('wpsg_mod_rechnungen', getFilePath, array(''))."wpsg_rechnungen_logo.jpg"))
-			{
-	
-				list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', getFilePath, array(''))."wpsg_rechnungen_logo.jpg");
+			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');
+			}
+			
+			
+			if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg"))
+			{
+	
+				list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg");
 				
 				//wpsg_debug($width.":".$height);
@@ -72,5 +72,5 @@
 				$hPix = (25.4 * $height) / 96;  
 				
-				$pdf->image($shop->callMod('wpsg_mod_rechnungen', getFilePath, array(''))."wpsg_rechnungen_logo.jpg", 210 - $wPix, 0, $wPix, $hPix);
+				$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg", 210 - $wPix, 0, $wPix, $hPix);
 				
 			}
@@ -80,5 +80,5 @@
 			$pdf->Text($absender_left, $absender_top, $shop->replaceUniversalPlatzhalter(__($shop->get_option("wpsg_rechnungen_adresszeile"), 'wpsg'), $shop->view['data']['id']));	
 			
-			if ($shop->view['kunde']['kuerzel'] != "") $shop->view['kunde']['kuerzel'] = $shop->view['kunde']['kuerzel'].'-';
+			if (wpsg_getStr($shop->view['kunde']['kuerzel']) != "") $shop->view['kunde']['kuerzel'] = $shop->view['kunde']['kuerzel'].'-';
 			
 			// Adresse des Kunden
@@ -86,5 +86,5 @@
 			$pdf->Text($adress_left, $adress_top, $shop->view['kunde']['firma']);
 			$pdf->Text($adress_left, $adress_top + 5, $shop->view['kunde']['vname'].' '.$shop->view['kunde']['name']);
-			$pdf->Text($adress_left, $adress_top + 10, $shop->view['kunde']['strasse'].' '.$shop->view['kunde']['hausnr']);
+			$pdf->Text($adress_left, $adress_top + 10, $shop->view['kunde']['strasse'].' '.wpsg_getStr($shop->view['kunde']['hausnr']));
 			$pdf->Text($adress_left, $adress_top + 15, $shop->view['kunde']['plz'].' '.$shop->view['kunde']['ort']);
 			$pdf->Text($adress_left, $adress_top + 20, strtoupper($shop->view['oOrder']->getInvoiceCountryName()));			
@@ -286,5 +286,14 @@
 		$pdf->Cell(15, 8, $p['menge'], 0, 0, 'C');
 						
-		$preis = $p['preis'];
+		if (wpsg_ShopController::get_option('wpsg_preisangaben') == WPSG_NETTO)
+		{
+			$preis = $p['preis_netto'];
+			
+			//TODO
+		}
+		else
+		{
+			$preis = $p['preis_brutto'];
+		}
 		
 		$pdf->setXY($prod_left + 127, $prod_top + $offset);
@@ -405,5 +414,5 @@
  
 	// Gutschein
-	if (isset($this->view['basket']['gs']))
+	if ((isset($this->view['basket']['gs'])) && ($this->view['basket']['gs_value'] > 0))
 	{
 		
@@ -640,5 +649,5 @@
 		 	 
 	// GebÃŒhr
-	if (wpsg_tf($this->view['storno_fee']) > 0)
+	if (wpsg_tf(wpsg_getStr($this->view['storno_fee'])) > 0)
 	{
 		
Index: /views/mods/mod_scaleprice/scaleList.phtml
===================================================================
--- /views/mods/mod_scaleprice/scaleList.phtml	(revision 5932)
+++ /views/mods/mod_scaleprice/scaleList.phtml	(revision 5934)
@@ -32,5 +32,5 @@
 	jQuery(document).ready(function() {
 
-		jQuery('#wpsg_mod_scaleprice_<?php echo $scale['id']; ?>_scale').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=inlineEdit', {
+		jQuery('#wpsg_mod_scaleprice_<?php echo $scale['id']; ?>_scale').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=inlineEdit', {
 			submitdata: { 
 				field: 'scale',
@@ -43,5 +43,5 @@
 		});
 
-		jQuery('#wpsg_mod_scaleprice_<?php echo $scale['id']; ?>_value').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=inlineEdit', {
+		jQuery('#wpsg_mod_scaleprice_<?php echo $scale['id']; ?>_value').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=inlineEdit', {
 			submitdata: { 
 				field: 'value',
Index: /views/mods/mod_spconditions/conditionList.phtml
===================================================================
--- /views/mods/mod_spconditions/conditionList.phtml	(revision 5932)
+++ /views/mods/mod_spconditions/conditionList.phtml	(revision 5934)
@@ -11,5 +11,5 @@
 	
 		<?php echo wpsg_drawForm_Input('', __('Id', 'wpsg'), $v['id'], array('text' => true)); ?>
-		<?php echo wpsg_drawForm_Select('shipping_id', __('Versandart', 'wpsg'), $this->view['arShipping'], $v['shipping_id']); ?>
+		<?php echo wpsg_drawForm_Select('shipping_id', __('Versandart', 'wpsg'), wpsg_getArray($this->view['arShipping']), $v['shipping_id']); ?>
 		<hr />
 		
Index: /views/mods/mod_spconditions/settings_edit.phtml
===================================================================
--- /views/mods/mod_spconditions/settings_edit.phtml	(revision 5932)
+++ /views/mods/mod_spconditions/settings_edit.phtml	(revision 5934)
@@ -12,5 +12,5 @@
 			<div class="fulltab">
 				<?php echo __('Versand- und Zahlungsbedingungen', 'wpsg'); ?>
-				<a title="<?php echo __('Neue Versand- und Zahlungsbedingung anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addSPCondition();"></a>
+				<a title="<?php echo __('Neue Versand- und Zahlungsbedingung anlegen', 'wpsg'); ?>" href="" class="wpsg_glyphicon_right glyphicon glyphicon-plus-sign" onclick="return wpsg_addSPCondition();"></a>
 			</div>
 		</div>
Index: /views/mods/mod_userpayment/list.phtml
===================================================================
--- /views/mods/mod_userpayment/list.phtml	(revision 5932)
+++ /views/mods/mod_userpayment/list.phtml	(revision 5934)
@@ -20,5 +20,5 @@
 			<td class="wpsg_value"><?php echo $zv['id']; ?></td>
 			<td class="wpsg_delcol">
-				<a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Zahlvariante lÃ¶schen', 'wpsg'); ?>" onclick="return wpsg_removeZV(<?php echo $zv['id']; ?>);"></a>
+				<a class="wpsg_glyphicon_right glyphicon glyphicon-minus-sign" href="#" title="<?php echo __('Zahlvariante lÃ¶schen', 'wpsg'); ?>" onclick="return wpsg_removeZV(<?php echo $zv['id']; ?>);"></a>
 				
 				<script type="text/javascript">
@@ -26,5 +26,5 @@
 					jQuery(document).ready(function() {
 						
-						jQuery('#zv_<?php echo $zv['id']; ?>_name').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', {
+						jQuery('#zv_<?php echo $zv['id']; ?>_name').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', {
 							submitdata: { 
 					    		field: 'name',
@@ -37,5 +37,5 @@
 						} );
 
-						jQuery('#zv_<?php echo $zv['id']; ?>_hint').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', {
+						jQuery('#zv_<?php echo $zv['id']; ?>_hint').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', {
 							submitdata: { 
 					    		field: 'hint',
@@ -48,5 +48,5 @@
 						} );
 
-						jQuery('#zv_<?php echo $zv['id']; ?>_rabgeb').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', {
+						jQuery('#zv_<?php echo $zv['id']; ?>_rabgeb').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', {
 							submitdata: {
 								field: 'rabgeb',
@@ -59,5 +59,5 @@
 						} );
 
-						jQuery('#zv_<?php echo $zv['id']; ?>_mwst').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', { 
+						jQuery('#zv_<?php echo $zv['id']; ?>_mwst').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_userpayment&do=inlinedit&noheader=1', { 
 							submitdata: {
 								field: 'mwst_key',
@@ -98,5 +98,5 @@
 			<td class="wpsg_value" id="zv_<?php echo $zv['id']; ?>_name"><?php echo wpsg_hspc($zv['name']); ?></td>	
 			<td class="wpsg_delcol">
-				<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name"></a>
+				<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name"></a>
 			</td>				
 		</tr>
@@ -107,5 +107,5 @@
 			</td>
 			<td class="wpsg_delcol">
-				<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ"></a>
+				<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ"></a>
 			</td>
 		</tr>
@@ -114,5 +114,5 @@
 			<td class="wpsg_value" id="zv_<?php echo $zv['id']; ?>_hint"><?php echo wpsg_hspc($zv['hint']); ?></td>
 			<td class="wpsg_delcol">
-				<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint"></a>
+				<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint"></a>
 			</td>
 		</tr>		
@@ -124,5 +124,5 @@
 			</td>
 			<td class="wpsg_delcol">				
-				<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr"></a>
+				<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr"></a>
 			</td>
 		</tr>		
@@ -136,5 +136,5 @@
 			?></td>
 			<td class="wpsg_delcol">
-				<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr"></a>
+				<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_gebuehr"></a>
 			</td>
 		</tr>
@@ -145,5 +145,5 @@
 			</td>
 			<td class="wpsg_delcol">
-				<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland"></a>
+				<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland"></a>
 			</td>
 		</tr>
Index: /views/mods/mod_userpayment/settings_edit.phtml
===================================================================
--- /views/mods/mod_userpayment/settings_edit.phtml	(revision 5932)
+++ /views/mods/mod_userpayment/settings_edit.phtml	(revision 5934)
@@ -70,5 +70,5 @@
 			<div class="fulltab">
 				<?php echo __('Zahlvarianten', 'wpsg'); ?>
-				<a title="<?php echo __('Neue Zahlvariante anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addZV();"></a>
+				<a title="<?php echo __('Neue Zahlvariante anlegen', 'wpsg'); ?>" href="" class="wpsg_glyphicon_right glyphicon glyphicon-plus-sign" onclick="return wpsg_addZV();"></a>
 			</div>
 		</div>
Index: /views/mods/mod_varianten/drawVarianten.phtml
===================================================================
--- /views/mods/mod_varianten/drawVarianten.phtml	(revision 5932)
+++ /views/mods/mod_varianten/drawVarianten.phtml	(revision 5934)
@@ -48,5 +48,5 @@
 			<script type="text/javascript">
 
-				jQuery("#varname_<?php echo $k; ?>").wspg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+				jQuery("#varname_<?php echo $k; ?>").wpsg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
 					submitdata: {  
 			    		typ: "var_name",
@@ -154,5 +154,5 @@
 			<script type="text/javascript">
 
-				jQuery("#variartnr_<?php echo $k; ?>").wspg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+				jQuery("#variartnr_<?php echo $k; ?>").wpsg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
 					submitdata: {  
 			    		typ: "var_artnr",
@@ -169,5 +169,5 @@
 				});
 
-				jQuery("#varpreis_<?php echo $k; ?>").wspg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+				jQuery("#varpreis_<?php echo $k; ?>").wpsg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
 					submitdata: {									
 						typ: "var_preis",
@@ -183,5 +183,5 @@
 				<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
 
-				jQuery("#varweight_<?php echo $k; ?>").wspg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+				jQuery("#varweight_<?php echo $k; ?>").wpsg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
 					submitdata: {									
 						typ: "var_weight",
@@ -199,5 +199,5 @@
 				<?php if ($this->hasMod('wpsg_mod_stock') && $var['typ'] != 'checkbox') { ?>
 
-				jQuery("#varstock_<?php echo $k; ?>").wspg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+				jQuery("#varstock_<?php echo $k; ?>").wpsg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
 					submitdata: {
 						typ: "var_stock",	
@@ -270,5 +270,5 @@
 							<script type="text/javascript">
 							
-								jQuery("#variname_<?php echo $k; ?>_<?php echo $kv; ?>").wspg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+								jQuery("#variname_<?php echo $k; ?>_<?php echo $kv; ?>").wpsg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
 									submitdata: {  
 							    		typ: "vari_name",
@@ -287,5 +287,5 @@
 								
 								<?php if (!wpsg_isSizedString($_REQUEST['wpsg_lang'])) { ?>
-								jQuery("#variartnr_<?php echo $k; ?>_<?php echo $kv; ?>").wspg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+								jQuery("#variartnr_<?php echo $k; ?>_<?php echo $kv; ?>").wpsg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
 									submitdata: {  
 							    		typ: "vari_artnr",
@@ -303,5 +303,5 @@
 								});
 													
-								jQuery("#varipreis_<?php echo $k; ?>_<?php echo $kv; ?>").wspg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+								jQuery("#varipreis_<?php echo $k; ?>_<?php echo $kv; ?>").wpsg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
 									submitdata: {									
 										typ: "vari_preis",
@@ -317,5 +317,5 @@
 	
 								<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
-								jQuery("#varifmenge_<?php echo $k; ?>_<?php echo $kv; ?>").wspg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+								jQuery("#varifmenge_<?php echo $k; ?>_<?php echo $kv; ?>").wpsg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
 									submitdata: {									
 										typ: "vari_fmenge",
@@ -333,5 +333,5 @@
 								<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
 	
-								jQuery("#variweight_<?php echo $k; ?>_<?php echo $kv; ?>").wspg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+								jQuery("#variweight_<?php echo $k; ?>_<?php echo $kv; ?>").wpsg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
 									submitdata: {
 										typ: "vari_weight",
@@ -348,5 +348,5 @@
 								<?php if ($this->hasMod('wpsg_mod_stock')) { ?>
 	
-								jQuery("#varistock_<?php echo $k; ?>_<?php echo $kv; ?>").wspg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
+								jQuery("#varistock_<?php echo $k; ?>_<?php echo $kv; ?>").wpsg_editable("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_varianten&cmd=wpsg_vp_vari_inlineEdit&noheader=1", {
 									submitdata: {
 										typ: "vari_stock",
Index: /views/mods/mod_versandarten/list.phtml
===================================================================
--- /views/mods/mod_versandarten/list.phtml	(revision 5932)
+++ /views/mods/mod_versandarten/list.phtml	(revision 5934)
@@ -20,5 +20,5 @@
 		<td class="wpsg_value"><?php echo $va['id']; ?></td>	
 		<td class="wpsg_delcol">
-			<a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Versandart lÃ¶schen', 'wpsg'); ?>" onclick="return wpsg_removeVA(<?php echo $va['id']; ?>);"></a>
+			<a class="wpsg_glyphicon_right glyphicon glyphicon-minus-sign" href="#" title="<?php echo __('Versandart lÃ¶schen', 'wpsg'); ?>" onclick="return wpsg_removeVA(<?php echo $va['id']; ?>);"></a>
 			<?php foreach ($this->view['arVZ'] as $k=>$vz) { $arVzNamen[$k] = $vz['name']; } ?>
 			<script type="text/javascript">
@@ -26,5 +26,5 @@
 				jQuery(document).ready(function() {
 
-					jQuery('#va_<?php echo $va['id']; ?>_name').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+					jQuery('#va_<?php echo $va['id']; ?>_name').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
 						submitdata: { 
 				    		field: 'name',
@@ -37,5 +37,5 @@
 					});
 
-					jQuery('#va_<?php echo $va['id']; ?>_kosten').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+					jQuery('#va_<?php echo $va['id']; ?>_kosten').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
 						submitdata: { 
 				    		field: 'kosten',
@@ -48,5 +48,5 @@
 					});
 
-					jQuery('#va_<?php echo $va['id']; ?>_hint').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+					jQuery('#va_<?php echo $va['id']; ?>_hint').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
 						submitdata: { 
 				    		field: 'hint',
@@ -59,5 +59,5 @@
 					});
  					
-					jQuery('#va_<?php echo $va['id']; ?>_typ').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', { 
+					jQuery('#va_<?php echo $va['id']; ?>_typ').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', { 
 						submitdata: {
 							field: 'typ',
@@ -72,5 +72,5 @@
 					});		
 
-					jQuery('#va_<?php echo $va['id']; ?>_vz').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+					jQuery('#va_<?php echo $va['id']; ?>_vz').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
 						submitdata: {
 							field: 'vz',
@@ -90,5 +90,5 @@
 					} );		
 
-					jQuery('#va_<?php echo $va['id']; ?>_mwst').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', { 
+					jQuery('#va_<?php echo $va['id']; ?>_mwst').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', { 
 						submitdata: {
 							field: 'mwst_key',
@@ -103,4 +103,17 @@
 					});	
 
+					jQuery('#va2_<?php echo $va['id']; ?>_mwst').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', { 
+						submitdata: {
+							field: 'mwst_key',
+							va_id: '<?php echo $va['id']; ?>'
+						},
+						submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+						data: '{"value":0,"text":"anteilig"},{"value":"a","text":"A"}',
+						type: 'select',
+						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+					});	
+					
 					jQuery('#va_<?php echo $va['id']; ?>_aktiv').bind('change', function() {
 
@@ -130,5 +143,5 @@
 		<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_name"><?php echo wpsg_hspc($va['name']); ?></td>
 		<td class="wpsg_delcol">
-			<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name"></a>
+			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name"></a>
 		</td>
 	</tr>
@@ -139,5 +152,5 @@
 		</td>
 		<td class="wpsg_delcol">
-			<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ"></a>
+			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ"></a>
 		</td> 
 	</tr>
@@ -146,5 +159,5 @@
 		<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_hint" ><?php echo wpsg_hspc($va['hint']); ?></td>
 		<td class="wpsg_delcol">
-			<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint"></a>
+			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint"></a>
 		</td>
 	</tr>
@@ -153,5 +166,5 @@
 		<td id="va_<?php echo $va['id']; ?>_typ" class="wpsg_value wpsg_editable"><?php echo wpsg_hspc($this->view['arTypen'][$va['typ']]); ?></td>
 		<td class="wpsg_delcol">
-			<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_grundlage" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_grundlage"></a>
+			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_grundlage" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_grundlage"></a>
 		</td>
 	</tr>   
@@ -166,5 +179,5 @@
 		</td>
 		<td class="wpsg_delcol">
-			<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_versandzone" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_versandzone"></a>
+			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_versandzone" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_versandzone"></a>
 		</td>
 	</tr>
@@ -173,5 +186,5 @@
 		<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_kosten"><?php echo wpsg_hspc($va['kosten']); ?></td>
 		<td class="wpsg_delcol">
-			<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_kostenschluessel" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_kostenschluessel"></a>
+			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_kostenschluessel" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_kostenschluessel"></a>
 		</td>
 	</tr>
@@ -186,5 +199,5 @@
 				jQuery(document).ready(function() {
 	
-					jQuery('#va_<?php echo $va['id']; ?>_plz_<?php echo $index ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
+					jQuery('#va_<?php echo $va['id']; ?>_plz_<?php echo $index ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
 						submitdata: { 
 				    		field: 'kosten_plz',
@@ -218,5 +231,5 @@
 		?></td>
 		<td class="wpsg_delcol">
-			<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst"></a>
+			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst"></a>
 		</td>
 	</tr> 
@@ -227,7 +240,24 @@
 		</td>
 		<td class="wpsg_delcol">
-			<a class="wpsg_form_help" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland"></a>
-		</td>
-	</tr>
+			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland"></a>
+		</td>
+	</tr>
+
+	<tr>
+		<td class="wpsg_label"><?php echo __('Steuersatz', 'wpsg'); ?>:</td>				
+		<td id="va2_<?php echo $va['id']; ?>_mwst" class="wpsg_value wpsg_editable"><?php 
+		
+			$tax_groups = wpsg_tax_groups();
+			//echo wpsg_hspc($tax_groups[$va['mwst_key']]);
+			echo $tax_groups[$va['mwst_key']];
+			
+		?></td>
+		<td class="wpsg_delcol">
+			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst"></a>
+		</td>
+	</tr> 
+	
+	
+	
 	<?php $this->callMods('wpsg_mod_versandarten_listrow', array(&$va)); ?>
 	<?php if ($i < sizeof($this->view['data'])) { ?>
Index: /views/mods/mod_versandarten/settings_edit.phtml
===================================================================
--- /views/mods/mod_versandarten/settings_edit.phtml	(revision 5932)
+++ /views/mods/mod_versandarten/settings_edit.phtml	(revision 5934)
@@ -90,5 +90,5 @@
 			<div class="fulltab">
 				<?php echo __('Versandarten', 'wpsg'); ?>
-				<a title="<?php echo __('Neue Versandart anlegen', 'wpsg'); ?>" href="" class="wpsg_icon wpsg_icon_right wpsg_icon_add" onclick="return wpsg_addVA();"></a>
+				<a title="<?php echo __('Neue Versandart anlegen', 'wpsg'); ?>" href="" class="wpsg_glyphicon_right glyphicon glyphicon-plus-sign" onclick="return wpsg_addVA();"></a>
 			</div>
 		</div>
Index: /views/order/view.phtml
===================================================================
--- /views/order/view.phtml	(revision 5932)
+++ /views/order/view.phtml	(revision 5934)
@@ -38,9 +38,13 @@
         </div>
 
+        <a href="" id="LinkProduktNeu" onclick="return WPSG_BE_Product.addProduct(<?php echo $_REQUEST['edit_id']; ?>, 0);"><span class="glyphicon glyphicon-plus"></span>&nbsp;
+	 	<?php echo __("Neues Produkt", "wpsg"); ?>
+	 	</a><br />
+
         <br />
         <?php if ($this->hasMod('wpsg_mod_gutschein')) { ?>
         	<?php //if (((array_key_exists('gs', $this->view['basket'])) && ($this->view['basket']['gs']['value'] == 0))) { ?>
 		        <a href="" id="LinkGutscheinNeu" onclick="return wpsg_addVoucher(<?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-plus"></span>&nbsp;
-			 	<?php echo __("Neuer Gutschein.", "wpsg"); ?>
+			 	<?php echo __("Neuer Gutschein", "wpsg"); ?>
 			 	</a><br />
             <?php //} ?>
@@ -50,5 +54,5 @@
         	<?php //if (((array_key_exists('preis_rabatt', $this->view['basket']['sum'])) && ($this->view['basket']['sum']['preis_rabatt'] == 0))) { ?>
 		        <a href="" id="LinkRabattNeu" onclick="return wpsg_addDiscount(<?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-plus"></span>&nbsp;
-			 	<?php echo __("Neuer Rabatt.", "wpsg"); ?>
+			 	<?php echo __("Neuer Rabatt", "wpsg"); ?>
 			 	</a><br />
             <?php //} ?>
@@ -119,4 +123,5 @@
 	} // function wpsg_addVoucher()
 
+	
 
     jQuery(document).ready(function() {
Index: /views/order/view_orderdata.phtml
===================================================================
--- /views/order/view_orderdata.phtml	(revision 5932)
+++ /views/order/view_orderdata.phtml	(revision 5934)
@@ -26,4 +26,6 @@
                     <?php echo wpsg_hspc($this->getProductName($this->getProduktID($p['id']))); ?>
                 </a>
+            	<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Produkt bearbeiten', 'wpsg'); ?>" onclick="return WPSG_BE_Product.editProduct(<?php echo $p['order_product_id']; ?>, <?php echo $p['product_id']; ?>, <?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-pencil"></span></a>
+            	<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Produkt lÃ¶schen', 'wpsg'); ?>" onclick="return WPSG_BE_Product.removeProduct(<?php echo $p['order_product_id']; ?>, <?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
             </td>
             <td class="wpsg_cell_preis"><?php echo wpsg_ff($p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
@@ -100,5 +102,6 @@
                 <?php } else { ?>
                     <?php //if ($this->getFrontendTaxview() == WPSG_NETTO) 
-                    if ($this->view['basket']['price_frontend'] == WPSG_NETTO)
+                    //if ($this->view['basket']['price_frontend'] == WPSG_NETTO)
+                    if ($this->get_option('wpsg_preisangaben') == WPSG_NETTO)
                     { ?>
                     <?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
@@ -116,7 +119,17 @@
             <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_shipping_label">
                 <a href="<?php echo $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN); ?>" target="_blank"><?php echo __('Versandkosten', 'wpsg'); ?></a>
+                <?php 
+                //$order = $this->view['oOrder'];
+                $o_id = $_REQUEST['edit_id'];
+                $oOrder = wpsg_order::getInstance($o_id);
+                $sid = $oOrder->getShippingID();
+                echo __('  ('.$this->arShipping[$sid]['name'].')', 'wpsg');
+                ?>
+                <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Versandart Ã€ndern', 'wpsg'); ?>" 
+                   onclick="return WPSG_BE_Pay_Ship.changeShipping('<?php echo $sid; ?>', <?php echo $o_id; ?>);"><span class="glyphicon glyphicon-pencil"></span></a>
             </td>
             <td class="wpsg_cell_shipping_value wpsg_cell_gesamtpreis">
-                <?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+                <span id="wpsg_cell_shipping_value"><?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping']); ?> </span>
+                <?php echo $this->get_option('wpsg_currency'); ?>
             </td>
         </tr>
@@ -131,8 +144,11 @@
                 echo __('  ('.$this->arPayment[$pid]['name'].')', 'wpsg');
                 ?>
-                <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Zahlungsart Ã€ndern', 'wpsg'); ?>" onclick="return WPSG_BE_Payment.changePayment(<?php echo $pid; ?>, <?php echo $o_id; ?>);"><span class="glyphicon glyphicon-modal-window"></span></a>
-            </td>
-            <td class="wpsg_cell_payment_value wpsg_cell_gesamtpreis">
-                <?php echo wpsg_ff($this->view['basket']['sum']['preis_payment']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+                <!-- <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Zahlungsart lÃ¶schen', 'wpsg'); ?>" onclick="return WPSG_BE_Pay_Ship.deletePayment('"<?php echo $pid; ?>"'", <?php echo $o_id; ?>);"><span class="glyphicon glyphicon-trash"></span></a> -->
+                <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Zahlungsart Ã€ndern', 'wpsg'); ?>" 
+                   onclick="return WPSG_BE_Pay_Ship.changePayment('<?php echo $pid; ?>', <?php echo $o_id; ?>);"><span class="glyphicon glyphicon-pencil"></span></a>
+            </td>
+            <td class="wpsg_cell_payment_value wpsg_cell_gesamtpreis" >
+                <span id="wpsg_cell_payment_value"><?php echo wpsg_ff($this->view['basket']['sum']['preis_payment']); ?> </span>
+                <?php echo $this->get_option('wpsg_currency'); ?>
             </td>
         </tr>
@@ -158,5 +174,5 @@
             </td>
         </tr>
-        <?php if ($this->get_option('wpsg_kleinunternehmer') == '1' || $this->get_option('wpsg_preisangaben') != '1') { ?>
+        <?php if ($this->get_option('wpsg_kleinunternehmer') == '1' || $this->get_option('wpsg_preisangaben') != WPSG_NETTO) { ?>
         <?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
         <tr class="wpsg_row_mwst">
@@ -165,5 +181,7 @@
                     <?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
                 <?php } else { ?>
-                    <?php if ($this->view['basket']['price_frontend'] == WPSG_NETTO) {
+                    <?php 
+                    //if ($this->view['basket']['price_frontend'] == WPSG_NETTO) {
+                    if ($this->get_option('wpsg_preisangaben') == WPSG_NETTO) {
                     	echo wpsg_translate(__('zuzÃŒglich MwSt. (#1#)', 'wpsg'), $mwst['name']);
                     } else {
@@ -186,5 +204,5 @@
 	<?php if ((array_key_exists('gs', $this->view['basket'])) && ($this->view['basket']['gs']['value'] > 0)) { ?>
 
-	jQuery('#gsname_<?php echo $gs_id; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=voucherData&do=editname&noheader=1', {
+	jQuery('#gsname_<?php echo $gs_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=voucherData&do=editname&noheader=1', {
 		submitdata: { 
     		field: 'code',
@@ -201,5 +219,5 @@
 	});
 
-	jQuery('#gsvalue_<?php echo $gs_id; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=voucherData&do=editvalue&noheader=1', {
+	jQuery('#gsvalue_<?php echo $gs_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=voucherData&do=editvalue&noheader=1', {
 		submitdata: { 
     		field: 'value',
@@ -225,5 +243,5 @@
 	<?php if (isset($this->view['basket']['sum']['preis_rabatt']) && $this->view['basket']['sum']['preis_rabatt'] > 0) { ?>
 
-	jQuery('#discountvalue_<?php echo $o_id; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=discountData&do=editvalue&noheader=1', {
+	jQuery('#discountvalue_<?php echo $o_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=discountData&do=editvalue&noheader=1', {
 		submitdata: { 
     		field: 'value',
@@ -308,128 +326,595 @@
 
     
-    var WPSG_BE_Payment = {
-
-    	paymentinfos: 0,
-    	pidold: 0,
-    	oid: 0,
-
-		changePayment: function (id, oid) {
-
-			//alert('TEST OK neu');
-
-			//jQuery('#wpsg_payment_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+    var WPSG_BE_Pay_Ship = {
+
+        	paymentinfos: 0,
+        	shippinginfos: 0,
+        	pidold: 0,
+        	sidold: 0,
+        	preisold: 0.0,
+        	oid: 0,
+
+    		changePayment: function (id, oid) {
+				var
+					i,
+					n;
+    			//jQuery('#wpsg_payment_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+    			
+    			jQuery('#wpsg_payment_dialog').modal( { } );
+    		
+    			this.paymentinfos = <?php  echo json_encode($this->arPayment, JSON_FORCE_OBJECT); ?>;
+    			this.oid = oid;
+    			this.pidold = id;
+    			
+    	 		jQuery('#zahlungsartid').empty();
+    			jQuery.each(this.paymentinfos, function(i,n) {
+    	    		console.log('element: ', n.name);
+    	    		if (id == n.id) { 
+    	    			jQuery('#zahlungsartid').append("<option value=" + n.id + ' "selected"="selected">' + n.name + "</option>");
+    	    		} else {
+    	    			jQuery('#zahlungsartid').append("<option value=" + n.id + ">" + n.name + "</option>");
+    	    		}
+    	    	});
+    			jQuery('#zahlungsartid').val(id);
+    			
+    			//this.preis = this.paymentinfos[id].preis;
+    			//this.preis = jQuery('#wpsg_cell_payment_value').val();
+    			this.preis = jQuery('#wpsg_cell_payment_value').html();
+    			this.preisold = this.preis;
+    			if (this.preis == false) { this.preis = '0,00'; } 
+    			jQuery('#zahlungsartvalue').val(this.preis);
+    	    	
+    			return false;
+
+    		}, // function changePayment(id, oid)
+
+    		/**
+    		 * LÃ¶schen der Zahlungsdaten im Backend
+    		 */	                          
+    		deletePayment: function(id, oid) {
+    			var
+    				pid,
+    				url1;
+
+    			pid = jQuery('#zahlungsartid').val();
+    			pval = jQuery('#zahlungsartvalue').val();
+    			//alert('delete : ' + pid + ' / ' + pval);
+    			
+    			url1 = 'wp-admin/admin.php?page=wpsg-Admin&subaction=paymentData&do=delete&edit_id=' + this.oid + '&p_id=' + pid + '&noheader=1';
+    			jQuery.ajax( {
+    				url: '<?php echo WPSG_URL_WP; ?>' + url1,
+    				success: function(data) {
+    					//jQuery('#wpsg_payment_dialog').modal('hide');
+    					//jQuery('#wpsg_payment_dialog').hide();
+    					//jQuery('#wpsg_payment_dialog').modal( { } ).modal('hide');
+    					jQuery('#wpsg_produkte_table').replaceWith(data);
+    			    }
+    			} );
+    		
+    			return false;
+    		
+    		}, // function deletePayment()
+
+    		/**
+    		 * Ãndern der Zahlungsdaten im Backend
+    		 */	                          
+    		dialogPaymentOK: function() {
+    			var
+    				pid,
+    				pval,
+    				url1;
+
+    			pid = jQuery('#zahlungsartid').val();
+    			pval = jQuery('#zahlungsartvalue').val();
+    			//alert('OK neu: ' + this.pidold + ' / ' + pid + ' / ' + pval);
+    			if ((this.pidold == pid) && (this.preisold == pval)) { 
+    				jQuery('#wpsg_payment_dialog').modal('hide');
+					//jQuery('#wpsg_payment_dialog').modal('close');
+    				return false;
+    			}
+    			//alert('OK neu: ' + pid + ' / ' + pval);
+    			
+    			url1 = 'wp-admin/admin.php?page=wpsg-Admin&subaction=paymentData&do=change&edit_id=' + this.oid + '&p_id=' + pid + '&p_value=' + pval + '&noheader=1';
+    			jQuery.ajax( {
+    				url: '<?php echo WPSG_URL_WP; ?>' + url1,
+    				data: {
+    					price_frontend: '<?php echo $this->view['basket']['price_frontend']; ?>',
+    					mwst: '<?php reset($this->view['basket']['mwst']); echo key($this->view['basket']['mwst']); ?>',
+    					noMwSt: '<?php echo $this->view['basket']['noMwSt']; ?>' },
+    				success: function(data) {
+    					//jQuery('#wpsg_payment_dialog').modal('hide');
+    					//jQuery('#wpsg_payment_dialog').hide();
+    					//jQuery('#wpsg_payment_dialog').modal( { } ).modal('hide');
+    					jQuery('#wpsg_produkte_table').replaceWith(data);
+    			    }
+    			} );
+    		
+    			return false;
+    		
+    		}, // function dialogPaymentOK()
+
+    		/**
+    		 * Ãndern der Zahlungsdaten im Backend
+    		 */	                          
+    		dialogPaymentChange: function() {
+    			var
+    				pid,
+    				pval;
+    			pid = jQuery('#zahlungsartid').val();
+    			pval = this.paymentinfos[pid].preis;
+    			jQuery('#zahlungsartvalue').val(pval);
+
+
+    		},	// dialogPaymentChange()
+
+
+    		changeShipping: function (id, oid) {
+				var
+					i,
+					n;
+    			//jQuery('#wpsg_shipping_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+    			
+    			jQuery('#wpsg_shipping_dialog').modal( { } );
+    		
+    			this.shippinginfos = <?php  echo json_encode($this->arShipping, JSON_FORCE_OBJECT); ?>;
+    			this.oid = oid;
+    			this.sidold = id;
+    			
+    	 		jQuery('#versandartid').empty();
+    			jQuery.each(this.shippinginfos, function(i,n) {
+    	    		console.log('element: ', n.name);
+    	    		if (id == n.id) { 
+    	    			jQuery('#versandartid').append("<option value=" + n.id + ' "selected"="selected">' + n.name + "</option>");
+    	    		} else {
+    	    			jQuery('#versandartid').append("<option value=" + n.id + ">" + n.name + "</option>");
+    	    		}
+    	    	});
+    			jQuery('#versandartid').val(id);
+    			
+    			this.preis = jQuery('#wpsg_cell_shipping_value').html();
+    			this.preisold = this.preis;
+    			if (this.preis == false) { this.preis = '0,00'; } 
+    			jQuery('#versandartvalue').val(this.preis);
+    	    	
+    			return false;
+
+    		}, // function changeShipping(id, oid)
+
+    		/**
+    		 * LÃ¶schen der Versanddaten im Backend
+    		 */	                          
+    		deleteShipping: function(id, oid) {
+    			var
+    				sid,
+    				url1;
+
+    			sid = jQuery('#versandartid').val();
+    			sval = jQuery('#versandartvalue').val();
+    			//alert('delete : ' + sid + ' / ' + sval);
+    			
+    			url1 = 'wp-admin/admin.php?page=wpsg-Admin&subaction=shippingData&do=delete&edit_id=' + this.oid + '&s_id=' + sid + '&noheader=1';
+    			jQuery.ajax( {
+    				url: '<?php echo WPSG_URL_WP; ?>' + url1,
+    				success: function(data) {
+    					//jQuery('#wpsg_payment_dialog').modal('hide');
+    					//jQuery('#wpsg_payment_dialog').hide();
+    					//jQuery('#wpsg_payment_dialog').modal( { } ).modal('hide');
+    					jQuery('#wpsg_produkte_table').replaceWith(data);
+    			    }
+    			} );
+    		
+    			return false;
+    		
+    		}, // function deleteShipping()
+
+    		/**
+    		 * Ãndern der Versanddaten im Backend
+    		 */	                          
+    		dialogShippingOK: function() {
+    			var
+    				sid,
+    				sval,
+    				url1;
+
+    			sid = jQuery('#versandartid').val();
+    			sval = jQuery('#versandartvalue').val();
+    			//alert('OK neu: ' + this.sidold + ' / ' + sid + ' / ' + sval);
+    			if ((this.sidold == sid) && (this.preisold == sval)) { 
+    				jQuery('#wpsg_shipping_dialog').modal('hide');
+					//jQuery('#wpsg_shipping_dialog').modal('close');
+    				return false;
+    			}
+    			//alert('OK neu: ' + sid + ' / ' + sval);
+    			
+    			url1 = 'wp-admin/admin.php?page=wpsg-Admin&subaction=shippingData&do=change&edit_id=' + this.oid + '&s_id=' + sid + '&s_value=' + sval + '&noheader=1';
+    			jQuery.ajax( {
+    				url: '<?php echo WPSG_URL_WP; ?>' + url1,
+    				data: {
+    					price_frontend: '<?php echo $this->view['basket']['price_frontend']; ?>',
+    					mwst: '<?php reset($this->view['basket']['mwst']); echo key($this->view['basket']['mwst']); ?>',
+    					noMwSt: '<?php echo $this->view['basket']['noMwSt']; ?>' },
+    				success: function(data) {
+    					//jQuery('#wpsg_payment_dialog').modal('hide');
+    					//jQuery('#wpsg_payment_dialog').hide();
+    					//jQuery('#wpsg_payment_dialog').modal( { } ).modal('hide');
+    					jQuery('#wpsg_produkte_table').replaceWith(data);
+    			    }
+    			} );
+    		
+    			return false;
+    		
+    		}, // function dialogShippingOK()
+
+    		/**
+    		 * Ãndern der Versanddaten im Backend
+    		 */	                          
+    		dialogShippingChange: function() {
+    			var
+    				sid,
+    				sval;
+    			sid = jQuery('#versandartid').val();
+    			sval = this.shippinginfos[pid].preis;
+    			jQuery('#versandartvalue').val(sval);
+
+
+    		},	// dialogShippingChange()
+    		
+		changePayment2: function (id, oid) {
+
+			alert('TEST OK neu2');
+
+		} // function changePayment2(id, oid)
+		
+    };	// WPSG_BE_Pay_Ship
+    //WPSG_BE_Pay_Ship.changePayment2(1, 2);
+    
+
+    var WPSG_BE_Product = {
+
+        	pidold: 0,
+        	preisold: 0.0,
+        	o_id: 0,
+        	p_id: 0,
+        	op_id: 0,
+        	modus: 0,
+
+			productinfos : <?php  echo json_encode($this->view['basket']['produkte'], JSON_FORCE_OBJECT); ?>,
+			mwstinfos : <?php  echo json_encode(wpsg_tax_groups(true), JSON_FORCE_OBJECT); ?>,
+			allproductinfos : <?php echo json_encode($this->db->fetchAssoc("SELECT * FROM `".wpsg_q(WPSG_TBL_PRODUCTS)."` WHERE `deleted` != '1'"), JSON_FORCE_OBJECT); ?>,
+			mwst1 : <?php  echo json_encode($this->view['basket']['mwst'], JSON_FORCE_OBJECT); ?>,
+        	noMwSt: '<?php echo $this->view['basket']['noMwSt']; ?>',
+        	mwst2: '<?php reset($this->view['basket']['mwst']); echo key($this->view['basket']['mwst']); ?>',
+
+    	/**
+    	 * Wird aufgerufen wenn ein Produkt gelÃ¶scht werden soll
+    	 */
+    	removeProduct: function (op_id, o_id)
+    	{
+    	
+    		if (!confirm('<?php echo __("Sind Sie sich sicher, dass Sie dieses Produkt lÃ¶schen mÃ¶chten?", "wpsg"); ?>')) return false;
+    	
+    		jQuery('#wpsg_produkte_table').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+    			
+    		jQuery.ajax( {
+    			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=productData&do=remove&edit_id=' + o_id + '&op_id=' + op_id + '&noheader=1',
+    			success: function (data) {
+    				jQuery('#wpsg_produkte_table').replaceWith(data);
+    			}
+    		} );
+    		
+    		return false;
+    	},	// function removeProduct
+
+    	/**
+    	 * Wird aufgerufen wenn ein Produkt hinzugefÃŒgt werden soll
+    	 */
+    	addProduct: function (o_id, p_id) {
+    		//jQuery('#wpsg_produkte_table').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+    		this.op_id = 0;
+			this.p_id = p_id;
+			this.o_id = o_id;
+    		
+    		//alert('TEST');
+    		jQuery('#wpsg_product_dialog').modal( { } );
+    		
+    		this.modus = 1;		// neues Produkt
+    		jQuery('#wpsg_product_data').hide();
+    		
+    		jQuery('#productid').empty();
+			jQuery.each(this.allproductinfos, function (i,n) {
+				jQuery('#productid').append("<option value=" + n.id + ">" + n.name + "</option>");
+			});
+			jQuery('#productid').val(p_id);
+    		
+    	
+    		return false;
+    	},	// function addProduct
+
+    	/**
+		 * Ãndern der Produktdaten im Backend
+		 */	                          
+		dialogProductOK: function () {
+			var
+				pid,
+				pval,
+				pme,
+				pmwst,
+				url1;
+
+			pid = jQuery('#productid').val();
+			pval = jQuery('#productvalue').val();
+			pme = jQuery('#productmenge').val();
+			pmwst = jQuery('#productmwst').val();
+			//alert('OK neu: ' + this.pidold + ' / ' + pid + ' / ' + pval);
+			//if ((this.pidold == pid) && (this.preisold == pval)) { 
+			if ((pid == null)) { 
+				jQuery('#wpsg_product_dialog').modal('hide');
+				return false;
+			}
+			//alert('OK neu: ' + pid + ' / ' + pval);
 			
-			jQuery('#wpsg_payment_dialog').modal( { } )
+			if (this.modus == 0) {
+				url1 = 'wp-admin/admin.php?page=wpsg-Admin&subaction=productData&do=change&edit_id=' + this.o_id + '&op_id=' + this.op_id + '&p_id=' + pid + '&noheader=1';
+				jQuery.ajax( {
+					url: '<?php echo WPSG_URL_WP; ?>' + url1,
+					data: {
+						p_val: pval,
+						p_me: pme,
+						pidold: this.pidold,
+						mwst: this.mwst1,
+						noMwSt: this.noMwSt,
+						p_mwst: pmwst},
+					success: function(data) {
+						//jQuery('#wpsg_payment_dialog').modal('hide');
+						//jQuery('#wpsg_payment_dialog').hide();
+						//jQuery('#wpsg_payment_dialog').modal( { } ).modal('hide');
+						jQuery('#wpsg_produkte_table').replaceWith(data);
+				    }
+				} );
+			} else {
+				// Neues Produkt hinzufÃŒgen
+	    		jQuery.ajax( {
+	    			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=productData&do=add&edit_id=' + this.o_id + '&p_id=' + pid + '&noheader=1',
+					data: {
+						p_val: pval,
+						p_me: pme,
+						pidold: this.pidold,
+						mwst: this.mwst1,
+						noMwSt: this.noMwSt,
+						p_mwst: pmwst},
+	    			success: function(data) {
+	    				jQuery('#wpsg_produkte_table').replaceWith(data);
+	    				//jQuery('#LinkRabattNeu').hide();
+	    			}
+	    		} );
+			}
+			return false;
 		
-			/*
-			jQuery.ajax({
-				url: 'admin.php?page=wpsg-Admin&subaction=kundendaten&noheader=1&show=code',
-				data: { 'kv_id': index },
-				success: function(data) { jQuery('#wpsg_payment_dialog .modal-body').html(data); }
-	    	});
-			*/
+		}, // function dialogProduktOK()
+		
+		/**
+		 * Bearbeiten der Produkt-Daten
+		 */	                                            	
+		editProduct: function (op_id, p_id, o_id)
+		{
+			var
+				i,
+				id,
+				menge,
+				key,
+				mid,
+				n;
+
+			this.modus = 0;		// bearbeiten
+			this.op_id = op_id;
+			this.p_id = p_id;
+			this.o_id = o_id;
+			//jQuery('#wpsg_produkte_table').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+	
+			jQuery('#wpsg_product_dialog').modal( { } );
+    		jQuery('#wpsg_product_data').show();
+		
+			this.pidold = p_id;
+
+			jQuery('#productid').empty();
+			jQuery.each(this.allproductinfos, function (i,n) {
+				console.log('element: ', n.name);
+				if (p_id == n.id) { 
+					jQuery('#productid').append("<option value=" + n.id + ' "selected"="selected">' + n.name + "</option>");
+					mid = n.mwst_key;
+				} else {
+					jQuery('#productid').append("<option value=" + n.id + ">" + n.name + "</option>");
+				}
+			});
+			jQuery('#productid').val(p_id);
+
+			jQuery('#productmwst').empty();
+			for (key in this.mwstinfos) {
+				if (p_id == key) { 
+					jQuery('#productmwst').append("<option value=" + key + ' "selected"="selected">' + this.mwstinfos[key] + "</option>");
+				} else {
+					jQuery('#productmwst').append("<option value=" + key + ">" + this.mwstinfos[key] + "</option>");
+				}
+			}
+			jQuery('#productmwst').val(mid);
+
+			id = this.findIndex(op_id);
+			this.preis = this.productinfos[id].preis;
+
+			this.preisold = this.preis;
+			if (this.preis == false) { this.preis = '0,00'; } 
+			jQuery('#productvalue').val(this.preis);
+			menge = this.productinfos[id].menge;
+			jQuery('#productmenge').val(menge);
 			
-			this.paymentinfos = <?php  echo json_encode($this->arPayment, JSON_FORCE_OBJECT); ?>;
-			this.oid = oid;
-			this.pidold = id;
-			
-	 		jQuery('#zahlungsartid').empty();
-			jQuery.each(this.paymentinfos, function(i,n) {
-	    		console.log('element: ', n.name);
-	    		if (id == n.id) { 
-	    			jQuery('#zahlungsartid').append('<option value=' + n.id + ' "selected"="selected">' + n.name + '</option>');
-	    		} else {
-	    			jQuery('#zahlungsartid').append('<option value=' + n.id + '>' + n.name + '</option>');
-	    		}
-	    	});
+			return false;
 	
-			preis = this.paymentinfos[id].preis;
-			if (preis == false) { preis = '0,00'; } 
-			jQuery('#zahlungsartvalue').val(preis);
-	    	
-			return false;
-
-		}, // function changePayment(id, oid)
+		}, // function editProduct()
 
 		/**
-		 * Ãndern der Zahlungsdaten im Backend
+		 * Ãndern des Produktes im Backend
 		 */	                          
-		dialog_OK: function() {
+		dialogProductChange: function() {
+			var
+				pid,
+				id,
+				aid,
+				pval;
+			pid = jQuery('#productid').val();
+			aid = this.findAllIndex(pid);
+			if (aid !== false) {
+				pval = this.allproductinfos[aid].name;
+				id = this.findIndex(this.op_id);
+				pval = this.allproductinfos[aid].preis;
+				jQuery('#productvalue').val(pval);
+				jQuery('#productmenge').val(1);
+				pval = this.allproductinfos[aid].mwst_key;
+				jQuery('#productmwst').val(pval);
+			}
+
+		},	// dialogProductChange()
+
+		/**
+		 * Suchen des Indexes in allproductinfos an Hand der id
+		 */	                          
+		findAllIndex: function(id) {
 			var
 				pid,
 				pval;
-
-			pid = jQuery('#zahlungsartid').val();
-			pval = jQuery('#zahlungsartvalue').val();
-			alert('OK neu: ' + this.pidold + ' / ' + pid + ' / ' + pval);
-			//TODO vergleichen oder nicht
-			if (this.pidold == pid) { 
-				jQuery('#wpsg_payment_dialog').modal('hide');
-				return false;
+			for (key in this.allproductinfos) {
+				if (id == this.allproductinfos[key].id) {
+					return key; 
+				}
 			}
-			alert('OK neu: ' + pid + ' / ' + pval);
-			//TODO price_frontend
-			//TODO Frontend-Rabatt/Frontend-Gutschein bei Firmenkunde in Netto oder Brutto in der Datenbank?
-
-			//TODO
-    		//field: 'value',
-    		//gs_id: '<?php echo $gs_id; ?>',
-    		//edit_id: '<?php echo $o_id; ?>',
-        	//noMwSt: '<?php echo $this->view['basket']['noMwSt']; ?>',
-        	//mwst: '<?php reset($this->view['basket']['mwst']); echo key($this->view['basket']['mwst']); ?>',
-        	//price_frontend: '<?php echo $this->view['basket']['price_frontend']; ?>'
-			//data: { name: "John", location: "Boston" }
-			
-			data1: {
-				//price_frontend: '<?php echo $this->view['basket']['price_frontend']; ?>',
-				//noMwSt: '<?php echo $this->view['basket']['noMwSt']; ?>'
-			}
-					
-			url1 = 'wp-admin/admin.php?page=wpsg-Admin&subaction=paymentData&do=change&edit_id=' + this.oid + '&p_id=' + pid + '&p_value=' + pval + '&noheader=1';
-			jQuery.ajax( {
-				url: '<?php echo WPSG_URL_WP; ?>' + url1,
-				dataType: 'json',
-				data: {
-					price_frontend: '<?php echo $this->view['basket']['price_frontend']; ?>',
-					noMwSt: '<?php echo $this->view['basket']['noMwSt']; ?>' },
-				method: 'POST',
-				success: function(data) {
-					jQuery('#wpsg_produkte_table').replaceWith(data);
-				}
-			} );
+			return false;
+
+		},	// findAllIndex()
 		
-			return false;
-		
-		}, // function dialog_OK()
-
 		/**
-		 * Ãndern der Zahlungsdaten im Backend
+		 * Suchen des Indexes in productinfos an Hand der order_product_id
 		 */	                          
-		dialog_change: function() {
+		findIndex: function(id) {
 			var
 				pid,
 				pval;
-			pid = jQuery('#zahlungsartid').val();
-			pval = this.paymentinfos[pid].preis;
-			jQuery('#zahlungsartvalue').val(pval);
-
-
-		},	// dialog_change()
-
-
-		changePayment2: function (id, oid) {
+			for (key in this.productinfos) {
+				if (id == this.productinfos[key].order_product_id) {
+					return key; 
+				}
+			}
+			return false;
+
+		},	// findIndex()
+
+		changeProduct2: function (id, oid) {
 
 			alert('TEST OK neu2');
 
-		} // function wpsg_changePayment2(id, oid)
+		} // function changeProduct2(id, oid)
 		
-    };	// WPSG_BE_Payment
-    //WPSG_BE_Payment.changePayment2(1, 2);
-    
+    };	// WPSG_BE_Product
+    //WPSG_BE_Product.changeProduct2(1, 2);
     
 	/* ]]> */</script>		
-
     
 </div>
+
+
+<!-- Modaldialog fÃŒr Produkte -->
+<div class="modal fade" id="wpsg_product_dialog" tabindex="-1" role="dialog">
+  <div class="modal-dialog" role="document">
+    <div class="modal-content">
+      <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+        <h4 class="modal-title" id="myModalLabel"><?php echo __('Produkt', 'wpsg'); ?></h4>
+      </div>
+      <div class="modal-body">
+      	<br />
+        <div class="row">
+          <div class="col-md-3 col-sm-6 control_label"><label for="productid" ><?php echo _("Produkt"); ?></label></div>
+          <div class="col-md-3">
+			<select name="productid" id="productid" onchange="return WPSG_BE_Product.dialogProductChange();" class="form-control input-sm" size="1" class="select">
+				<option value=0>"[unbekannt]"</option>
+			</select>
+		  </div>
+        </div>
+        <div class="clearfix wpsg_clear"></div>
+        <div class="clearfix wpsg_clear"></div>
+
+		<div id="wpsg_product_data">
+        <div class="row">
+          <div class="col-md-3 col-sm-6 control_label"><label for="productvalue"><?php echo _("Preis"); ?></label></div>
+          <div class="col-md-3">
+			<input type="text" name="productvalue" id="productvalue" class="form-control input-sm" size="1" class="select">
+		  </div>
+        </div>
+        <div class="clearfix wpsg_clear"></div>
+        <div class="row">
+          <div class="col-md-3 col-sm-6 control_label"><label for="productmenge"><?php echo _("Menge"); ?></label></div>
+          <div class="col-md-3">
+			<input type="text" name="productmenge" id="productmenge" class="form-control input-sm" size="1" class="select">
+		  </div>
+        </div>
+        <div class="clearfix wpsg_clear"></div>
+        <div class="row">
+          <div class="col-md-3 col-sm-6 control_label"><label for="productid" ><?php echo _("MwSt:"); ?></label></div>
+          <div class="col-md-3">
+			<select name="productmwst" id="productmwst" class="form-control input-sm" size="1" class="select">
+				<option value=0>"[unbekannt]"</option>
+			</select>
+		  </div>
+        </div>
+        <div class="clearfix wpsg_clear"></div>
+        
+        </div>
+        
+      </div>
+      <div class="modal-footer">
+        <button type="button" class="btn btn-default" data-dismiss="modal">Abbrechen</button>
+        <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="return WPSG_BE_Product.dialogProductOK();">OK</button>
+      </div>
+    </div>
+  </div>
+</div>
+
+
+<!-- Modaldialog fÃŒr Versandart -->
+<div class="modal fade" id="wpsg_shipping_dialog" tabindex="-1" role="dialog">
+  <div class="modal-dialog" role="document">
+    <div class="modal-content">
+      <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+        <h4 class="modal-title" id="myModalLabel"><?php echo __('Versandart', 'wpsg'); ?></h4>
+      </div>
+      <div class="modal-body">
+      	<br />
+        <div class="row">
+          <div class="col-md-3 col-sm-6 control_label"><label for="versandartid" ><?php echo _("Versandart"); ?></label></div>
+          <div class="col-md-3">
+			<select name="versandartid" id="versandartid" onchange="return WPSG_BE_Pay_Ship.dialogShippingChange();" class="form-control input-sm" size="1" class="select">
+				<option value=0>"[unbekannt]"</option>
+			</select>
+		  </div>
+        </div>
+        <div class="clearfix wpsg_clear"></div>
+        <div class="clearfix wpsg_clear"></div>
+        <br />
+        <div class="row">
+          <div class="col-md-3 col-sm-6 control_label"><label for="versandartvalue"><?php echo _("GebÃŒhr/Kosten"); ?></label></div>
+          <div class="col-md-3">
+			<input type="text" name="versandartvalue" id="versandartvalue" class="form-control input-sm" size="1" class="select">
+		  </div>
+        </div>
+        <div class="clearfix wpsg_clear"></div>
+        
+      </div>
+      <div class="modal-footer">
+        <button type="button" class="btn btn-default" data-dismiss="modal">Abbrechen</button>
+        <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="return WPSG_BE_Pay_Ship.dialogShippingOK();">OK</button>
+      </div>
+    </div>
+  </div>
+</div>
+
 
 <!-- Modaldialog fÃŒr Zahlungsart -->
@@ -446,5 +931,5 @@
           <div class="col-md-3 col-sm-6 control_label"><label for="zahlungsartid" ><?php echo _("Zahlungsart"); ?></label></div>
           <div class="col-md-3">
-			<select name="zahlungsartid" id="zahlungsartid" onchange="return WPSG_BE_Payment.dialog_change();" class="form-control input-sm" size="1" class="select">
+			<select name="zahlungsartid" id="zahlungsartid" onchange="return WPSG_BE_Pay_Ship.dialogPaymentChange();" class="form-control input-sm" size="1" class="select">
 				<option value=0>"[unbekannt]"</option>
 			</select>
@@ -465,5 +950,5 @@
       <div class="modal-footer">
         <button type="button" class="btn btn-default" data-dismiss="modal">Abbrechen</button>
-        <button type="button" class="btn btn-primary" onclick="return WPSG_BE_Payment.dialog_OK();">OK</button>
+        <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="return WPSG_BE_Pay_Ship.dialogPaymentOK();">OK</button>
       </div>
     </div>
