Index: /controller/wpsg_OrderController.class.php
===================================================================
--- /controller/wpsg_OrderController.class.php	(revision 6845)
+++ /controller/wpsg_OrderController.class.php	(revision 6846)
@@ -15,4 +15,8 @@
 			parent::dispatch();
 			
+			if (wpsg_isSizedString($_REQUEST['subaction'], 'orderData'))
+			{
+				$this->orderDataAction();
+			}
 			if (wpsg_isSizedString($_REQUEST['subaction'], 'productData'))
 			{
@@ -229,6 +233,13 @@
 			$oOrder = wpsg_order::getInstance($oid);
 			$country_id = $oOrder->getCustomer()->getCountryId();
+			// Land aus der Bestellungsadresse nehmen, weil Kundenadresse nur optional geÃ€ndert wird.
+			$country_id = $oOrder->adress_data['land'];
 			//$country_id = 1;
 			$country = wpsg_country::getInstance($country_id);
+			
+			$mwst = 1;
+			$oCustomer = $oOrder->getCustomer();
+			if ($country->mwst == 1) $mwst = 0;		// keine MwSt
+			if (($country->mwst == 2) && (wpsg_isSizedString($oCustomer->ustidnr))) $mwst = 0;		// keine MwSt
 			
 			// Tabelle Order die Preise korrigieren
@@ -239,4 +250,6 @@
 			$data['price_gesamt_netto'] = 0;
 			$data['price_gesamt_brutto'] = 0;
+			//$option = $this->shop->get_option('wpsg_preisangaben');
+			$option = $oOrder->price_frontend;
 			
 			foreach ($arOrderProd as $p)
@@ -258,4 +271,5 @@
 				{
 					$price = $p['menge'] * $p['price_brutto'];
+					if ($mwst == 0) $price = $p['menge'] * $p['price_netto']; // keine MwSt -> von Netto ausgehen
 					$data['price_gesamt'] += $price;
 					$data['price_gesamt_netto'] += $price / ((100.0 + $tax_value) / 100.0);
@@ -266,17 +280,17 @@
 			
 			// Zusatzkosten (Gutschein, Rabatt, Versand, Zahlung) zusammenfassen
-			$p = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_ORDER."` WHERE `id` = '".wpsg_q($oid)."'");
-			$zusatz = $p['price_gs'] * -1;
-			$zusatz_netto = $p['price_gs_netto'] * -1;
-			$zusatz_brutto = $p['price_gs_brutto'] * -1;
-			$zusatz -= $p['price_rabatt'];
-			$zusatz_netto -= $p['price_rabatt_netto'];
-			$zusatz_brutto -= $p['price_rabatt_brutto'];
-			$zusatz += $p['price_shipping'];
-			$zusatz_netto += $p['price_shipping_netto'];
-			$zusatz_brutto += $p['price_shipping_brutto'];
-			$zusatz += $p['price_payment'];
-			$zusatz_netto += $p['price_payment_netto'];
-			$zusatz_brutto += $p['price_payment_brutto'];
+			$o = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_ORDER."` WHERE `id` = '".wpsg_q($oid)."'");
+			$zusatz = $o['price_gs'] * -1;
+			$zusatz_netto = $o['price_gs_netto'] * -1;
+			$zusatz_brutto = $o['price_gs_brutto'] * -1;
+			$zusatz -= $o['price_rabatt'];
+			$zusatz_netto -= $o['price_rabatt_netto'];
+			$zusatz_brutto -= $o['price_rabatt_brutto'];
+			$zusatz += $o['price_shipping'];
+			$zusatz_netto += $o['price_shipping_netto'];
+			$zusatz_brutto += $o['price_shipping_brutto'];
+			$zusatz += $o['price_payment'];
+			$zusatz_netto += $o['price_payment_netto'];
+			$zusatz_brutto += $o['price_payment_brutto'];
 			
 			$data['price_gesamt'] += $zusatz;
@@ -380,4 +394,5 @@
 			$sval = 0.0;
 			$option = $this->shop->get_option('wpsg_preisangaben');
+			$_SESSION['wpsg']['order_id'] = wpsg_q($_REQUEST['edit_id']);
 			if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
 			if (isset($_REQUEST['s_id'])) $sid = wpsg_q($_REQUEST['s_id']);
@@ -811,4 +826,7 @@
 						*/
 					}
+					
+					$this->correctPrice($order_id);
+					
 				}
 				die("1");
@@ -949,10 +967,10 @@
 			"); 
 			
-			$this->shop->view['oOrder'] = wpsg_order::getInstance($_REQUEST['edit_id']);			
+			$this->shop->view['oOrder'] = wpsg_order::getInstance($_REQUEST['edit_id']);
 
 			$custom_data = @unserialize($this->shop->view['data']['custom_data']);
-			 
+			
 			$basket = new wpsg_basket();
-			$basket->initFromDB($this->shop->view['data']['id'], true); 
+			$basket->initFromDB($this->shop->view['data']['id'], true);
 			$this->shop->view['basket'] = $basket->toArray(true);
 			
@@ -1046,4 +1064,6 @@
 			}
 			
+			$_SESSION['wpsg']['order_id'] = $_REQUEST['edit_id'];
+			
 			$this->shop->render(WPSG_PATH_VIEW.'/order/view.phtml');
 			
@@ -1354,4 +1374,35 @@
 		} // public function indexAction()
 		
+		/**
+		 * Wird aufgerufen wenn die Bestelldaten verÃ€ndert wurden
+		 */
+		public function orderDataAction()
+		{
+			
+			$oid = 0;
+			$oid = $_SESSION['wpsg']['order_id'];
+			$option = $this->shop->get_option('wpsg_preisangaben');
+			//if (isset($_REQUEST['edit_id'])) $oid = wpsg_q($_REQUEST['edit_id']);
+			if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'actual')
+			{
+				
+				// Order-Daten sammeln und Tabelle neu generieren
+				$basket = new wpsg_basket();
+				$basket->initFromDB($oid, true);
+				$this->shop->view['basket'] = $basket->toArray(true);
+				
+				$data = array();
+				$data['preis'] = $this->shop->view['basket']['sum']['preis_gesamt_brutto'].' '.$this->get_option('wpsg_currency');
+				$data['vname'] = $this->shop->view['basket']['checkout']['vname'];
+				$data['name'] = $this->shop->view['basket']['checkout']['name'];
+				
+				echo json_encode($data, JSON_FORCE_OBJECT);
+			}
+			
+			exit;
+			
+		}	// public function orderDataAction()
+		
+		
 	} // class wpsg_OrderController extends wpsg_SystemController
 
Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 6845)
+++ /controller/wpsg_ShopController.class.php	(revision 6846)
@@ -57,4 +57,7 @@
         /** Informationen die im SystemCheck gesammelt werden */
         public $arSystemCheck = null;
+        
+        /** Das Land, damit die Berechnung im BE beim bearbeiten des Produktes klappt */
+        public $country = 0;
 
         /** Object Cache fÃŒr die loadProduktArray */
@@ -1685,7 +1688,20 @@
 		{
 
-			$country = $this->getDefaultCountry();
+			if (wpsg_isSizedInt($this->view['oOrder']->adress_data['land'])) $country_id = $this->view['oOrder']->adress_data['land'];
+			if (wpsg_isSizedInt($this->country)) $country_id = $this->country;
+			if (wpsg_isSizedInt($country_id))
+				$country = wpsg_country::getInstance($country_id);
+			else 
+				$country = $this->getDefaultCountry();
+			
+			//$country = $this->getDefaultCountry();
+			$tax = $country->getTax($tax_key);
+			if ($tax == 19)
+				$tax = 19;
+			if ($tax == 20)
+				$tax = 20;
 			return $country->getTax($tax_key);
 
+			//$this->view['oOrder']->adress_data['land']
 			//$country = $this->getFrontendCountry();
 
@@ -1784,4 +1800,5 @@
 			// Jetzt habe ich Netto/Brutto Werte im Standardland
 			// Wenn es jetzt ein Leistungsort Produkt ist, dann muss ich die Steuer des Ziellandes bestimmen
+			// 1=euleistungsortregel
 			if (wpsg_isSizedInt($produkt['euleistungsortregel']) && $this->getDefaultCountry(true) != $this->getFrontendCountry(true))
 			{
Index: /lib/wpsg_basket.class.php
===================================================================
--- /lib/wpsg_basket.class.php	(revision 6845)
+++ /lib/wpsg_basket.class.php	(revision 6846)
@@ -1567,5 +1567,7 @@
 
 					// in $b sind eventuell auch Moduldaten drin (Produktvariablen)
+					$this->shop->country = $land['id'];
 					$b = $this->shop->loadProduktArray($produkt_id, $b, true);
+					//$this->shop->country = 0;
 
 					if (wpsg_isSizedInt($b['euleistungsortregel']))
@@ -1576,4 +1578,9 @@
 
 					}
+					
+					if ($backend === true)
+					{
+						$country = wpsg_country::getInstance($this->arCheckout['land']);
+					}
 
 					$b['productkey'] = $b['id'];
@@ -1654,4 +1661,5 @@
 				$arTaxKey = explode('_', $tax_key_lang);
 				$country_id = $arTaxKey[1];
+				$country_id = $this->arCheckout['land'];
 				$country = wpsg_country::getInstance($country_id);
 				$tax_key = $arTaxKey[0];
@@ -1675,4 +1683,7 @@
 					$sum_netto = array_sum($tax);
 					$sum_brutto = round(wpsg_calculatePreis(array_sum($tax), WPSG_BRUTTO, $tax_value), 2);
+					
+					// Rundungsfehler abfangen
+					if (abs($price_sum_brutto - $sum_brutto) < 0.02) $sum_brutto = $price_sum_brutto;
 
 				}
Index: /mods/wpsg_mod_basic.class.php
===================================================================
--- /mods/wpsg_mod_basic.class.php	(revision 6845)
+++ /mods/wpsg_mod_basic.class.php	(revision 6846)
@@ -814,9 +814,31 @@
 		{
 			
+			// Das richtige Land ermitteln fÃŒr FE oder BE
+			if (isset($arBasket['backend']) && ($arBasket['backend'] == true))
+			{	// Backend
+				$oCountry = wpsg_country::getInstance($arBasket['checkout']['land']);
+				$country_id = $arBasket['checkout']['land'];
+				
+			}
+			else
+			{	// Frontend
+				//$oCountry = $this->shop->getFrontendCountry($arBasket['checkout']['land']);
+				$oCountry = wpsg_country::getInstance($arBasket['checkout']['land']);
+				$country_id = $arBasket['checkout']['land'];
+				
+			}
+			if (!isset($oCountry))
+			{
+				$oCountry = $this->shop->getDefaultCountry();
+				$country_id = $oCountry->id;
+				$test = 2;
+			}
+			
 			if (in_array($tax_key, array('a', 'b', 'c', 'd', 'e')))
 			{
 				 
 				// Fixer Satz
-				$tax_value = $this->getTaxValue($tax_key, $this->shop->getDefaultCountry());
+				//$tax_value = $this->getTaxValue($tax_key, $this->shop->getDefaultCountry());
+				$tax_value = $this->getTaxValue($tax_key, $oCountry);
 				
 				if ($this->shop->get_option('wpsg_preisangaben') == WPSG_BRUTTO)
@@ -836,9 +858,11 @@
 					 
 				$shipping_mwst = $shipping_brutto - $shipping_netto;
+				if ($arBasket['noMwSt'] == true) $shipping_mwst = 0;
 				
 				$this->shop->basket->checkMwSt($tax_key, $this->shop->getDefaultCountry(), $arBasket);
-				
-				wpsg_addSet($arBasket['mwst'][$tax_key.'_'.$this->shop->getDefaultCountry(true)]['sum'], $shipping_mwst);
-				wpsg_addSet($arBasket['mwst'][$tax_key.'_'.$this->shop->getDefaultCountry(true)]['base_value'], $shipping_brutto);
+				$this->shop->basket->checkMwSt($tax_key, $oCountry, $arBasket);
+				
+				wpsg_addSet($arBasket['mwst'][$tax_key.'_'.$country_id]['sum'], $shipping_mwst);
+				wpsg_addSet($arBasket['mwst'][$tax_key.'_'.$country_id]['base_value'], $shipping_brutto);
 				
 				wpsg_addSet($arBasket['sum']['preis_shipping_netto'], $shipping_netto);
@@ -903,5 +927,6 @@
 					{
 							
-						$defaultCountry = $this->shop->getDefaultCountry();
+						//$defaultCountry = $this->shop->getDefaultCountry();
+						$defaultCountry = $oCountry;
 						$defaultTax = $defaultCountry->getTax(substr($tax_key, 0, 1));
 
@@ -961,10 +986,31 @@
 		public function setPaymentKosten(&$arBasket, $payment_price, $tax_key)
 		{
-						
+			
+			// Das richtige Land ermitteln fÃŒr FE oder BE
+			if (isset($arBasket['backend']) && ($arBasket['backend'] == true))
+			{	// Backend
+				$oCountry = wpsg_country::getInstance($arBasket['checkout']['land']);
+				$country_id = $arBasket['checkout']['land'];
+				
+			}
+			else
+			{	// Frontend
+				//$oCountry = $this->shop->getFrontendCountry($arBasket['checkout']['land']);
+				$oCountry = wpsg_country::getInstance($arBasket['checkout']['land']);
+				$country_id = $arBasket['checkout']['land'];
+				
+			}
+			if (!isset($oCountry))
+			{
+				$oCountry = $this->shop->getDefaultCountry();
+				$country_id = $oCountry->id;
+				$test = 2;
+			}
+			
 			if (in_array($tax_key, array('a', 'b', 'c', 'd', 'e')) && !$this->shop->basket->hasEULeistungsortProduct($arBasket))
 			{
 				
 				// Fixer Satz
-				$tax_value = $this->getTaxValue($tax_key, $this->shop->getDefaultCountry()); 
+				$tax_value = $this->getTaxValue($tax_key, $oCountry); 
 				
 				if ($this->shop->get_option('wpsg_preisangaben') == WPSG_BRUTTO)
@@ -985,7 +1031,7 @@
 				$payment_mwst = $payment_brutto - $payment_netto;
 				
-				$this->shop->basket->checkMwSt($tax_key, $this->shop->getDefaultCountry(), $arBasket);
-				wpsg_addSet($arBasket['mwst'][$tax_key.'_'.$this->shop->getDefaultCountry(true)]['sum'], $payment_mwst);
-				wpsg_addSet($arBasket['mwst'][$tax_key.'_'.$this->shop->getDefaultCountry(true)]['base_value'], $payment_brutto);
+				$this->shop->basket->checkMwSt($tax_key, $oCountry, $arBasket);
+				wpsg_addSet($arBasket['mwst'][$tax_key.'_'.$country_id]['sum'], $payment_mwst);
+				wpsg_addSet($arBasket['mwst'][$tax_key.'_'.$country_id]['base_value'], $payment_brutto);
 
 				wpsg_addSet($arBasket['sum']['preis_payment_netto'], $payment_netto);
@@ -1042,5 +1088,5 @@
 				$tax_brutto_gesamt = 0;
 				$tax_sum = 0;
-				/* HR
+				/* XXHR
 				foreach ($arMwStAnteile as $tax_key => $mw_anteil)
 				{
@@ -1080,5 +1126,5 @@
 					{
 							
-						$defaultCountry = $this->shop->getDefaultCountry();
+						$defaultCountry = $oCountry;
 						$defaultTax = $defaultCountry->getTax(substr($tax_key, 0, 1));
 						if (!empty($payment_price))
Index: /mods/wpsg_mod_discount.class.php
===================================================================
--- /mods/wpsg_mod_discount.class.php	(revision 6845)
+++ /mods/wpsg_mod_discount.class.php	(revision 6846)
@@ -523,4 +523,7 @@
 				{
 
+					// Rabatt auf Produktpreis begrenzen
+					if ($discount > $arReturn['sum']['preis_gesamt_brutto']) $discount = $arReturn['sum']['preis_gesamt_brutto'];
+					
 					if ($this->shop->get_option('wpsg_kleinunternehmer') != '1')
 					{
@@ -551,4 +554,6 @@
 				{
 
+					if ($discount > $arReturn['sum']['preis_gesamt_netto']) $discount = $arReturn['sum']['preis_gesamt_netto'];
+					
 					if ($this->shop->get_option('wpsg_kleinunternehmer') != '1')
 					{
Index: /mods/wpsg_mod_gutschein.class.php
===================================================================
--- /mods/wpsg_mod_gutschein.class.php	(revision 6845)
+++ /mods/wpsg_mod_gutschein.class.php	(revision 6846)
@@ -598,4 +598,6 @@
 					{
 
+						if ($gs_value > $arReturn['sum']['preis_gesamt_netto']) $gs_value = $arReturn['sum']['preis_gesamt_netto'];
+						
 						if ($this->shop->get_option('wpsg_kleinunternehmer') != '1')
 						{
@@ -615,6 +617,6 @@
 						{
 
-							$discount_brutto = $gs_value + $gs_tax;
-							$discount_netto = $gs_value;
+							$gs_brutto = $gs_value + $gs_tax;
+							$gs_netto = $gs_value;
 
 						}
@@ -631,4 +633,6 @@
 					if ($price_option == WPSG_BRUTTO)
 					{
+						if ($gs_value > $arReturn['sum']['preis_gesamt_brutto']) $gs_value = $arReturn['sum']['preis_gesamt_brutto'];
+						
 						if ($this->shop->get_option('wpsg_kleinunternehmer') != '1')
 						{
@@ -648,6 +652,6 @@
 						{
 
-							$discount_brutto = $gs_value;
-							$discount_netto = $gs_value - $gs_tax;
+							$gs_brutto = $gs_value;
+							$gs_netto = $gs_value - $gs_tax;
 
 						}
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 6845)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 6846)
@@ -692,7 +692,10 @@
 				{
 					
-					$defaultCountry = $this->shop->getDefaultCountry();
-					$storno_fee_tax_value = $defaultCountry->getTax($storno_tax_key);
-									
+					$country_id = $this->shop->view['basket']['land']['id'];
+					$oCountry = wpsg_country::getInstance($country_id);
+					//$defaultCountry = $this->shop->getDefaultCountry();
+					//$storno_fee_tax_value = $defaultCountry->getTax($storno_tax_key);
+					$storno_fee_tax_value = $oCountry->getTax($storno_tax_key);
+					
 					if ($this->shop->getBackendTaxview() === WPSG_NETTO) $storno_fee_value_brutto = wpsg_calculatePreis($storno_fee_value_netto, WPSG_BRUTTO, $storno_fee_tax_value);
 					else $storno_fee_value_netto = wpsg_calculatePreis($storno_fee_value_brutto, WPSG_NETTO, $storno_fee_tax_value);				
@@ -720,6 +723,6 @@
 					{
 						 
-						$this->shop->view['basket']['mwst'][$storno_tax_key.'_'.$this->shop->getDefaultCountry(true)] = array(
-							'country' => $this->shop->getDefaultCountry(true),
+						$this->shop->view['basket']['mwst'][$storno_tax_key.'_'.$country_id] = array(
+							'country' => $country_id,
 							'tax_key' => $storno_tax_key,
 							'sum' => -1 * $storno_fee_tax,
Index: /mods/wpsg_mod_versandarten.class.php
===================================================================
--- /mods/wpsg_mod_versandarten.class.php	(revision 6845)
+++ /mods/wpsg_mod_versandarten.class.php	(revision 6846)
@@ -271,7 +271,11 @@
 
 				$va = $this->getVaKosten($arBasket, $va);
-					
-				$mwst_value = $this->getTaxValue($va['mwst_key'], $this->shop->getDefaultCountry());
-		 
+				
+				if (wpsg_isSizedInt($this->shop->country)) $oCountry = wpsg_country::getInstance($this->shop->country);
+				if (wpsg_isSizedInt($this->shop->basket->arCheckout['land'])) $oCountry = wpsg_country::getInstance($this->shop->basket->arCheckout['land']);
+				if (!isset($oCountry)) $oCountry = $this->shop->getDefaultCountry();
+				//$mwst_value = $this->getTaxValue($va['mwst_key'], $this->shop->getDefaultCountry());
+				$mwst_value = $this->getTaxValue($va['mwst_key'], $oCountry);
+				
 				$hint = $va['hint'];
 				
@@ -342,6 +346,11 @@
 				
 				$va = $this->getVaKosten($arBasket, $va);
-				$mwst_value = $this->getTaxValue($va['mwst_key'], $this->shop->getDefaultCountry());
-
+				
+				if (wpsg_isSizedInt($this->shop->country)) $oCountry = wpsg_country::getInstance($this->shop->country);
+				if (wpsg_isSizedInt($this->shop->basket->arCheckout['land'])) $oCountry = wpsg_country::getInstance($this->shop->basket->arCheckout['land']);
+				if (!isset($oCountry)) $oCountry = $this->shop->getDefaultCountry();
+				//$mwst_value = $this->getTaxValue($va['mwst_key'], $this->shop->getDefaultCountry());
+				$mwst_value = $this->getTaxValue($va['mwst_key'], $oCountry);
+				
 				if ($this->shop->getBackendTaxview() == WPSG_BRUTTO)
 				{
Index: /views/order/view.phtml
===================================================================
--- /views/order/view.phtml	(revision 6845)
+++ /views/order/view.phtml	(revision 6846)
@@ -17,5 +17,5 @@
 					<li role="presentation" class="<?php echo ((!isset($_REQUEST['action']))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo __("BestellÃŒbersicht", "wpsg"); ?></a></li>
 					<li role="presentation" class="wpsg_showhide_filter active"><a onclick="return false;"><?php echo __("Bestellansicht (Detail)", "wpsg"); ?></a></li>
-					<li role="presentation" class="wpsg_top_extend">
+					<li role="presentation" class="wpsg_top_extend" id="wpsg_be_orderdata">
 
 						<?php echo $this->view['oOrder']->getInvoiceFirstName().' '.$this->view['oOrder']->getInvoiceName().' / '.wpsg_ff($this->view['oOrder']->getAmount($this->getBackendTaxview()), $this->get_option('wpsg_currency')); ?>
Index: /views/order/view_customerdata.phtml
===================================================================
--- /views/order/view_customerdata.phtml	(revision 6845)
+++ /views/order/view_customerdata.phtml	(revision 6846)
@@ -46,5 +46,6 @@
                 <?php echo wpsg_drawForm_Checkbox('dialog_shipping', __('Auch Lieferanschrift anpassen', 'wpsg'), false, array('help' => 'dialog_shipping')); ?>
                 <?php } ?>
-
+				<input type="hidden" id="dialog_change_land" name="dialog_change_land" />
+				
             </div>
             <div class="modal-footer">
@@ -115,5 +116,6 @@
                 success: function(data) {
 
-                    location.href = location.href;
+                    //location.href = location.href;
+                    location.reload();
 
                 }
@@ -124,4 +126,15 @@
         }
 
+        jQuery(document).ready(function() {
+
+            jQuery('#dialog_land').bind('change', function() {
+
+				jQuery('#dialog_change_land').val('1');
+				
+            } );
+        	
+        } );
+            
+
     /* ]]> */</script>
 
Index: /views/order/view_general.phtml
===================================================================
--- /views/order/view_general.phtml	(revision 6845)
+++ /views/order/view_general.phtml	(revision 6846)
@@ -12,5 +12,5 @@
     <?php echo wpsg_drawForm_Text(__('Bestellnummer', 'wpsg'), $this->view['oOrder']->getNr().' ['.$this->view['oOrder']->getStateLabel().']'); ?>
     <?php echo wpsg_drawForm_Text(__('Bestelldatum', 'wpsg'), wpsg_formatTimestamp($this->view['oOrder']->cdate)); ?>
-    <?php echo wpsg_drawForm_Text(__('Bestellwert', 'wpsg'), wpsg_ff($this->view['oOrder']->getAmount(), $this->get_option('wpsg_currency'))); ?>
+    <?php echo wpsg_drawForm_Text(__('Bestellwert', 'wpsg'), wpsg_ff($this->view['oOrder']->getAmount(), $this->get_option('wpsg_currency')), 'wpsg_be_orderamount'); ?>
     <?php echo wpsg_drawForm_Text(__('Bestellkommentar (Admin)', 'wpsg'), $this->view['data']['admincomment'], 'wpsg_order_admincomment', array('inlineEdit' => true, 'inlineEdit_type' => 'textarea', 'inlineEdit_url' => WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&noheader=1&action=setAdminComment&edit_id='.$this->view['data']['id'])); ?>
 
Index: /views/order/view_orderdata.phtml
===================================================================
--- /views/order/view_orderdata.phtml	(revision 6845)
+++ /views/order/view_orderdata.phtml	(revision 6846)
@@ -234,4 +234,5 @@
     	callback: function(data, config) {
     		jQuery('#wpsg_produkte_table').replaceWith(data);
+    		wpsg_be_act_orderdata();
     	}
 	});
@@ -257,4 +258,5 @@
     	callback: function(data, config) {
     		jQuery('#wpsg_produkte_table').replaceWith(data);
+    		wpsg_be_act_orderdata();
     	}
 	});
@@ -278,4 +280,5 @@
 				jQuery('#wpsg_produkte_table').replaceWith(data);
 				jQuery('#LinkGutscheinNeu').show();
+	    		wpsg_be_act_orderdata();
 			}
 		} );
@@ -299,4 +302,5 @@
 				jQuery('#wpsg_produkte_table').replaceWith(data);
 				jQuery('#LinkRabattNeu').show();
+	    		wpsg_be_act_orderdata();
 			}
 		} );
@@ -305,4 +309,24 @@
 	}
 
+	function wpsg_be_act_orderdata() {
+
+		var o_id = 0;
+		//alert('wpsg_be_act_orderdata');
+		jQuery.ajax( {
+			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&subaction=orderData&do=actual&edit_id=' + o_id +'&noheader=1',
+			success: function(data) {
+				data = JSON.parse(data);
+				jQuery('#wpsg_be_orderamount').html(data.preis);
+				odata = data.vname + ' ' + data.name + ' / ' + data.preis;
+				jQuery('#wpsg_be_orderdata').html(odata);
+				
+			}
+		} );
+
+
+		return false;
+		
+	}
+	
     jQuery(document).ready(function() {
 		gs_id = <?php echo $gs_id; ?>;
@@ -404,4 +428,5 @@
     					//jQuery('#wpsg_payment_dialog').modal( { } ).modal('hide');
     					jQuery('#wpsg_produkte_table').replaceWith(data);
+    					wpsg_be_act_orderdata();
     			    }
     			} );
@@ -442,4 +467,5 @@
     					//jQuery('#wpsg_payment_dialog').modal( { } ).modal('hide');
     					jQuery('#wpsg_produkte_table').replaceWith(data);
+    					wpsg_be_act_orderdata();
     			    }
     			} );
@@ -516,4 +542,5 @@
     					//jQuery('#wpsg_payment_dialog').modal( { } ).modal('hide');
     					jQuery('#wpsg_produkte_table').replaceWith(data);
+    		    		wpsg_be_act_orderdata();
     			    }
     			} );
@@ -550,8 +577,7 @@
     					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');
+        				//alert(data);
     					jQuery('#wpsg_produkte_table').replaceWith(data);
+    					wpsg_be_act_orderdata();
     			    }
     			} );
@@ -615,4 +641,5 @@
     			success: function (data) {
     				jQuery('#wpsg_produkte_table').replaceWith(data);
+    	    		wpsg_be_act_orderdata();
     			}
     		} );
@@ -744,4 +771,5 @@
 						//jQuery('#wpsg_payment_dialog').modal( { } ).modal('hide');
 						jQuery('#wpsg_produkte_table').replaceWith(data);
+			    		wpsg_be_act_orderdata();
 				    }
 				} );
@@ -759,4 +787,5 @@
 	    			success: function(data) {
 	    				jQuery('#wpsg_produkte_table').replaceWith(data);
+	    	    		wpsg_be_act_orderdata();
 	    				//jQuery('#LinkRabattNeu').hide();
 	    			}
