Index: /controller/wpsg_OrderController.class.php
===================================================================
--- /controller/wpsg_OrderController.class.php	(revision 5717)
+++ /controller/wpsg_OrderController.class.php	(revision 5720)
@@ -51,12 +51,10 @@
 		public function setAdminCommentAction()
 		{
-			
+
 			$this->db->UpdateQuery(WPSG_TBL_ORDER, array(
-				'admincomment' => wpsg_q($_REQUEST['wpsg_order_admincomment'])
+				'admincomment' => wpsg_q($_REQUEST['value'])
 			), "`id` = '".wpsg_q($_REQUEST['edit_id'])."'");				
 				
-			$this->shop->addBackendMessage(__('Bemerkung wurde erfolgreich gespeichert!', 'wpsg'));
-			
-			$this->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$_REQUEST['edit_id']);
+			die($_REQUEST['value']);
 			
 		} // public function setAdminCommentAction()
@@ -204,10 +202,4 @@
 								
 			}
-			else if ($_REQUEST['wpsg_action'] == 'orderLog')
-			{
-				
-				die($this->orderLogAction($_REQUEST['edit_id']));
-				
-			}
 			
 		} // public function ajaxAction()
@@ -253,26 +245,5 @@
 			
 		} // public function stornoAction()
-		
-		/**
-		 * Zeichnet das Bestell Log
-		 */
-		public function orderLogAction($order_id)
-		{
-			
-			$this->shop->view['log'] = $this->db->fetchAssoc("
-				SELECT
-					OL.*
-				FROM
-					`".WPSG_TBL_OL."` AS OL
-				WHERE
-					OL.`o_id` = '".wpsg_q($order_id)."'
-				ORDER BY
-					OL.`cdate` ASC
-			");
-			
-			return $this->shop->render(WPSG_PATH_VIEW.'/order/orderlog.phtml', false);
-			
-		} // public function orderLogAction($order_id)
-		
+
 		/**
 		 * Zeigt eine Bestellung an
@@ -299,6 +270,5 @@
 			
 			$this->shop->view['oOrder'] = wpsg_order::getInstance($_REQUEST['edit_id']);			
-			$this->shop->view['orderLog'] = $this->orderLogAction($_REQUEST['edit_id']);
-						
+
 			$custom_data = @unserialize($this->shop->view['data']['custom_data']);
 			 
@@ -337,4 +307,40 @@
 					C.`id` = '".$this->shop->view['data']['shipping_land']."'
 			");
+
+			$this->shop->view['arSubAction'] = array(
+				'general' => array(
+					'title' => __('Allgemein', 'wpsg'),
+					'content' => $this->shop->render(WPSG_PATH_VIEW.'/order/view_general.phtml', false)
+				),
+				'orderdata' => array(
+					'title' => __('Bestelldaten', 'wpsg'),
+					'content' => $this->shop->render(WPSG_PATH_VIEW.'/order/view_orderdata.phtml', false)
+				),
+				'customerdata' => array(
+					'title' => __('Kundendaten', 'wpsg'),
+					'content' => $this->shop->render(WPSG_PATH_VIEW.'/order/view_customerdata.phtml', false)
+				),
+				'shippay' => array(
+					'title' => __('Versand- /Zahlungsart', 'wpsg'),
+					'content' => $this->shop->render(WPSG_PATH_VIEW.'/order/view_shippay.phtml', false)
+				)
+			);
+
+			$this->shop->callMods('order_view', array($_REQUEST['edit_id'], &$this->shop->view['arSubAction']));
+
+			$this->shop->view['arSubAction']['orderlog'] = array(
+				'title' => __('Bestellprotokoll', 'wpsg'),
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'/order/view_orderlog.phtml', false)
+			);
+
+			if (wpsg_isSizedInt($this->get_option('wpsg_debugModus')))
+			{
+
+				$this->shop->view['arSubAction']['dev'] = array(
+					'title' => __('Entwickleroptionen', 'wpsg'),
+					'content' => $this->shop->render(WPSG_PATH_VIEW.'/order/view_dev.phtml', false)
+				);
+
+			}
 			
 			$this->shop->render(WPSG_PATH_VIEW.'/order/view.phtml');
Index: /lib/functions.inc.php
===================================================================
--- /lib/functions.inc.php	(revision 5717)
+++ /lib/functions.inc.php	(revision 5720)
@@ -737,5 +737,7 @@
 	function wpsg_formatTimestamp($ts, $dateOnly = false)
 	{
-		
+
+		if (!is_numeric($ts)) $ts = strtotime($ts);
+
 		if ($ts == 0) return '';
 		
Index: /lib/helper_functions.inc.php
===================================================================
--- /lib/helper_functions.inc.php	(revision 5717)
+++ /lib/helper_functions.inc.php	(revision 5720)
@@ -576,5 +576,5 @@
 	} // function wpsg_drawForm_TextEnd($field_label)
 	
-	function wpsg_drawForm_Text($field_label, $field_value, $conf = array())
+	function wpsg_drawForm_Text($field_label, $field_value, $field_id = false, $conf = array())
 	{
 		
@@ -584,4 +584,5 @@
 		$TC->view['field_value'] = $field_value;
 		$TC->view['field_config'] = $conf;
+		$TC->view['field_id'] = $field_id;
 		
 		return $TC->render(WPSG_PATH_VIEW.'admin/form/text.phtml', false);
Index: /model/wpsg_customer.class.php
===================================================================
--- /model/wpsg_customer.class.php	(revision 5717)
+++ /model/wpsg_customer.class.php	(revision 5720)
@@ -72,5 +72,8 @@
 			
 		} // public function getName()
-		
+
+		/** Gibt die Kundennummer zurÃŒck */
+		public function getNr() { return $this->knr; } // public function getNr()
+
 		/**
 		 * Versucht die Hausnummer von der StraÃe abzutrennen und nur die StraÃe zurÃŒckzugeben
Index: /model/wpsg_order.class.php
===================================================================
--- /model/wpsg_order.class.php	(revision 5717)
+++ /model/wpsg_order.class.php	(revision 5720)
@@ -49,5 +49,12 @@
 			
 		} // public function log($subject, $text)
-		
+
+		public function getLog()
+		{
+
+			return $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_OL."` WHERE `o_id` = '".wpsg_q($this->id)."' ORDER BY `cdate` DESC ");
+
+		}
+
 		/**
 		 * Gibt den letzten Log Eintrag zurÃŒck 
Index: /mods/wpsg_mod_auftragsbestaetigung.class.php
===================================================================
--- /mods/wpsg_mod_auftragsbestaetigung.class.php	(revision 5717)
+++ /mods/wpsg_mod_auftragsbestaetigung.class.php	(revision 5720)
@@ -31,9 +31,12 @@
 		 * zeigt das Formular zum Senden in der Bestellverwaltung
 		 */
-		public function order_view_content($order_id)
+		public function order_view($order_id, &$arSidebarArray)
 		{
-			
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_auftragsbestaetigung/order_view.phtml');
-			
+
+			$arSidebarArray[$this->id] = array(
+				'title' => $this->name,
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_auftragsbestaetigung/order_view.phtml', false)
+			);
+
 		} // public function order_view_content($order_id)
 	 
Index: /mods/wpsg_mod_basic.class.php
===================================================================
--- /mods/wpsg_mod_basic.class.php	(revision 5717)
+++ /mods/wpsg_mod_basic.class.php	(revision 5720)
@@ -316,10 +316,5 @@
 		 */
 		public function order_ajax() { }
-		
-		/**
-		 * Wird in der Bestellansicht aufgerufen um im linken Bereich neue Elemente zu platzieren
-		 */
-		public function order_view_content($order_id) { }
-		
+				
 		/** Wird in das Formular fÃŒr die StatusÃ€nderung innerhalb der Bestellung integriert */
 		public function order_view_switchStatus(&$order_id) { }
@@ -332,10 +327,8 @@
 		 */
 		public function setOrderStatus($order_id, $status_id, $inform) { }
-		
-		/**
-		 * Wird in der Bestellverwaltung aufgerufen um im rechten Bereich neue Elemente zu platzieren
-		 */
-		public function order_view_sidebar(&$order_id) { }
-		
+
+		/** Wird in der Bestellansicht eingebunden  */
+		public function order_view($order_id, &$arSidebarArray) { }
+
 		/** Wird bei der Darstellung einer Produktzeile in der Bestellverwaltung aufgerufen */
 		public function order_view_row(&$p, $i) { }
Index: /mods/wpsg_mod_billsafe.class.php
===================================================================
--- /mods/wpsg_mod_billsafe.class.php	(revision 5717)
+++ /mods/wpsg_mod_billsafe.class.php	(revision 5720)
@@ -351,23 +351,28 @@
 			
 		} // public function order_ajax()
-		
-		public function order_view_sidebar(&$order_id) 
+
+		public function order_view($order_id, &$arSidebarArray)
 		{
 
 			$order_data = $this->shop->cache->loadOrder($order_id);
-			
+
 			if ($order_data['type_payment'] != $this->id) return;
-			
-			$this->shop->view['wpsg_mod_billsafe']['data'] = $order_data;		 
-	 
+
+			$this->shop->view['wpsg_mod_billsafe']['data'] = $order_data;
+
 			if (file_exists($this->getFilePath($order_id).'/billsafe_rechnung.pdf'))
-			{	
+			{
+
 				$this->shop->view['wpsg_mod_billsafe']['rechnung_url'] = WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_billsafe&edit_id='.$order_id.'&noheader=1&do=getInvoice';
-			}
-			
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_billsafe/order_view_sidebar.phtml');
-			
-		}
-		
+
+			}
+
+			$arSidebarArray[$this->id] = array(
+				'title' => $this->name,
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_billsafe/order_view_sidebar.phtml', false)
+			);
+
+		} // public function order_view(&$arSidebarArray)
+
 		public function order_done(&$order_id, &$done_view) 
 		{ 
Index: /mods/wpsg_mod_cab.class.php
===================================================================
--- /mods/wpsg_mod_cab.class.php	(revision 5717)
+++ /mods/wpsg_mod_cab.class.php	(revision 5720)
@@ -207,5 +207,5 @@
 		} // public function addPayment(&$arPayment)
 
-		public function order_view_content($order_id)
+		public function order_view($order_id, &$arSidebarArray)
 		{
 			
@@ -216,6 +216,9 @@
 			$this->shop->view['wpsg_mod_cab']['order'] = $order_data;
 			$this->shop->view['wpsg_mod_cab']['content'] = $this->order_view_content_inner($order_id); 
-			
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_cab/order_view_content.phtml');
+
+			$arSidebarArray[$this->id] = array(
+				'title' => $this->name,
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_cab/order_view_content.phtml', false)
+			);
 			
 		} // public function order_view_content($order_id)
Index: /mods/wpsg_mod_deliverynote.class.php
===================================================================
--- /mods/wpsg_mod_deliverynote.class.php	(revision 5717)
+++ /mods/wpsg_mod_deliverynote.class.php	(revision 5720)
@@ -369,5 +369,5 @@
 		} // public function delOrder(&$order_id)
 		
-		public function order_view_content($order_id)
+		public function order_view($order_id, &$arSidebarArray)
 		{
 			
@@ -379,6 +379,9 @@
 			$this->shop->view['wpsg_mod_deliverynote']['arDeliverynotes'] = $this->loadDeliveryNotesFromOrder($order_id);
 			$this->shop->view['wpsg_mod_deliverynote']['arNoDeliveredProducts'] = $this->getNoDeliveredProducts($order_id);
-			 
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverynote/order_view_content.phtml');
+
+			$arSidebarArray[$this->id] = array(
+				'title' => $this->name,
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverynote/order_view_content.phtml', false)
+			);
 			
 		} // public function order_view_content($order_id)
@@ -671,5 +674,5 @@
 		{
 
-			$oOrder = &$this->shop->cache->loadOrderObject($order_id);
+			$oOrder = $this->shop->cache->loadOrderObject($order_id);
 			$order_products = $oOrder->getProductKeys();
 			 
Index: /mods/wpsg_mod_downloadplus.class.php
===================================================================
--- /mods/wpsg_mod_downloadplus.class.php	(revision 5717)
+++ /mods/wpsg_mod_downloadplus.class.php	(revision 5720)
@@ -59,5 +59,5 @@
 				
 				$path = WP_CONTENT_DIR.'/'.WPSG_MB_UPLOADS.'/wpsg/wpsg_dlplus/'; 
-				$new_path = WP_CONTENT_DIR.'/'.WPSG_MB_UPLOADS.'/wpsg/wpsg_pdfprodukte/'.$produkt_id.'/';
+				$new_path = WP_CONTENT_DIR.'/'.WPSG_MB_UPLOADS.'/wpsg/wpsg_pdfprodukte/';
 				
 			}
@@ -66,5 +66,5 @@
 					 
 				$path = WP_CONTENT_DIR.'/uploads/wpsg_dlplus/';
-				$new_path = WP_CONTENT_DIR.'/uploads/wpsg_pdfprodukte/'.$produkt_id.'/';					
+				$new_path = WP_CONTENT_DIR.'/uploads/wpsg_pdfprodukte/';
 				
 			}
@@ -230,5 +230,5 @@
 				
 				header('Content-Type: application/pdf');
-				header('Content-Disposition: inline; filename="'.rawurldecode($indiv_db['out_file']).'"');
+				header('Content-Disposition: inline; filename="'.rawurldecode(basename($_REQUEST['file'])).'"');
 				header('Cache-Control: private, max-age=0, must-revalidate');
 				header('Pragma: public'); 
@@ -451,5 +451,5 @@
 				
 				header('Content-Type: application/pdf');
-				header('Content-Disposition: inline; filename="'.rawurldecode($indiv_db['out_file']).'"');
+				header('Content-Disposition: inline; filename="'.rawurldecode(basename($_REQUEST['file'])).'"');
 				header('Cache-Control: private, max-age=0, must-revalidate');
 				header('Pragma: public'); 
@@ -460,50 +460,53 @@
 			
 		} // public function order_ajax()
-		
-		public function order_view_sidebar(&$order_id)
-		{
-			
+
+		public function order_view($order_id, &$arSidebarArray)
+		{
+
 			$bPDFProdukt = false;
 			$arFiles = array();
-			
+
 			// Die arFiles brauch ich um zu bestimmen ob Produkte gekauft wurden, die Downloads enthalten
 			foreach ($this->shop->view['basket']['produkte'] as $k => $v)
 			{
-				
+
 				$this->shop->view['arProducts'][$k] = $v;
-				
+
 				if ($this->isPDFProdukt($v['id']))
 				{
-					
+
 					$bPDFProdukt = true;
-					
+
 					$product_id = $this->shop->getProduktID($v['id']);
-					
+
 					// Hier darf das wpsg_array_merge nicht verwendet werden, da der Index nicht ÃŒberschrieben werden darf
 					//$arFiles = array_merge($arFiles, $this->getFiles($v['id']));
 					$arFiles_product = $this->getfiles($v['id']);
-					
+
 					foreach ($arFiles_product as $file_product)
 					{
-						
+
 						$arFiles[] = array($product_id, $file_product);
-						
+
 					}
-					
-				}
-				
-			}
-			
+
+				}
+
+			}
+
 			if ($bPDFProdukt && sizeof($arFiles) > 0)
 			{
-				 											
+
 				$this->shop->view['order_id'] = $order_id;
-				
-				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_downloadplus/order_view_sidebar.phtml');				
-				
-			}
-			
-		} // public function order_view_sidebar($order_id) 
-		
+
+				$arSidebarArray[$this->id] = array(
+					'title' => $this->name,
+					'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_downloadplus/order_view_sidebar.phtml', false)
+				);
+
+			}
+
+		} // public function order_view($order_id, &$arSidebarArray)
+
 		public function order_view_sidebar_renderList($order_id) {
 			
@@ -914,5 +917,7 @@
 									if (file_exists($font_file))
 									{
-										 
+
+										global $name;
+
 										include $font_file;
 										 
Index: /mods/wpsg_mod_kundenkontakt.class.php
===================================================================
--- /mods/wpsg_mod_kundenkontakt.class.php	(revision 5717)
+++ /mods/wpsg_mod_kundenkontakt.class.php	(revision 5720)
@@ -25,5 +25,5 @@
 		 * zeigt das Formular zum Senden in der Bestellverwaltung
 		 */
-		public function order_view_content($order_id)
+		public function order_view($order_id, &$arSidebarArray)
 		{
 			
@@ -48,6 +48,9 @@
 				
 			}
-			
-			$this->shop->render(WPSG_PATH_VIEW.'mods/mod_kundenkontakt/order_view.phtml');
+
+			$arSidebarArray[$this->id] = array(
+				'title' => $this->name,
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'mods/mod_kundenkontakt/order_view.phtml', false)
+			);
 			
 		} // public function order_view_content($order_id)
Index: /mods/wpsg_mod_ordervars.class.php
===================================================================
--- /mods/wpsg_mod_ordervars.class.php	(revision 5717)
+++ /mods/wpsg_mod_ordervars.class.php	(revision 5720)
@@ -254,30 +254,33 @@
 			
 		}
-		
-		public function order_view_sidebar(&$order_id) 
+
+		public function order_view($order_id, &$arSidebarArray)
 		{
 
 			$arOV_db = $this->db->fetchAssoc("SELECT * FROM `".WPSG_TBL_ORDERVARS."` WHERE `deleted` != '1' ORDER BY `pos` ASC, `id` ASC ");
 			$arOV = array();
-			
+
 			foreach ($arOV_db as $k => $ov)
 			{
-				
+
 				$arOV[$ov['id']] = wpsg_array_merge(array(
-					'value' => $this->getValueByIdAndOrder($ov['id'], $order_id)						
+					'value' => $this->getValueByIdAndOrder($ov['id'], $order_id)
 				), $ov);
-				
+
 				$arOV[$ov['id']]['auswahl'] = explode('|', $ov['auswahl']);
-				
-			}
-			
+
+			}
+
 			if (!wpsg_isSizedArray($arOV)) return;
 
 			$this->shop->view['wpsg_mod_ordervars']['data'] = $arOV;
-	 
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_ordervars/order_view_sidebar.phtml');
-			
+
+			$arSidebarArray[$this->id] = array(
+				'title' => $this->name,
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_ordervars/order_view_sidebar.phtml', false)
+			);
+
 		}
-		
+
 		public function clearSession() 
 		{ 
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 5717)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 5720)
@@ -299,5 +299,5 @@
 		} // public function settings_edit()
 		
-		public function order_view_content($order_id) 
+		public function order_view($order_id, &$arSidebarArray)
 		{
 			
@@ -322,6 +322,9 @@
 					`id` ASC
 			");
-			
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_rechnungen/order_view.phtml');
+
+			$arSidebarArray[$this->id] = array(
+				'title' => $this->name,
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_rechnungen/order_view.phtml', false)
+			);
 			
 		} // public function order_view_content($order_id) { }
Index: /mods/wpsg_mod_trustedshops.class.php
===================================================================
--- /mods/wpsg_mod_trustedshops.class.php	(revision 5717)
+++ /mods/wpsg_mod_trustedshops.class.php	(revision 5720)
@@ -285,8 +285,11 @@
 		} // public function basket_save_order(&$data, &$checkout, &$arBasket, $finish_order)
 		
-		public function order_view_sidebar(&$order_id) 
+		public function order_view($order_id, &$arSidebarArray)
 		{ 
-			
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_trustedshops/order_view_sidebar.phtml');
+
+			$arSidebarArray[$this->id] = array(
+				'title' => $this->name,
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_trustedshops/order_view_sidebar.phtml', false)
+			);
 			
 		} // public function order_view_sidebar(&$order_id)
Index: /mods/wpsg_mod_videodownload.class.php
===================================================================
--- /mods/wpsg_mod_videodownload.class.php	(revision 5717)
+++ /mods/wpsg_mod_videodownload.class.php	(revision 5720)
@@ -114,5 +114,5 @@
 		} // public function settings_save()
 		
-		public function order_view_sidebar(&$order_id)
+		public function order_view($order_id, &$arSidebarArray)
 		{
 			
@@ -177,6 +177,9 @@
 				$this->shop->view['arFiles'] = $arFiles;				
 				$this->shop->view['order_id'] = $order_id;
-				
-				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_videodownload/order_view_sidebar.phtml');				
+
+				$arSidebarArray[$this->id] = array(
+					'title' => $this->name,
+					'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_videodownload/order_view_sidebar.phtml', false)
+				);
 				
 			}
Index: /mods/wpsg_mod_voucherproduct.class.php
===================================================================
--- /mods/wpsg_mod_voucherproduct.class.php	(revision 5717)
+++ /mods/wpsg_mod_voucherproduct.class.php	(revision 5720)
@@ -454,5 +454,5 @@
 		}
 		
-		public function order_view_sidebar(&$order_id)
+		public function order_view($order_id, &$arSidebarArray)
 		{
 			
@@ -461,6 +461,9 @@
 			
 				$this->shop->view['wpsg_mod_voucherproduct']['order_id'] = $order_id;
-							
-				$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_voucherproduct/order_view_sidebar.phtml');
+
+				$arSidebarArray[$this->id] = array(
+					'title' => $this->name,
+					'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_voucherproduct/order_view_sidebar.phtml', false)
+				);
 				
 			}
Index: /system/intern/mods/wpsg_mod_orderupload.class.php
===================================================================
--- /system/intern/mods/wpsg_mod_orderupload.class.php	(revision 5717)
+++ /system/intern/mods/wpsg_mod_orderupload.class.php	(revision 5720)
@@ -199,6 +199,6 @@
 			
 		} // public function basket_save_done($o_id, $k_id)
-		
-		public function order_view_sidebar(&$order_id) 
+
+		public function order_view($order_id, &$arSidebarArray)
 		{ 
 	 
@@ -209,6 +209,10 @@
 			if (sizeof($arFiles) <= 0) return;
 			
-			$this->shop->view['arFiles'] = $arFiles;			
-			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_orderupload/order_view_sidebar.phtml');
+			$this->shop->view['arFiles'] = $arFiles;
+
+			$arSidebarArray[$this->id] = array(
+				'title' => $this->name,
+				'content' => $this->shop->render(WPSG_PATH_VIEW.'/mods/mod_orderupload/order_view_sidebar.phtml', false)
+			);
 			
 		} // public function order_view_sidebar(&$order_id)
Index: /views/admin/form/text.phtml
===================================================================
--- /views/admin/form/text.phtml	(revision 5717)
+++ /views/admin/form/text.phtml	(revision 5720)
@@ -7,7 +7,7 @@
 
             <?php if (wpsg_isTrue($this->view['field_config']['noP'])) { ?>
-            <?php echo $this->view['field_value']; ?>
+            <span <?php echo ((wpsg_isSizedString($this->view['field_id']))?' id="'.$this->view['field_id'].'" ':''); ?>><?php echo $this->view['field_value']; ?></span>
             <?php } else { ?>
-			<p class="form-control-static" style="padding-left:0px;"><?php echo $this->view['field_value']; ?></p>
+			<p <?php echo ((wpsg_isSizedString($this->view['field_id']))?' id="'.$this->view['field_id'].'" ':''); ?> class="form-control-static" style="padding-left:0px;"><?php echo $this->view['field_value']; ?></p>
             <?php } ?>
 				
@@ -17,4 +17,21 @@
 		</div>
 	</div>
+
+    <?php if (isset($this->view['field_config']['inlineEdit']) && $this->view['field_config']['inlineEdit']) { ?>
+    <script type="text/javascript">/* <![CDATA[ */
+
+        jQuery(document).ready(function() {
+
+            jQuery('#<?php echo $this->view['field_id']; ?>').wspg_editable('<?php echo $this->view['field_config']['inlineEdit_url']; ?>', {
+                <?php if (wpsg_isSizedString($this->view['field_config']['inlineEdit_type'])) { ?>
+                'type': '<?php echo $this->view['field_config']['inlineEdit_type']; ?>',
+                'placement': 'bottom'
+                <?php } ?>
+            } );
+
+        } );
+
+    /* ]]> */</script>
+    <?php } ?>
 	
 </div>
Index: /views/admin/form/textarea.phtml
===================================================================
--- /views/admin/form/textarea.phtml	(revision 5717)
+++ /views/admin/form/textarea.phtml	(revision 5720)
@@ -1,7 +1,13 @@
 <div class="form-group form-group-sm form-textarea <?php echo ((wpsg_isSizedString($this->view['field_config']['help']))?'has-feedback':''); ?>">
 
+    <?php if (!isset($this->view['field_config']['noLabel']) || $this->view['field_config']['noLabel'] != true) { ?>
 	<label class="col-sm-6 control-label" for="<?php echo $this->view['field_id']; ?>"><?php echo $this->view['field_label']; ?></label>
-	
-	<div class="col-sm-6">
+	<?php } ?>
+
+    <?php if (isset($this->view['field_config']['noLabel']) && $this->view['field_config']['noLabel'] == true) { ?>
+	<div class="col-sm-12">
+    <?php } else { ?>
+    <div class="col-sm-6">
+    <?php } ?>
 	
 		<div class="wpsg_field_wrap">
Index: /views/css/admin.css
===================================================================
--- /views/css/admin.css	(revision 5717)
+++ /views/css/admin.css	(revision 5720)
@@ -133,4 +133,7 @@
 .wpsg_order .wpsg-order-tab { padding-top:15px; padding-bottom:15px; }
 
+#wpsg-bs.wpsg_order_view .editableform textarea { height:150px;}
+.wpsg_order_view .wpsg_cell_gesamtpreis { text-align:right; }
+
 /* Modulverwaltung */
 .wpsg_admin_submenu .list-group-item.modul_akt { color:#3c763d; font-weight:bold; }
Index: /views/js/editable.js
===================================================================
--- /views/js/editable.js	(revision 5717)
+++ /views/js/editable.js	(revision 5720)
@@ -26,9 +26,44 @@
             if (typeof options.type == "string") opt['type'] = options.type;
 
-			if (options.type == 'string' && typeof options.data == "string") {
-				
+            if (options.type == "select" && typeof options.data == "string")
+            {
+
+                // Normale Ãbergabe eines JSON Strings
+                opt.source = jQuery.parseJSON(options.data);
+                opt.type = 'select';
+
+            }
+            else if (options.type == 'multiarray')
+            {
+
+                var ar = [];
+                var arData = jQuery.parseJSON(options.data);
+ 
+                for (var i in arData)
+                {
+
+                    objData = { 'text': arData[i].name, 'children': [] };
+
+                    for (var j in arData[i]['fields'])
+                    {
+
+                        objData['children'].push( { 'value': j, 'text': arData[i]['fields'][j] } );
+
+                    }
+
+                    ar.push(objData);
+
+                }
+
+                opt.source = ar;
+                opt.type = 'select';
+
+            }
+			else if (options.type == 'string' && typeof options.data == "string")
+            {
+
 				var ar = [];
 				var arData = jQuery.parseJSON(options.data);
-								
+
 				for (var i in arData)
 				{
@@ -49,5 +84,5 @@
 			else
 			{
-			
+
 				opt.display = function(value, sourceData) {
 		        
Index: /views/mods/mod_export/profil.phtml
===================================================================
--- /views/mods/mod_export/profil.phtml	(revision 5717)
+++ /views/mods/mod_export/profil.phtml	(revision 5720)
@@ -259,5 +259,5 @@
                     submit: '<?php echo __('Speichern', 'wpsg'); ?>',
                     data: '<?php echo json_encode($this->view['fields']); ?>',
-                    type: 'select',
+                    type: 'multiarray',
                     placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
                     indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
Index: /views/mods/mod_ordervars/ov_list.phtml
===================================================================
--- /views/mods/mod_ordervars/ov_list.phtml	(revision 5717)
+++ /views/mods/mod_ordervars/ov_list.phtml	(revision 5720)
@@ -7,112 +7,116 @@
 ?>
 <?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
-<table class="wpsg_ov_table">
-	 <tr>
-	 	<th><?php echo __('ID', 'wpsg'); ?></th>
-    	<th class="wpsg_label"><?php echo __('Name', 'wpsg'); ?></th>
-    	<th class="wpsg_typ"><?php echo __('Typ', 'wpsg'); ?></th>
-    	<th class="wpsg_pflicht"><?php echo __('Pflicht', 'wpsg'); ?></th>
-    	<th class="wpsg_delcol"></th>
-  	</tr>
+<table class="wpsg_ov_table table table-body-striped">
+    <thead>
+        <tr>
+            <th><?php echo __('ID', 'wpsg'); ?></th>
+            <th class="wpsg_label"><?php echo __('Name', 'wpsg'); ?></th>
+            <th class="wpsg_typ"><?php echo __('Typ', 'wpsg'); ?></th>
+            <th class="wpsg_pflicht"><?php echo __('Pflicht', 'wpsg'); ?></th>
+            <th class="wpsg_delcol"></th>
+        </tr>
+    </thead>
   	<?php $i = 0; foreach ($this->view['data'] as $ov) { $i ++; ?>
-	<tr class="wpsg_table wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>" id="ov_<?php echo $ov['id']; ?>">
-		<td class="wpsg_id"><?php echo $ov['id']; ?></td>
-		<td id="wpsg_ov_name_<?php echo $ov['id']; ?>" class="wpsg_label wpsg_editable"><?php echo wpsg_hspc(__($ov['name'], 'wpsg')); ?></td>
-		<td id="wpsg_ov_typ_<?php echo $ov['id']; ?>" class="wpsg_typ wpsg_editable"><?php echo $this->mod->arTypen[$ov['typ']]; ?></td>
-		<td class="wpsg_pflicht"><input type="checkbox" <?php echo (($ov['pflicht'] == '1')?'checked="checked"':''); ?> id="wpsg_ov_pflicht_<?php echo $ov['id']; ?>" /></td>
-		<td class="wpsg_delcol">
-		
-			<a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Bestellvariable lÃ¶schen', 'wpsg'); ?>" onclick="return wpsg_removeOV(<?php echo $ov['id']; ?>);"></a>
-		
-			<script type="text/javascript">
+    <tbody id="ov_<?php echo $ov['id']; ?>">
+        <tr class="wpsg_table wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+            <td class="wpsg_id"><?php echo $ov['id']; ?></td>
+            <td><span id="wpsg_ov_name_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc(__($ov['name'], 'wpsg')); ?></span></td>
+            <td><span id="wpsg_ov_typ_<?php echo $ov['id']; ?>"><?php echo $this->mod->arTypen[$ov['typ']]; ?></span></td>
+            <td class="wpsg_pflicht"><input type="checkbox" <?php echo (($ov['pflicht'] == '1')?'checked="checked"':''); ?> id="wpsg_ov_pflicht_<?php echo $ov['id']; ?>" /></td>
+            <td class="wpsg_delcol">
 
-				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', {
-					submitdata: {
-						field: 'name',
-						ov_id: '<?php echo $ov['id']; ?>'
-					},
-					submit: '<?php echo __('Speichern', 'wpsg'); ?>',
-					placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
-					indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
-			    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
-				});
+                <a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Bestellvariable lÃ¶schen', 'wpsg'); ?>" onclick="return wpsg_removeOV(<?php echo $ov['id']; ?>);"></a>
 
-				jQuery('#wpsg_ov_pflicht_<?php echo $ov['id']; ?>').bind('change', function() {
+                <script type="text/javascript">
 
-					jQuery.ajax( {
-						url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=inlinedit',
-						data: {
-							field: 'pflicht',
-							ov_id: '<?php echo $ov['id']; ?>',
-							value: ((jQuery(this).attr("checked") == "checked")?'1':'0')
-						}
-					} );
+                    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', {
+                        submitdata: {
+                            field: 'name',
+                            ov_id: '<?php echo $ov['id']; ?>'
+                        },
+                        submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+                        placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+                        indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+                        tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+                    });
 
-				} );
+                    jQuery('#wpsg_ov_pflicht_<?php echo $ov['id']; ?>').bind('change', function() {
 
-				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', { 
-					submitdata: {
-						field: 'typ',
-						ov_id: '<?php echo $ov['id']; ?>'						
-					},
-					submit: '<?php echo __('Speichern', 'wpsg'); ?>',					
-					data: '<?php echo json_encode($this->mod->arTypen); ?>',
-					type: 'select',
-					placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
-					indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
-			    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
-			    	callback: function(el) {  
-				    	if (el == '<?php echo __('Auswahl', 'wpsg'); ?>')
-				    	{
-					    	jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').show();
-				    	}
-				    	else
-				    	{
-				    		jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').hide();
-				    	}	    	
-			    	}
-				});
+                        jQuery.ajax( {
+                            url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=inlinedit',
+                            data: {
+                                field: 'pflicht',
+                                ov_id: '<?php echo $ov['id']; ?>',
+                                value: ((jQuery(this).attr("checked") == "checked")?'1':'0')
+                            }
+                        } );
 
-				function wpsg_removeOV(id)
-				{
-					jQuery.ajax({
-						url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=del',
-						data: {
-							ov_id: id
-						},
-						success: function(data){
-							if (data == 1)
-							{
-								location.reload();
-							}
-						}
-					});
-				}
-			
-			</script>
-			
-		</td>
-	</tr> 
-	<tr class="wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>" id="wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>" style="<?php echo (($ov['typ'] != '1')?'display:none;':''); ?>">
-		<td	class="wpsg_id"></td>
-		<td class="wpsg_select" colspan="4">
-			<?php echo __('Auswahl', 'wpsg'); ?>:
-			<span class="wpsg_editable" id="wpsg_ov_auswahl_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['auswahl']); ?></span>
-			<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', {
-					submitdata: {
-						field: 'auswahl',
-						ov_id: '<?php echo $ov['id']; ?>'
-					},
-					submit: '<?php echo __('Speichern', 'wpsg'); ?>',
-					placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
-					indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
-			    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
-				});
-			
-			</script>			
-		</td>
-	</tr>
+                    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', {
+                        submitdata: {
+                            field: 'typ',
+                            ov_id: '<?php echo $ov['id']; ?>'
+                        },
+                        submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+                        data: '<?php echo json_encode($this->mod->arTypen); ?>',
+                        type: 'select',
+                        placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+                        indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+                        tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+                        callback: function(el) {
+                            if (el == '<?php echo __('Auswahl', 'wpsg'); ?>')
+                            {
+                                jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').show();
+                            }
+                            else
+                            {
+                                jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').hide();
+                            }
+                        }
+                    });
+
+                    function wpsg_removeOV(id)
+                    {
+                        jQuery.ajax({
+                            url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=del',
+                            data: {
+                                ov_id: id
+                            },
+                            success: function(data){
+                                if (data == 1)
+                                {
+                                    location.reload();
+                                }
+                            }
+                        });
+                    }
+
+                </script>
+
+            </td>
+        </tr>
+        <tr class="wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>" id="wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>" style="<?php echo (($ov['typ'] != '1')?'display:none;':''); ?>">
+            <td	class="wpsg_id"></td>
+            <td class="wpsg_select" colspan="4">
+                <?php echo __('Auswahl', 'wpsg'); ?>:
+                <span class="wpsg_editable" id="wpsg_ov_auswahl_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['auswahl']); ?></span>
+                <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', {
+                        submitdata: {
+                            field: 'auswahl',
+                            ov_id: '<?php echo $ov['id']; ?>'
+                        },
+                        submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+                        placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+                        indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+                        tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+                    });
+
+                </script>
+            </td>
+        </tr>
+    </tbody>
 	<?php } ?>
 </table>
@@ -125,5 +129,5 @@
 		jQuery('.wpsg_ov_table').sortable( {
 			helper: wpsg_Tablefix,
-			items: 'tr.wpsg_tablerow',
+			items: 'tbody',
 			handler: '.wpsg_id',
 			update: function(event, ui) {
Index: /views/mods/mod_rechnungen/order_view.phtml
===================================================================
--- /views/mods/mod_rechnungen/order_view.phtml	(revision 5717)
+++ /views/mods/mod_rechnungen/order_view.phtml	(revision 5720)
@@ -75,204 +75,199 @@
 </script>
 
-<div class="postbox" id="wpsg_rechnungen">		
-	<h3 class="wpsg_handlediv">
-		<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
-		<span><?php echo __('Rechnungen', 'wpsg'); ?></span>
-	</h3>
-	<div class="inside">
-		
-		<?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) == 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_storno']) == 0) { ?>
-			<p><?php echo __('Bisher keine Rechnungen geschrieben.', 'wpsg'); ?></p>
-		<?php } else { ?>
-			<table>
-				<?php foreach ($this->view['mod_rechnungen']['arRechnungen_gesamt'] as $r) { ?>	
-				<tr>
-					<td>#<?php echo (($r['rnr'] != '')?$r['rnr']:$r['gnr']); ?>
-					
-						<?php if ($r['storno'] == "0000-00-00 00:00:00") { ?>
-							<?php if ($r['gnr'] != "") { ?>
-								<?php echo wpsg_translate(__('Rechnungskorrektur vom #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>	
-							<?php } else { ?>
-								<?php echo wpsg_translate(__('Rechnung geschrieben am #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>	
-							<?php } ?>
-						<?php } else { ?>
-							<?php echo wpsg_translate(__("Rechnung storniert am #1#", "wpsg"), date("d.m.Y", $r['ts_storno'])); ?>
-						<?php } ?> 
-					
-					</td>
-					<td style="text-align:right;">
-					
-						<?php
-						 
-							if ($r['rnr'] != "") 
-							{ 
-								$rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'R'.$r['rnr'].'.pdf';								
-							}
-							else if ($r['gnr'] != "")
-							{
-								$rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'G'.$r['gnr'].'.pdf';
-							}
-							
-						?>
-					
-						<a target="_blank" onclick="if (!confirm('<?php echo __('Sind Sie sicher, dass Sie eine Kopie dieser Rechnung/Rechnungskorrektur erneut an den Kunden senden mÃ¶chten?', 'wpsg'); ?>')) return false;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>&do=copy"><?php echo __("Kopie senden", "wpsg"); ?></a>&nbsp;
-						<a target="_blank" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_rechnungen&do=getRechnung&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>"><?php echo __("Ansehen", "wpsg"); ?></a>
-					
-					</td>
-				</tr>
-				<?php } ?>
-			</table>
-			<br />
-		<?php } ?>
-		
-		<?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) > 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_gesamt']) != sizeof($this->view['mod_rechnungen']['arRechnungen_storno'])) { ?>
-			<fieldset style="border:1px solid #999999; width:100%;">
-				<legend style="margin-left:7px; margin-right:10px;"><?php echo __("Bestellstorno: Rechnungskorrektur erstellen", "wpsg"); ?></legend>
-				<div style="padding:10px;">
-					<form id="storno_form" target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno">
-
-						<input type="hidden" name="send" value="1" />
-						
-						<label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '0');" type="radio" value="0" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift0" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnung komplett stornieren und keine Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
-						<label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '1');" type="radio" value="1" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift1" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
-						<label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '2');" type="radio" value="2" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift2" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnungskorrektur erstellen und an Kunden senden.", "wpsg"); ?></label><br />
-
-						<div id="wpsg_mod_rechnungen_fee_layer" style="display:none;">							
-							<?php echo wpsg_drawForm_Input('wpsg_mod_rechnungen_fee', __('GebÃŒhr fÃŒr Rechnungskorrektur', 'wpsg'), ''); ?>
-						</div>
-												 
-						<div class="wpsg_clear"></div><br />						
-
-						<input onclick="return wpsg_mod_rechnungen_storno();" id="wpsg_rechnungen_stornobutton" class="button" type="submit" name="form_submit" value="<?php echo __("Stornieren", "wpsg"); ?>" style="float:right;" />							
-						<input id="wpsg_mod_rechnungen_stornopreview" class="button" type="submit" name="form_submit_preview" value="<?php echo __('Vorschau', 'wpsg'); ?>" style="float:right; margin-right:10px;" />
-							
-						<script type="text/javascript">
- 
-							jQuery(document).ready(function() {									
-																
-								jQuery("[name=wpsg_rechnungen_gutschrift]").filter("[value=" + jQuery.cookie("wpsg_rechnungen_stornoradio") + "]").attr("checked","checked");
-										
-								jQuery("#wpsg_rechnungen_stornobutton").bind("click", function() {
-										  
-									if (jQuery("#wpsg_rechnungen_gutschrift1").attr("checked") || jQuery("#wpsg_rechnungen_gutschrift2").attr("checked"))
-									{
-											
-										//jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
-										jQuery("#storno_form").attr("target", "_blank");
-
-										window.setTimeout(function() {
-											location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>";
-										}, 1500);
-											
-									}
-									else
-									{
-										
-										//jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
-										jQuery("#storno_form").attr("target", "");
-											
-									}
-																			
-								});	 
-								
-							});
-									
-						</script>
-							
-					</form>
-					<div class="wpsg_hinweis"><?php echo __("Eine neue Rechnung kann erst geschrieben werden wenn alle bestehenden Rechnungen zu dieser Bestellung storniert wurden.", "wpsg"); ?></div>
-					<div class="wpsg_clear"></div>
-				</div>
-			</fieldset>
-		<?php } else { ?>
-		
-			<fieldset style="border:1px solid #999999; width:100%;">
-				<legend style="margin-left:10px; margin-right:10px;"><?php echo __("Neue Rechnung", "wpsg"); ?></legend>
-				<div style="padding:5px;">
-	
-					<form target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&cmd=rechnung&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>">
-						
-						<input type="hidden" name="send" value="1" />
-									
-						<label style="height:25px; width:240px; float:left; margin-top:10px;">	
-							<input onchange="if (this.checked) jQuery('#wpsg_rechnungen_email').show(); else jQuery('#wpsg_rechnungen_email').hide();" type="checkbox" checked="checked" value="1" name="wpsg_rechnungen_sendmail" />
-							&nbsp;<?php echo __("E-Mail an Kunden senden.", "wpsg"); ?>
-						</label>
-						<input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_email" name="wpsg_rechnungen_email" value="<?php echo wpsg_hspc($this->view['data']['email']); ?>" />
-						<div style="clear:both; width:100%; height:5px;"></div>
-										
-						<label style="height:25px; width:240px; float:left;">	
-							<input checked="checked"  onchange="if (this.checked) jQuery('#wpsg_rechnungen_faelligkeitsdatum').show(); else jQuery('#wpsg_rechnungen_faelligkeitsdatum').hide();" type="checkbox" value="1" name="wpsg_rechnungen_faelligkeit" />
-							&nbsp;<?php echo __("FÃ€lligkeit anzeigen.", "wpsg"); ?>
-						</label>
-						<input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_faelligkeitsdatum" name="wpsg_rechnungen_faelligkeitsdatum" value="<?php echo date("d.m.Y", time() + ($this->get_option("wpsg_rechnungen_faelligkeit") * 86400)); ?>" />
-						<div style="clear:both; width:100%; height:5px;"></div>
-		
-						<label style="height:25px; width:220px; float:left;">									
-							<input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_status').show(); else jQuery('#wpsg_rechnungen_status').hide();" type="checkbox" value="1" name="wpsg_rechnungen_status" />
-							&nbsp;<?php echo __("Neuer Status:", "wpsg"); ?>										
-						</label>
-						<select style="width:300px; float:right;" id="wpsg_rechnungen_status_neu" name="wpsg_rechnungen_status_neu">
-							<?php foreach ($this->arStatus as $k => $v) { ?>
-							<option value="<?php echo $k; ?>" <?php echo (($k == 110)?'selected="selected"':''); ?>><?php echo $v; ?></option>
-							<?php } ?>
-						</select>
-						<div style="clear:both; width:100%; height:5px;"></div>				
-
-						<label style="height:25px; width:240px; float:left;">
-							<input <?php echo (($this->get_option("wpsg_rechnungen_url_std") === "1")?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_rechnungen_url" />
-							&nbsp;<?php echo __("URL Benachrichtigung", "wpsg"); ?>
-						</label>
-						<div style="clear:both; width:100%; height:5px;"></div>
-									
-						<label style="height:25px; width:240px; float:left; padding-left:22px;">
-							<?php echo __("Rechnungsdatum", "wpsg"); ?>:											
-						</label>
-						<input style="display:block;float:right; width:300px;" type="text" name="wpsg_rechnungen_datum" value="<?php echo date("d.m.Y", time()); ?>" />
-						<div style="clear:both; width:100%; height:5px;"></div>
-																		
-						<label for="wpsg_rechnungen_fusstext" style="height:25px; width:220px; padding-left:22px; float:left">
-							<?php echo __("FuÃtext", "wpsg"); ?>
-						</label>
-				
-						<?php 
-											
-							$wpsg_rechnungen_footer = $this->get_option("wpsg_rechnungen_footer");
- 							if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = unserialize($this->get_option("wpsg_rechnungen_footer"));
-							if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = Array();
-
-						?>
-												
-						<?php if (sizeof($wpsg_rechnungen_footer) > 0) { ?>				
-						<select style="width:300px; float:right;" id="wpsg_rechnungen_select" onchange="jQuery('#wpsg_rechnungen_fusstext').val(this.value);">
-							<?php foreach ($wpsg_rechnungen_footer as $k => $v) { ?>
-							<option value="<?php echo wpsg_hspc($v[1]); ?>"><?php echo wpsg_hspc($v[0]); ?></option>
-							<?php } ?>
-						</select>
-						<?php } ?>
-
-						<div style="clear:both; width:100%; height:5px;"></div>															
-						<div style="padding-left:25px;"><input style="width:100%;" type="text" name="wpsg_rechnungen_fusstext" id="wpsg_rechnungen_fusstext" value="" /></div>								
-						<div style="clear:both; width:100%; height:15px;"></div>
-										
-						<script type="text/javascript">
-		
-							jQuery(document).ready(function() {
-								jQuery('#wpsg_rechnungen_fusstext').val(jQuery("#wpsg_rechnungen_select").val());
-							});
-											
-						</script>
-										
-						<input class="button" style="float:right;" onclick="window.setTimeout(function() { location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>'; }, 1000);" name="wpsg_rechnungen_write" type="submit" value="<?php echo __("Rechnung schreiben", "wpsg"); ?>" />
-						<input class="button" style="float:right; margin-right:10px;" name="wpsg_rechnungen_preview" type="submit" value="<?php echo __("Vorschau", "wpsg"); ?>" />
-										
-						<div style="clear:both; width:100%; height:5px;"></div>
-								 
-					</form>
-				</div>
-			</fieldset> 
-		
-		<?php } ?>
-				
-	</div>					
-</div>
+<?php echo wpsg_drawForm_AdminboxStart(__('Rechnungen', 'wpsg'));  ?>
+
+    <?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) == 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_storno']) == 0) { ?>
+        <p><?php echo __('Bisher keine Rechnungen geschrieben.', 'wpsg'); ?></p>
+    <?php } else { ?>
+        <table>
+            <?php foreach ($this->view['mod_rechnungen']['arRechnungen_gesamt'] as $r) { ?>
+            <tr>
+                <td>#<?php echo (($r['rnr'] != '')?$r['rnr']:$r['gnr']); ?>
+
+                    <?php if ($r['storno'] == "0000-00-00 00:00:00") { ?>
+                        <?php if ($r['gnr'] != "") { ?>
+                            <?php echo wpsg_translate(__('Rechnungskorrektur vom #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
+                        <?php } else { ?>
+                            <?php echo wpsg_translate(__('Rechnung geschrieben am #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
+                        <?php } ?>
+                    <?php } else { ?>
+                        <?php echo wpsg_translate(__("Rechnung storniert am #1#", "wpsg"), date("d.m.Y", $r['ts_storno'])); ?>
+                    <?php } ?>
+
+                </td>
+                <td style="text-align:right;">
+
+                    <?php
+
+                        if ($r['rnr'] != "")
+                        {
+                            $rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'R'.$r['rnr'].'.pdf';
+                        }
+                        else if ($r['gnr'] != "")
+                        {
+                            $rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'G'.$r['gnr'].'.pdf';
+                        }
+
+                    ?>
+
+                    <a target="_blank" onclick="if (!confirm('<?php echo __('Sind Sie sicher, dass Sie eine Kopie dieser Rechnung/Rechnungskorrektur erneut an den Kunden senden mÃ¶chten?', 'wpsg'); ?>')) return false;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>&do=copy"><?php echo __("Kopie senden", "wpsg"); ?></a>&nbsp;
+                    <a target="_blank" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_rechnungen&do=getRechnung&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>"><?php echo __("Ansehen", "wpsg"); ?></a>
+
+                </td>
+            </tr>
+            <?php } ?>
+        </table>
+        <br />
+    <?php } ?>
+
+    <?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) > 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_gesamt']) != sizeof($this->view['mod_rechnungen']['arRechnungen_storno'])) { ?>
+        <fieldset style="border:1px solid #999999; width:100%;">
+            <legend style="margin-left:7px; margin-right:10px;"><?php echo __("Bestellstorno: Rechnungskorrektur erstellen", "wpsg"); ?></legend>
+            <div style="padding:10px;">
+                <form id="storno_form" target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno">
+
+                    <input type="hidden" name="send" value="1" />
+
+                    <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '0');" type="radio" value="0" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift0" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnung komplett stornieren und keine Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
+                    <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '1');" type="radio" value="1" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift1" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
+                    <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '2');" type="radio" value="2" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift2" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnungskorrektur erstellen und an Kunden senden.", "wpsg"); ?></label><br />
+
+                    <div id="wpsg_mod_rechnungen_fee_layer" style="display:none;">
+                        <?php echo wpsg_drawForm_Input('wpsg_mod_rechnungen_fee', __('GebÃŒhr fÃŒr Rechnungskorrektur', 'wpsg'), ''); ?>
+                    </div>
+
+                    <div class="wpsg_clear"></div><br />
+
+                    <input onclick="return wpsg_mod_rechnungen_storno();" id="wpsg_rechnungen_stornobutton" class="button" type="submit" name="form_submit" value="<?php echo __("Stornieren", "wpsg"); ?>" style="float:right;" />
+                    <input id="wpsg_mod_rechnungen_stornopreview" class="button" type="submit" name="form_submit_preview" value="<?php echo __('Vorschau', 'wpsg'); ?>" style="float:right; margin-right:10px;" />
+
+                    <script type="text/javascript">
+
+                        jQuery(document).ready(function() {
+
+                            jQuery("[name=wpsg_rechnungen_gutschrift]").filter("[value=" + jQuery.cookie("wpsg_rechnungen_stornoradio") + "]").attr("checked","checked");
+
+                            jQuery("#wpsg_rechnungen_stornobutton").bind("click", function() {
+
+                                if (jQuery("#wpsg_rechnungen_gutschrift1").attr("checked") || jQuery("#wpsg_rechnungen_gutschrift2").attr("checked"))
+                                {
+
+                                    //jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
+                                    jQuery("#storno_form").attr("target", "_blank");
+
+                                    window.setTimeout(function() {
+                                        location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>";
+                                    }, 1500);
+
+                                }
+                                else
+                                {
+
+                                    //jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
+                                    jQuery("#storno_form").attr("target", "");
+
+                                }
+
+                            });
+
+                        });
+
+                    </script>
+
+                </form>
+                <div class="wpsg_hinweis"><?php echo __("Eine neue Rechnung kann erst geschrieben werden wenn alle bestehenden Rechnungen zu dieser Bestellung storniert wurden.", "wpsg"); ?></div>
+                <div class="wpsg_clear"></div>
+            </div>
+        </fieldset>
+    <?php } else { ?>
+
+        <fieldset>
+            <legend><?php echo __("Neue Rechnung", "wpsg"); ?></legend>
+
+            <div>
+
+                <form target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&cmd=rechnung&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>">
+
+                    <input type="hidden" name="send" value="1" />
+
+                    <label style="height:25px; width:240px; float:left; margin-top:10px;">
+                        <input onchange="if (this.checked) jQuery('#wpsg_rechnungen_email').show(); else jQuery('#wpsg_rechnungen_email').hide();" type="checkbox" checked="checked" value="1" name="wpsg_rechnungen_sendmail" />
+                        &nbsp;<?php echo __("E-Mail an Kunden senden.", "wpsg"); ?>
+                    </label>
+                    <input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_email" name="wpsg_rechnungen_email" value="<?php echo wpsg_hspc($this->view['data']['email']); ?>" />
+                    <div style="clear:both; width:100%; height:5px;"></div>
+
+                    <label style="height:25px; width:240px; float:left;">
+                        <input checked="checked"  onchange="if (this.checked) jQuery('#wpsg_rechnungen_faelligkeitsdatum').show(); else jQuery('#wpsg_rechnungen_faelligkeitsdatum').hide();" type="checkbox" value="1" name="wpsg_rechnungen_faelligkeit" />
+                        &nbsp;<?php echo __("FÃ€lligkeit anzeigen.", "wpsg"); ?>
+                    </label>
+                    <input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_faelligkeitsdatum" name="wpsg_rechnungen_faelligkeitsdatum" value="<?php echo date("d.m.Y", time() + ($this->get_option("wpsg_rechnungen_faelligkeit") * 86400)); ?>" />
+                    <div style="clear:both; width:100%; height:5px;"></div>
+
+                    <label style="height:25px; width:220px; float:left;">
+                        <input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_status').show(); else jQuery('#wpsg_rechnungen_status').hide();" type="checkbox" value="1" name="wpsg_rechnungen_status" />
+                        &nbsp;<?php echo __("Neuer Status:", "wpsg"); ?>
+                    </label>
+                    <select style="width:300px; float:right;" id="wpsg_rechnungen_status_neu" name="wpsg_rechnungen_status_neu">
+                        <?php foreach ($this->arStatus as $k => $v) { ?>
+                        <option value="<?php echo $k; ?>" <?php echo (($k == 110)?'selected="selected"':''); ?>><?php echo $v; ?></option>
+                        <?php } ?>
+                    </select>
+                    <div style="clear:both; width:100%; height:5px;"></div>
+
+                    <label style="height:25px; width:240px; float:left;">
+                        <input <?php echo (($this->get_option("wpsg_rechnungen_url_std") === "1")?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_rechnungen_url" />
+                        &nbsp;<?php echo __("URL Benachrichtigung", "wpsg"); ?>
+                    </label>
+                    <div style="clear:both; width:100%; height:5px;"></div>
+
+                    <label style="height:25px; width:240px; float:left; padding-left:22px;">
+                        <?php echo __("Rechnungsdatum", "wpsg"); ?>:
+                    </label>
+                    <input style="display:block;float:right; width:300px;" type="text" name="wpsg_rechnungen_datum" value="<?php echo date("d.m.Y", time()); ?>" />
+                    <div style="clear:both; width:100%; height:5px;"></div>
+
+                    <label for="wpsg_rechnungen_fusstext" style="height:25px; width:220px; padding-left:22px; float:left">
+                        <?php echo __("FuÃtext", "wpsg"); ?>
+                    </label>
+
+                    <?php
+
+                        $wpsg_rechnungen_footer = $this->get_option("wpsg_rechnungen_footer");
+                        if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = unserialize($this->get_option("wpsg_rechnungen_footer"));
+                        if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = Array();
+
+                    ?>
+
+                    <?php if (sizeof($wpsg_rechnungen_footer) > 0) { ?>
+                    <select style="width:300px; float:right;" id="wpsg_rechnungen_select" onchange="jQuery('#wpsg_rechnungen_fusstext').val(this.value);">
+                        <?php foreach ($wpsg_rechnungen_footer as $k => $v) { ?>
+                        <option value="<?php echo wpsg_hspc($v[1]); ?>"><?php echo wpsg_hspc($v[0]); ?></option>
+                        <?php } ?>
+                    </select>
+                    <?php } ?>
+
+                    <div style="clear:both; width:100%; height:5px;"></div>
+                    <div style="padding-left:25px;"><input style="width:100%;" type="text" name="wpsg_rechnungen_fusstext" id="wpsg_rechnungen_fusstext" value="" /></div>
+                    <div style="clear:both; width:100%; height:15px;"></div>
+
+                    <script type="text/javascript">
+
+                        jQuery(document).ready(function() {
+                            jQuery('#wpsg_rechnungen_fusstext').val(jQuery("#wpsg_rechnungen_select").val());
+                        });
+
+                    </script>
+
+                    <input class="button" style="float:right;" onclick="window.setTimeout(function() { location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>'; }, 1000);" name="wpsg_rechnungen_write" type="submit" value="<?php echo __("Rechnung schreiben", "wpsg"); ?>" />
+                    <input class="button" style="float:right; margin-right:10px;" name="wpsg_rechnungen_preview" type="submit" value="<?php echo __("Vorschau", "wpsg"); ?>" />
+
+                    <div style="clear:both; width:100%; height:5px;"></div>
+
+                </form>
+            </div>
+        </fieldset>
+
+    <?php } ?>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
Index: /views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml
===================================================================
--- /views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml	(revision 5717)
+++ /views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml	(revision 5720)
@@ -9,69 +9,74 @@
 <script type="text/javascript">/* <![CDATA[ */
 
-	function wpsg_editShippingAdress()
+	function wpsg_saveShippingAdress()
 	{
 
-		jQuery('#wpsg_ShippingDialog').dialog( {                   
-	        'dialogClass': 'wp-dialog',           
-	        'modal': true,
-	        'width': 600,
-	        'title': '<?php echo __('Lieferanschrift Ã€ndern', 'wpsg'); ?>',
-	        'autoOpen': true, 
-	        'closeOnEscape': true,      
-	        'buttons': {
-	            "<?php echo __('Speichern', 'wpsg'); ?>": function() {
+        jQuery('#wpsg_backend_loading').show();
 
-	            	jQuery('#wpsg_backend_loading').show();
-					jQuery(this).dialog('close');
-	            	
-					jQuery.ajax( {
-						url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_shippingadress&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
-						data: {
-							form_data: jQuery('#wpsg_ShippingDialog input, #wpsg_ShippingDialog select').serialize()
-						},
-						success: function(data) {
- 
-							location.href = location.href;
-							
-						}
-					} );
-	                
-	            }
-	        }
-	    } );
+        jQuery.ajax( {
+            url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_shippingadress&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
+            data: {
+                form_data: jQuery('#shipping_dialog_content input, #shipping_dialog_content select').serialize()
+            },
+            success: function(data) {
+
+                location.href = location.href;
+
+            }
+        } );
 
 		return false;
 		
-	}
+	} // function wpsg_saveShippingAdress()
 
 /* ]]> */</script>
 
-<div class="wpsg_form_field">
-	<div class="wpsg_form_left">
-		<?php echo __('Lieferadresse', 'wpsg'); ?>:
-		<a style="float:none; display:inline-block;" onclick="return wpsg_editShippingAdress();" class="wpsg_icon wpsg_icon_edit" href="#" title="<?php echo __('Rechnungsanschrift Ã€ndern', 'wpsg'); ?>"></a>
-	</div>
-	<div class="wpsg_form_right">
-		<p>		
-			<?php if (trim($this->view['wpsg_mod_shippingadress']['shipping_firma']) != '') { ?>			
-			<?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_firma']); ?><br />
-			<?php } ?>	
-			<?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_title']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_vname']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_name']); ?><br />
-			<?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?><br />
-			<?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_plz']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_ort']); ?> <?php echo wpsg_hspc($this->view['shipping_country']['kuerzel']); ?><br />
-		</p>						
-	</div>
-	
-	<div id="wpsg_ShippingDialog" class="wpsg_dialog" style="display:none;">
-		<?php echo wpsg_drawForm_Input('dialog_shipping_firma', __('Firma', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_firma']); ?>
-		<?php echo wpsg_drawForm_Select('dialog_shipping_title', __('Anschrift', 'wpsg'), $this->view['arTitles'], $this->view['wpsg_mod_shippingadress']['shipping_title'], array('noIndex' => true)); ?>
-		<?php echo wpsg_drawForm_Input('dialog_shipping_vname', __('Vorname', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_vname']); ?>
-		<?php echo wpsg_drawForm_Input('dialog_shipping_name', __('Name', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_name']); ?>
-		<?php echo wpsg_drawForm_Input('dialog_shipping_strasse', __('StraÃe', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?>
-		<?php echo wpsg_drawForm_Input('dialog_shipping_plz', __('Postleitzahl', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_plz']); ?>
-		<?php echo wpsg_drawForm_Input('dialog_shipping_ort', __('Ort', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_ort']); ?>
-		<?php echo wpsg_drawForm_Select('dialog_shipping_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['wpsg_mod_shippingadress']['shipping_land']); ?>
-	</div>
-	
+<div class="modal fade" tabindex="-1" role="dialog" id="wpsg_customer_shipping_edit">
+    <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"><?php echo __('Lieferanschrift beatbeiten', 'wpsg'); ?></h4>
+            </div>
+            <div class="modal-body">
+
+                <div id="shipping_dialog_content">
+                    <?php echo wpsg_drawForm_Input('dialog_shipping_firma', __('Firma', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_firma']); ?>
+                    <?php echo wpsg_drawForm_Select('dialog_shipping_title', __('Anschrift', 'wpsg'), $this->view['arTitles'], $this->view['wpsg_mod_shippingadress']['shipping_title'], array('noIndex' => true)); ?>
+                    <?php echo wpsg_drawForm_Input('dialog_shipping_vname', __('Vorname', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_vname']); ?>
+                    <?php echo wpsg_drawForm_Input('dialog_shipping_name', __('Name', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_name']); ?>
+                    <?php echo wpsg_drawForm_Input('dialog_shipping_strasse', __('StraÃe', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?>
+                    <?php echo wpsg_drawForm_Input('dialog_shipping_plz', __('Postleitzahl', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_plz']); ?>
+                    <?php echo wpsg_drawForm_Input('dialog_shipping_ort', __('Ort', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_ort']); ?>
+                    <?php echo wpsg_drawForm_Select('dialog_shipping_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['wpsg_mod_shippingadress']['shipping_land']); ?>
+                </div>
+
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('SchlieÃen', 'wpsg'); ?></button>
+                <button type="button" class="btn btn-primary" onclick="return wpsg_saveShippingAdress();"><?php echo __('Speichern', 'wpsg'); ?></button>
+            </div>
+        </div>
+    </div>
 </div>
-<div class="wpsg_clear"></div>
+
+<?php echo wpsg_drawForm_TextStart(); ?>
+
+    <?php if (trim($this->view['wpsg_mod_shippingadress']['shipping_firma']) != '') { ?>
+    <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_firma']); ?><br />
+    <?php } ?>
+    <?php
+
+        if (wpsg_isSizedString($this->view['wpsg_mod_shippingadress']['shipping_title']) && $this->view['wpsg_mod_shippingadress']['shipping_title'] != '-1')
+            echo $this->view['arTitles'][$this->view['wpsg_mod_shippingadress']['shipping_title']];
+
+    ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_vname']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_name']); ?><br />
+    <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?><br />
+    <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_plz']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_ort']); ?> <?php echo wpsg_hspc($this->view['shipping_country']['kuerzel']); ?><br />
+
+    <a style="position: absolute; right:25px; top:10px; display:inline-block;" data-toggle="modal" data-target="#wpsg_customer_shipping_edit" href="#" title="<?php echo __('Rechnungsanschrift Ã€ndern', 'wpsg'); ?>">
+        <span class="glyphicon glyphicon-pencil"></span>
+    </a>
+
+<?php echo wpsg_drawForm_TextEnd(__('Lieferadresse', 'wpsg')); ?>
+
Index: ews/order/orderlog.phtml
===================================================================
--- /views/order/orderlog.phtml	(revision 5717)
+++ 	(revision )
@@ -1,32 +1,0 @@
-<?php
-
-	/**
-	 * Template fÃŒr das Bestell Log
-	 */
-
-?>
-<?php if (is_array($this->view['log']) && sizeof($this->view['log']) > 0) { ?>
-<table class="wpsg_orderlog">
-	<tr>
-		<th class="col_date"><?php echo __('Datum', 'wpsg'); ?></th>
-		<th class="col_title"><?php echo __('Titel', 'wpsg'); ?></th>
-		<th class="col_aktion"></th>
-	</tr>		
-	<?php foreach ($this->view['log'] as $l) { ?>
-	<tr>
-		<td class="col_date"><?php echo date('d.m.Y H:i:s', strtotime($l['cdate'])); ?></td>
-		<td class="col_title"><?php echo $l['title']; ?></td>
-		<td class="col_aktion">
-			<a href="#" onclick="jQuery('#wpsg_mailtext_<?php echo $l['id']; ?>').toggle(); return false"><?php echo __('Anzeigen/Verbergen', 'wpsg'); ?></a>
-		</td>
-	</tr>
-	<tr id="wpsg_mailtext_<?php echo $l['id']; ?>" style="display:none;">							
-		<td colspan="3" class="col_mailtext">
-			<textarea readonly="readonly"><?php echo wpsg_xss($l['mailtext']); ?></textarea>
-		</td>
-	</tr>
-	<?php } ?>							
-</table>
-<?php } else { ?>
-<?php echo __('Noch keine EintrÃ€ge', 'wpsg'); ?>
-<?php } ?>
Index: /views/order/view.phtml
===================================================================
--- /views/order/view.phtml	(revision 5717)
+++ /views/order/view.phtml	(revision 5720)
@@ -6,574 +6,72 @@
 
 ?>
+<div class="wpsg_order_view" id="wpsg-bs">
+
+	<nav class="navbar navbar-default">
+		<div class="container-fluid">
+			<div class="navbar-header">
+				<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
+			</div>
+			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+				<ul class="nav navbar-nav">
+					<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 href="#" onclick="return false;"><?php echo __("Bestellansicht", "wpsg"); ?></a></li>
+				</ul>
+				<ul class="nav navbar-nav navbar-right">
+
+				</ul>
+			</div>
+		</div>
+        
+    </nav>
+
+    <?php echo $this->writeBackendMessage(); ?>
+
+    <div class="wpsg_admin_submenu">
+
+        <div class="list-group" id="wpsg_order_view_tabs">
+            <span class="list-group-head list-group-item"><?php echo wpsg_translate(__('Bestellung ID:#1#', 'wpsg'), $this->view['data']['id']); ?></span>
+
+            <?php $i = 0; foreach ($this->view['arSubAction'] as $k => $v) { $i ++; ?>
+            <a class="list-group-item <?php echo ((wpsg_getStr($_COOKIE['wpsg_order_view_tab'], 'general') == $k)?'active':''); ?>" wpsg-data-target="<?php echo $k; ?>" href="#"><?php echo $v['title']; ?></a>
+            <?php } ?>
+        </div>
+
+        <br />
+
+    </div>
+
+    <div class="wpsg_admin_content form-horizontal">
+
+        <?php $i = 0; foreach ($this->view['arSubAction'] as $k => $v) { $i ++; ?>
+        <div id="tab<?php echo $k; ?>" style="display:<?php echo ((wpsg_getStr($_COOKIE['wpsg_order_view_tab'], 'general') == $k)?'block':'none'); ?>;" class="wpsg_order_view_tab_content">
+
+            <?php echo $v['content']; ?>
+
+        </div>
+        <?php } ?>
+
+    </div>
+
+</div>
+
 <script type="text/javascript">/* <![CDATA[ */
 
-	function wpsg_editInvoiceAdress()
-	{
+    jQuery(document).ready(function() {
 
-		jQuery('#wpsg_InvoiceDialog').dialog( {                   
-	        'dialogClass': 'wp-dialog',           
-	        'modal': true,
-	        'width': 600,
-	        'title': '<?php echo __('Anschrift Ã€ndern (Kundendaten)', 'wpsg'); ?>',
-	        'autoOpen': true, 
-	        'closeOnEscape': true,      
-	        'buttons': {
-	            "<?php echo __('Speichern', 'wpsg'); ?>": function() {
+        jQuery('#wpsg_order_view_tabs a.list-group-item').bind('click', function() {
 
-					jQuery('#wpsg_backend_loading').show();
-					jQuery(this).dialog('close');
-	            							            	
-					jQuery.ajax( {
-						url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=saveInvoiceAdress&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
-						data: {
-							form_data: jQuery('#wpsg_InvoiceDialog input, #wpsg_InvoiceDialog select').serialize()
-						},
-						success: function(data) {
-							
-							location.href = location.href;
-							
-						}
-					} );
-	                
-	            }
-	        }
-	    } );
+            jQuery('#wpsg_order_view_tabs a').removeClass('active');
+            jQuery('.wpsg_order_view_tab_content').hide();
 
-		return false;
-		
-	}
- 
- 	function wpsg_reloadOrderLog()
-	{
+            jQuery(this).addClass('active');
+            jQuery('#tab' + jQuery(this).attr('wpsg-data-target')).show();
 
-		jQuery('#wpsg_orderlog_content').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-Order&action=ajax&wpsg_action=orderLog&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
-			success: function(data) {
-				jQuery('#wpsg_orderlog_content').html(data);
-			}
-		} );
-		
-		return false;
-	
-	} // function wpsg_reloadOrderLog()
+            jQuery.cookie('wpsg_order_view_tab', jQuery(this).attr('wpsg-data-target'));
+            jQuery(this).blur();
 
-	jQuery(document).ready(function() {
+        } );
 
-		jQuery('body').append('<div id="wpsg_backend_loading" style="display:none;"><div class="wpsg_inner"><?php echo __('Bestellung wird aktualisiert.', 'wpsg'); ?><br /><br /><img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" /></div></div>');
-		 
-		jQuery("#normal-sortables, #side-sortables").sortable({
-			connectWith: ".meta-box-sortables",
-			placeholder: 'wpsg_placeholder',
-			dropOnEmpty: true,
-			cursor: 'move',
-			grid: [50, 20], 
-			items: ".postbox",
-			handle: '.wpsg_handlediv',
-			forceHelperSize: true,
-			forcePlaceholderSize: true,
-			opacity: 0.8,
-			stop: function(e,ui) {
+    } );
 
-				var ser = jQuery("#normal-sortables").sortable("serialize");					
-				ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
-
-				jQuery.cookie('wpsg_order_view_normal', ser);
-
-				var ser = jQuery("#side-sortables").sortable("serialize");	 		
-				ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
-
-				jQuery.cookie('wpsg_order_view_side', ser);
-				
-			},
-			receive: function(e, ui) {
-			}
-		});  
-		
-		if (jQuery.cookie('wpsg_order_view_normal') != null)
-		{
-
-			var divs = jQuery.cookie('wpsg_order_view_normal').split(',').reverse();
-
-			for (index in divs)
-			{
-
-				jQuery('#normal-sortables').prepend(jQuery('#wpsg_' + divs[index]));
-				
-			}
-			
-		}
-		
-		if (jQuery.cookie('wpsg_order_view_side') != null)
-		{
-
-			var divs = jQuery.cookie('wpsg_order_view_side').split(',').reverse();
- 
-			for (index in divs)
-			{
-
-				jQuery('#side-sortables').prepend(jQuery('#wpsg_' + divs[index]));
-				
-			}
-			
-		}
-		
-		jQuery('.wpsg_handlediv').bind('click', function() { 
-			jQuery(this).next().toggle();
-
-			var arClose = new Array();
-			jQuery('.wpsg_order_view .postbox .inside:hidden').each(function() {
-				arClose.push(jQuery(this).parent().attr("id"));
-			} );
-
-			jQuery.cookie('wpsg_order_closed', arClose.join(','));
-			
-		} );
-
-		if (jQuery.cookie('wpsg_order_closed') != null)
-		{
-
-			var arClose = jQuery.cookie('wpsg_order_closed').split(',');
-
-			for (index in arClose)
-			{
-
-				if (arClose[index].length > 0) jQuery('#' + arClose[index] + ' .inside').hide();
-							
-			}
-			
-		} 
-		
-	} );
-	 
 /* ]]> */</script>
-
-<div class="wrap columns-2 wpsg_order_view">
-	<div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
-	<h2>
-		<?php echo wpsg_translate(__('Bestellung #1#', 'wpsg'), $this->view['data']['onr']); ?>
-	</h2>
-	<br />
-	<?php echo $this->writeBackendMessage(); ?>
-	
-	<div id="postbox" class="metabox-holder has-right-sidebar">
-
-		<div id="side-info-column" class="inner-sidebar" style="width:386px;">			
-			<div id="side-sortables" class="meta-box-sortables meta-box-sortables ui-sortable" style="width:380px;">
-						
-				<div id="wpsg_ranschrift" class="postbox">
-					<h3 class="wpsg_handlediv">
-						<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
-						<span><?php echo __('Kundendaten', 'wpsg'); ?></span>
-					</h3>
-					<div class="inside">
-					
-						<div class="wpsg_form_field">
-							<div class="wpsg_form_left">
-								<?php echo __('Kundennummer', 'wpsg'); ?>:
-							</div>
-							<div class="wpsg_form_right">
-								<p>					
-									<?php echo wpsg_hspc($this->view['data']['knr']); ?>
-									<?php if ($this->hasMod('wpsg_mod_kundenverwaltung')) { ?>
-									[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $this->view['data']['k_id']; ?>"><?php echo __('Zum Kunden', 'wpsg'); ?></a>&nbsp;]</a>
-									<?php } ?>
-								</p>						
-							</div>
-						</div>
-						<div class="wpsg_clear"></div>
-										
-						<div class="wpsg_form_field">
-							<div class="wpsg_form_left">
-								<?php echo __('Anschrift', 'wpsg'); ?>:
-								<a style="float:none; display:inline-block;" onclick="return wpsg_editInvoiceAdress();" class="wpsg_icon wpsg_icon_edit" href="#" title="<?php echo __('Rechnungsanschrift Ã€ndern', 'wpsg'); ?>"></a>
-							</div>
-							<div class="wpsg_form_right">
-								<p>		
-									<?php if (trim($this->view['data']['firma']) != '') { ?>			
-									<?php echo wpsg_hspc($this->view['data']['firma']); ?><br />
-									<?php } ?>	
-									<?php echo (($this->view['data']['title'] != '' && $this->view['data']['title'] != '-1')?wpsg_hspc($this->view['data']['title']).' ':''); ?><?php echo wpsg_hspc($this->view['data']['vname']); ?> <?php echo wpsg_hspc($this->view['data']['name']); ?><br />
-									<?php echo wpsg_hspc($this->view['data']['strasse']); ?><br />
-									<?php echo wpsg_hspc($this->view['data']['plz']); ?> <?php echo wpsg_hspc($this->view['data']['ort']); ?> <?php echo wpsg_hspc($this->view['country']['kuerzel']); ?><br />
-								</p>						
-							</div>
-						</div>
-						<div class="wpsg_clear"></div>
-						
-						<div id="wpsg_InvoiceDialog" class="wpsg_dialog" style="display:none;">
-							<?php echo wpsg_drawForm_Input('dialog_firma', __('Firma', 'wpsg'), $this->view['data']['firma']); ?>
-							<?php echo wpsg_drawForm_Select('dialog_title', __('Anschrift', 'wpsg'), $this->view['arTitles'], $this->view['data']['title'], array('noIndex' => true)); ?>
-							<?php echo wpsg_drawForm_Input('dialog_vname', __('Vorname', 'wpsg'), $this->view['data']['vname']); ?>
-							<?php echo wpsg_drawForm_Input('dialog_name', __('Name', 'wpsg'), $this->view['data']['name']); ?>
-							<?php echo wpsg_drawForm_Input('dialog_strasse', __('StraÃe', 'wpsg'), $this->view['data']['strasse']); ?>
-							<?php echo wpsg_drawForm_Input('dialog_plz', __('Postleitzahl', 'wpsg'), $this->view['data']['plz']); ?>
-							<?php echo wpsg_drawForm_Input('dialog_ort', __('Ort', 'wpsg'), $this->view['data']['ort']); ?>
-							<?php echo wpsg_drawForm_Select('dialog_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['data']['land']); ?>
-							<br />
-							<?php echo wpsg_drawForm_Checkbox('dialog_shipping', __('Auch Lieferanschrift anpassen', 'wpsg'), false); ?>
-						</div>
-						
-						<?php if (strtotime($this->view['data']['geb']) > 0) { ?>
-						<?php echo wpsg_drawForm_Input('', __('Geburtsdatum', 'wpsg'), wpsg_fromDate($this->view['data']['geb']), array('text' => true)); ?>
-						<?php } ?>
-						
-						<?php if (strlen($this->view['data']['fax']) > 0) { ?>
-						<?php echo wpsg_drawForm_Input('', __('Fax', 'wpsg'), $this->view['data']['fax'], array('text' => true)); ?>
-						<?php } ?>
-						
-						<?php if (strlen($this->view['data']['tel']) > 0) { ?>
-						<?php echo wpsg_drawForm_Input('', __('Telefon', 'wpsg'), $this->view['data']['tel'], array('text' => true)); ?>
-						<?php } ?>
-						
-						<?php if (strlen($this->view['data']['ustidnr']) > 0) { ?>
-						<?php echo wpsg_drawForm_Input('', __('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr'], array('text' => true)); ?>
-						<?php } ?>
-						
-						<div class="wpsg_form_field">
-							<div class="wpsg_form_left">
-								<?php echo __('E-Mail', 'wpsg'); ?>:
-							</div>
-							<div class="wpsg_form_right">
-								<p>					
-									<a href="mailto:<?php echo $this->view['data']['email']; ?>"><?php echo $this->view['data']['email']; ?></a>
-								</p>						
-							</div>
-						</div>
-						<div class="wpsg_clear"></div>
-						
-						<?php $this->callMods('wpsg_order_view_customerdata', array(&$this->view['data']['id'])); ?>		
-						
-					</div>
-				</div>
-								
-				<div id="wpsg_shippayment" class="postbox">
-					<h3 class="wpsg_handlediv">
-						<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
-						<span><?php echo __('Versand- und Zahlungsart', 'wpsg'); ?></span>
-					</h3>
-					<div class="inside">
-					
-						<div class="wpsg_form_field">
-							<div class="wpsg_form_left">
-								<?php echo __('Versandart', 'wpsg'); ?>:
-							</div>
-							<div class="wpsg_form_right">
-								<p>					
-									<?php echo wpsg_hspc($this->view['oOrder']->getShippingLabel()); ?>
-									<?php if (isset($this->view['basket']['sum']['preis_shipping']) && $this->view['basket']['sum']['preis_shipping'] > 0) { ?>
-									(<?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>)
-									<?php } ?>
-								</p>						
-							</div>
-						</div>
-						<div class="wpsg_clear"></div>
-					
-						<div class="wpsg_form_field">
-							<div class="wpsg_form_left">
-								<?php echo __('Zahlungsart', 'wpsg'); ?>:
-							</div>
-							<div class="wpsg_form_right">
-								<p>					
-																	
-									<?php echo __($this->view['arPayment'][$this->view['data']['type_payment']]['name'], 'wpsg'); ?>
-									<?php if (isset($this->view['basket']['sum']['preis_payment']) && $this->view['basket']['sum']['preis_payment'] > 0) { ?>
-									(<?php echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?>)
-									<?php } ?>
-									
-								</p>						
-							</div>
-						</div>
-						<div class="wpsg_clear"></div>
-						<?php $this->callMods('order_view_afterpayment', array(&$this->view['data']['id'])); ?>
-					
-					</div>
-				</div>
-				
-				<?php if (trim($this->view['data']['order_comment']) != '') { ?>
-				<div id="wpsg_comment" class="postbox">
-					<h3 class="wpsg_handlediv">
-						<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
-						<span><?php echo __('Bestellkommentar (Kunde)', 'wpsg'); ?></span>
-					</h3>
-					<div class="inside">
-						<?php echo wpsg_hspc($this->view['data']['order_comment']); ?>
-					</div>
-				</div>
-				<?php } ?>
-				
-				<div id="wpsg_admincomment" class="postbox">
-					<h3 class="wpsg_handlediv">
-						<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
-						<span><?php echo __('Bestellkommentar (Admin)', 'wpsg'); ?></span>
-					</h3> 
-					<div class="inside">
-						<form action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=setAdminComment&edit_id=<?php echo $this->view['data']['id']; ?>" method="post">
-							<textarea class="wpsg_order_admincomment" name="wpsg_order_admincomment"><?php echo wpsg_hspc($this->view['data']['admincomment']); ?></textarea>
-							<input class="button wpsg_order_admincomment_submit" type="submit" value="<?php echo __('Senden', 'wpsg'); ?>" name="admincomment_submit" />
-						</form>
-					</div>
-				</div>
-				
-				<?php $this->callMods('order_view_sidebar', array(&$this->view['data']['id'])); ?>
-				
-			</div>
-		</div>
-		
-		<div id="post-body">	
-			<div id="normal-sortables" class="meta-box-sortables" style="margin-right:400px;">	
-				<div class="postbox" id="wpsg_generally">		
-					<h3 class="wpsg_handlediv">
-						<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
-						<span><?php echo __('Allgemein', 'wpsg'); ?></span>
-					</h3>
-					<div class="inside wpsg_order_top">
-						
-						<div class="wpsg_form_field">
-							<div class="wpsg_form_left">
-								<?php echo __('Bestellnummer', 'wpsg'); ?>:
-							</div>
-							<div class="wpsg_form_right">
-								<p>					
-									<?php echo wpsg_hspc($this->view['data']['onr']); ?> [<?php echo wpsg_hspc($this->arStatus[$this->view['data']['status']]); ?>]
-								</p>						
-							</div>
-						</div>
-						<div class="wpsg_clear"></div>
-						
-						<?php if (wpsg_isSizedString($this->view['data']['language']) && $this->view['data']['language'] != $this->getCurrentLanguage()) { $arLang = $this->getStoreLanguages(); $lang = $arLang[$this->view['data']['language']]; ?>
-						<div class="wpsg_form_field">
-							<div class="wpsg_form_left">
-								<?php echo __('Sprache', 'wpsg'); ?>:
-							</div>
-							<div class="wpsg_form_right">
-								<p>
-									<img src="<?php echo $this->getFlagURL().$lang['flag']; ?>" alt="<?php echo wpsg_translate(__('Produkt fÃŒr Sprache #1# bearbeiten.', 'wpsg'), $lang['name']); ?>" />
-									<?php echo $lang['name']; ?>
-								</p>
-							</div>
-						</div>
-						<div class="wpsg_clear"></div>
-						<?php } ?>
-						
-						<div class="wpsg_form_field">
-							<div class="wpsg_form_left">
-								<?php echo __('Bestelleingang', 'wpsg'); ?>:
-							</div>
-							<div class="wpsg_form_right">
-								<p>					
-									<?php echo date('d.m.Y H:i:s', strtotime($this->view['data']['cdate'])); ?>
-								</p>						
-							</div>
-						</div>
-						<div class="wpsg_clear"></div>
-						
-						<form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=switchStatus&amp;edit_id=<?php echo $this->view['data']['id']; ?>&amp;noheader=1" enctype="multipart/form-data">
-						<div class="wpsg_form_field">
-							<div class="wpsg_form_left">
-								<?php echo __('StatusÃ€nderung', 'wpsg'); ?>:
-							</div>
-							<div class="wpsg_form_right">								
-									<select id="wpsg_order_view_status" name="status" style="float:left;">
-										<?php foreach ($this->arStatus as $k => $v) { ?>
-										<option value="<?php echo wpsg_hspc($k); ?>" <?php echo (($k == $this->view['data']['status'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($v); ?></option>
-										<?php } ?>					
-									</select>
-									&nbsp;<input style="width:auto;" type="submit" class="button wpsg_button" id="wpsg_order_view_status_submit" name="wpsg_statusaenderung" value="<?php echo __('Status Ã€ndern', 'wpsg'); ?>" />
-									<div class="wpsg_clear"></div>
-									<label style="line-height:250%;">
-										<input style="width:auto;" type="checkbox" value="1" name="sendMail" /> <?php echo __('Kunde informieren', 'wpsg'); ?>
-									</label>
-							</div>
-						</div>
-						<div class="wpsg_clear"></div> 
-						<?php $this->callMods('order_view_switchStatus', array(&$this->view['data']['id'])); ?>						
-						</form>
-						
-						<?php if (wpsg_isSizedInt($this->get_option('wpsg_debugModus'))) { ?>
-						<div class="wpsg_form_field">
-							<div class="wpsg_form_left">
-								<span class="wpsg_developer"><?php echo __('Entwickler Optionen', 'wpsg'); ?>:</span>
-							</div>
-							<div class="wpsg_form_right">
-								<span class="wpsg_developer">
-									<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_customermail&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Kundenmail simulieren (An Shop Betreiber)', 'wpsg'); ?></a><br />
-									<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_adminmail&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Adminmail simulieren', 'wpsg'); ?></a><br />
-									<a href="<?php echo $this->getDoneURL($this->view['data']['id']); ?>"><?php echo __('BestellabschluÃseite', 'wpsg'); ?></a><br />
-									<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_urlbuy&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('URL Benachrichtigung (Kauf) auslÃ¶sen', 'wpsg'); ?></a><br />
-									<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_urlpay&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('URL Benachrichtigung (Bezahlung) auslÃ¶sen', 'wpsg'); ?></a><br />
-									<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>&debugBasket=1"><?php echo __('Warenkorbdaten anzeigen', 'wpsg'); ?></a><br />
-									<?php if (wpsg_isSizedInt($_REQUEST['debugBasket'])) { ?>
-									<?php wpsg_debug($this->view['basket']); ?>
-									<?php } ?>
-								</span>
-							</div>
-						</div>
-						<div class="wpsg_clear"></div>
-						<?php } ?>
-						
-					</div>					
-				</div>
-							  
-				<div class="postbox" id="wpsg_orderdata">		
-					<h3 class="wpsg_handlediv">
-						<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
-						<span><?php echo __('Bestelldaten', 'wpsg'); ?></span>
-					</h3>
-					<div class="inside">						
-						<table class="wpsg_produkte">
-							<tr class="wpsg_kopf">
-								<th class="wpsg_cell_name"><?php echo __('Produktname', 'wpsg'); ?></th>
-								<th class="wpsg_cell_preis"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
-								<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
-								<th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
-								<?php } ?>
-								<th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>
-								<th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
-							</tr>
-							<?php $i = 0; foreach ($this->view['basket']['produkte'] as $produkt_key => $p) { $i ++; ?>
-							<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
-								<td class="wpsg_cell_name">
-									<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id=<?php echo $this->getProduktID($p['id']); ?>" title="<?php echo __('Zum Produkt', 'wpsg'); ?>">
-										<?php echo wpsg_hspc($this->getProductName($this->getProduktID($p['id']))); ?>
-									</a>
-								</td>
-								<td class="wpsg_cell_preis"><?php echo wpsg_ff($p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
-								<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
-								<td class="wpsg_cell_mwst"><?php echo wpsg_ff($p['mwst_value']); ?> %</td>				
-								<?php } ?>
-								<td class="wpsg_cell_menge"><?php echo wpsg_hspc($p['menge']); ?></td>
-								<td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['menge'] * $p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
-							</tr>
-							<?php if (wpsg_isSizedArray($p['order_allowedshipping'])) { ?>
-							<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
-								<td class="wpsg_cell_name">
-									<?php echo __('MÃ¶gliche Versandarten', 'wpsg'); ?>: 
-								</td>
-								<td class="wpsg_cell_gesamtpreis" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?4:3); ?>">
-									<?php $j = 0; foreach ($p['order_allowedshipping'] as $shipping) { $j ++; ?>
-									<?php echo $this->getShippingName($shipping); ?><?php if ($j < sizeof($p['order_allowedshipping'])) { ?>, <?php } ?>
-									<?php } ?> 
-								</td>								
-							</tr>
-							<?php } ?>
-							<?php $this->callMods('order_view_row', array(&$p, $i)); ?>							
-							<?php } ?>
-							<?php if (isset($this->view['basket']['gs'])) { ?>
-							<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_gutschein">
-								<td class="wpsg_cell_name"><?php echo __('Gutschein', 'wpsg'); ?> <?php echo ($this->view['basket']['gs']['code'] != '')? '('.$this->view['basket']['gs']['code'].')':'' ?></td>
-								<td class="wpsg_cell_preis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
-								<?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
-								<td class="wpsg_cell_mwst"><?php echo __('anteilig', 'wpsg'); ?></td>
-								<?php } ?>
-								<td class="wpsg_cell_menge">1</td>
-								<td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
-							</tr>
-							<?php } ?>
-							<?php if (isset($this->view['basket']['sum']['preis_rabatt']) && $this->view['basket']['sum']['preis_rabatt'] > 0) { ?>
-							<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_row_rabatt">
-								<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_rabatt_label">
-									<?php echo __('AbzÃŒglich Rabatt', 'wpsg'); ?>
-								</td>
-								<td class="wpsg_cell_rabatt_value">
-									<?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
-								</td>
-							</tr>
-							<?php } ?>							
-							<tr class="wpsg_row_summe">
-								<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
-									<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
-										<?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
-									<?php } else { ?>
-										<?php if ($this->getFrontendTaxview() == 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>'); ?>
-										<?php } else { ?>
-										<?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
-										<?php } ?>
-									<?php } ?>
-								</td>
-								<td class="wpsg_cell_summe_value">
-									<?php echo wpsg_ff($this->view['basket']['sum']['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
-								</td>
-							</tr>	
-							<?php if ($this->view['basket']['sum']['preis_shipping'] != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
-							<tr class="wpsg_row_shipping">
-								<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>			
-								</td>
-								<td class="wpsg_cell_shipping_value">
-									<?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
-								</td>
-							</tr>
-							<?php } ?>
-							<?php if ($this->view['basket']['sum']['preis_payment'] != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
-							<tr class="wpsg_row_payment">
-								<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_payment_label">
-									<?php echo __('Zahlungsart', 'wpsg'); ?>
-								</td>
-								<td class="wpsg_cell_payment_value">
-									<?php echo wpsg_ff($this->view['basket']['sum']['preis_payment']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
-								</td>
-							</tr>
-							<?php } ?>
-							<?php if ($this->get_option('wpsg_preisangaben') == '1' && $this->get_option('wpsg_kleinunternehmer') != '1') { ?>
-							<?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
-							<tr class="wpsg_row_mwst">
-								<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
-									<?php echo wpsg_translate(__('zuzÃŒglich MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
-								</td>
-								<td class="wpsg_cell_mwst_value">
-									<?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
-								</td>
-							</tr>
-							<?php } ?>
-							<?php } ?>
-							<tr class="wpsg_row_gesamt">
-								<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
-									<?php echo __('Gesamtpreis', 'wpsg'); ?>
-								</td>
-								<td class="wpsg_cell_gesamt_value">
-									<?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
-								</td>
-							</tr>		
-							<?php if ($this->get_option('wpsg_kleinunternehmer') == '1' || $this->get_option('wpsg_preisangaben') != '1') { ?>
-							<?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
-							<tr class="wpsg_row_mwst">
-								<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
-									<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
-										<?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
-									<?php } else { ?>
-										<?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
-									<?php } ?>
-								</td>
-								<td class="wpsg_cell_mwst_value">
-									<?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
-								</td>
-							</tr>
-							<?php } ?>
-							<?php } ?>
-						</table>
-						
-					</div>
-				</div>
-				
-				<?php $this->callMods('order_view_content', array($this->view['data']['id'])); ?>
-				
-				<div class="postbox" id="wpsg_orderlog">		
-					<h3 class="wpsg_handlediv">
-						<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
-						<span><?php echo __('Bestellprotokoll', 'wpsg'); ?></span>
-					</h3>
-					<div class="inside" id="wpsg_orderlog_content">
-						<?php echo $this->view['orderLog']; ?>
-					</div>
-				</div>
-				
-			</div>
-						
-		</div>
-		
-	</div>
-	
-</div>
Index: /views/order/view_customerdata.phtml
===================================================================
--- /views/order/view_customerdata.phtml	(revision 5720)
+++ /views/order/view_customerdata.phtml	(revision 5720)
@@ -0,0 +1,112 @@
+<?php
+
+    /**
+     * User: Daschmi (daschmi@daschmi.de)
+     * Date: 07.08.2016
+     * Time: 10:40
+     */
+
+?>
+
+<div class="modal fade" tabindex="-1" role="dialog" id="wpsg_customer_edit">
+    <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"><?php echo __('Kundendaten beatbeiten', 'wpsg'); ?></h4>
+            </div>
+            <div class="modal-body">
+
+                <?php echo wpsg_drawForm_Input('dialog_firma', __('Firma', 'wpsg'), $this->view['data']['firma']); ?>
+                <?php echo wpsg_drawForm_Select('dialog_title', __('Anschrift', 'wpsg'), $this->view['arTitles'], $this->view['data']['title'], array('noIndex' => true)); ?>
+                <?php echo wpsg_drawForm_Input('dialog_vname', __('Vorname', 'wpsg'), $this->view['data']['vname']); ?>
+                <?php echo wpsg_drawForm_Input('dialog_name', __('Name', 'wpsg'), $this->view['data']['name']); ?>
+                <?php echo wpsg_drawForm_Input('dialog_strasse', __('StraÃe', 'wpsg'), $this->view['data']['strasse']); ?>
+                <?php echo wpsg_drawForm_Input('dialog_plz', __('Postleitzahl', 'wpsg'), $this->view['data']['plz']); ?>
+                <?php echo wpsg_drawForm_Input('dialog_ort', __('Ort', 'wpsg'), $this->view['data']['ort']); ?>
+                <?php echo wpsg_drawForm_Select('dialog_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['data']['land']); ?>
+
+                <br />
+
+                <?php echo wpsg_drawForm_Checkbox('dialog_shipping', __('Auch Lieferanschrift anpassen', 'wpsg'), false); ?>
+
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('SchlieÃen', 'wpsg'); ?></button>
+                <button type="button" class="btn btn-primary" onclick="return wpsg_saveInvoiceAdress();"><?php echo __('Speichern', 'wpsg'); ?></button>
+            </div>
+        </div>
+    </div>
+</div>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Kundendaten', 'wpsg')); ?>
+
+    <?php echo wpsg_drawForm_TextStart(); ?>
+    <?php echo $this->view['oOrder']->getCustomer()->getNr(); ?>
+    <?php if ($this->hasMod('wpsg_mod_kundenverwaltung')) { ?>
+	[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $this->view['data']['k_id']; ?>"><?php echo __('Zum Kunden', 'wpsg'); ?></a>&nbsp;]</a>
+	<?php } ?>
+    <?php echo wpsg_drawForm_TextEnd(__('Kundennummer:', 'wpsg')); ?>
+
+    <?php echo wpsg_drawForm_TextStart(); ?>
+    <?php if (trim($this->view['data']['firma']) != '') { ?>
+    <?php echo wpsg_hspc($this->view['data']['firma']); ?><br />
+    <?php } ?>
+    <?php echo (($this->view['data']['title'] != '' && $this->view['data']['title'] != '-1')?wpsg_hspc($this->view['arTitles'][$this->view['data']['title']]).' ':''); ?><?php echo wpsg_hspc($this->view['data']['vname']); ?> <?php echo wpsg_hspc($this->view['data']['name']); ?><br />
+    <?php echo wpsg_hspc($this->view['data']['strasse']); ?><br />
+    <?php echo wpsg_hspc($this->view['data']['plz']); ?> <?php echo wpsg_hspc($this->view['data']['ort']); ?> <?php echo wpsg_hspc($this->view['country']['kuerzel']); ?><br />
+
+    <a style="position: absolute; right:25px; top:10px; display:inline-block;" data-toggle="modal" data-target="#wpsg_customer_edit" href="#" title="<?php echo __('Rechnungsanschrift Ã€ndern', 'wpsg'); ?>">
+        <span class="glyphicon glyphicon-pencil"></span>
+    </a>
+
+    <?php echo wpsg_drawForm_TextEnd(__('Anschrift:', 'wpsg')); ?>
+
+    <?php if (strtotime($this->view['data']['geb']) > 0) { ?>
+    <?php echo wpsg_drawForm_Input('', __('Geburtsdatum', 'wpsg'), wpsg_fromDate($this->view['data']['geb']), array('text' => true)); ?>
+    <?php } ?>
+
+    <?php if (strlen($this->view['data']['fax']) > 0) { ?>
+    <?php echo wpsg_drawForm_Input('', __('Fax', 'wpsg'), $this->view['data']['fax'], array('text' => true)); ?>
+    <?php } ?>
+
+    <?php if (strlen($this->view['data']['tel']) > 0) { ?>
+    <?php echo wpsg_drawForm_Input('', __('Telefon', 'wpsg'), $this->view['data']['tel'], array('text' => true)); ?>
+    <?php } ?>
+
+    <?php if (strlen($this->view['data']['ustidnr']) > 0) { ?>
+    <?php echo wpsg_drawForm_Input('', __('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr'], array('text' => true)); ?>
+    <?php } ?>
+
+    <?php $this->callMods('wpsg_order_view_customerdata', array(&$this->view['data']['id'])); ?>
+
+    <?php echo wpsg_drawForm_TextStart(); ?>
+    <a href="mailto:<?php echo $this->view['data']['email']; ?>"><?php echo $this->view['data']['email']; ?></a>
+    <?php echo wpsg_drawForm_TextEnd(__('E-Mail:', 'wpsg')); ?>
+
+    <script type="text/javascript">/* <![CDATA[ */
+
+        function wpsg_saveInvoiceAdress()
+        {
+
+            jQuery('#wpsg_backend_loading').show();
+            
+            jQuery.ajax( {
+                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=saveInvoiceAdress&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
+                data: {
+                    form_data: jQuery('#wpsg_customer_edit input, #wpsg_customer_edit select').serialize()
+                },
+                success: function(data) {
+
+                    location.href = location.href;
+
+                }
+            } );
+
+            return false;
+
+        }
+
+    /* ]]> */</script>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
Index: /views/order/view_dev.phtml
===================================================================
--- /views/order/view_dev.phtml	(revision 5720)
+++ /views/order/view_dev.phtml	(revision 5720)
@@ -0,0 +1,32 @@
+<?php
+
+    /**
+     * User: Daschmi (daschmi@daschmi.de)
+     * Date: 07.08.2016
+     * Time: 10:51
+     */
+
+?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Entwickleroptionen', 'wpsg')); ?>
+
+    <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_customermail&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Kundenmail simulieren (An Shop Betreiber)', 'wpsg'); ?></a><br />
+    <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_adminmail&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Adminmail simulieren', 'wpsg'); ?></a><br />
+    <a href="<?php echo $this->getDoneURL($this->view['data']['id']); ?>"><?php echo __('BestellabschluÃseite', 'wpsg'); ?></a><br />
+    <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_urlbuy&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('URL Benachrichtigung (Kauf) auslÃ¶sen', 'wpsg'); ?></a><br />
+    <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_urlpay&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('URL Benachrichtigung (Bezahlung) auslÃ¶sen', 'wpsg'); ?></a><br />
+
+    <br />
+
+    <div class="panel panel-default">
+        <div class="panel-heading" data-toggle="collapse" href="#collapse_basket" style="cursor:pointer;">
+            <h4 class="panel-title"><?php echo __('Warenkorbdaten', 'wpsg'); ?></h4>
+        </div>
+        <div id="collapse_basket" class="panel-collapse collapse">
+            <div class="panel-body">
+                <pre><?php wpsg_debug($this->view['basket']); ?></pre>
+            </div>
+        </div>
+    </div>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
Index: /views/order/view_general.phtml
===================================================================
--- /views/order/view_general.phtml	(revision 5720)
+++ /views/order/view_general.phtml	(revision 5720)
@@ -0,0 +1,32 @@
+<?php
+
+    /**
+     * User: Daschmi (daschmi@daschmi.de)
+     * Date: 06.08.2016
+     * Time: 11:22
+     */
+
+?>
+<?php echo wpsg_drawForm_AdminboxStart(__('Allgemein', 'wpsg')); ?>
+
+    <?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(__('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'])); ?>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('StatusÃ€nderung', 'wpsg')); ?>
+<form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=switchStatus&amp;edit_id=<?php echo $this->view['data']['id']; ?>&amp;noheader=1" enctype="multipart/form-data">
+
+    <?php echo wpsg_drawForm_Select('status', __('Neuer Status', 'wpsg'), $this->arStatus, $this->view['data']['status']); ?>
+    <?php echo wpsg_drawForm_Checkbox('sendMail', __('Kunden informieren', 'wpsg'), 0); ?>
+
+    <br />
+
+    <?php echo wpsg_drawForm_TextStart(); ?>
+    <input type="submit" class="button" value="<?php echo __('Status Ã€ndern', 'wpsg'); ?>" />
+    <?php echo wpsg_drawForm_TextEnd(); ?>
+
+</form>
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
Index: /views/order/view_orderdata.phtml
===================================================================
--- /views/order/view_orderdata.phtml	(revision 5720)
+++ /views/order/view_orderdata.phtml	(revision 5720)
@@ -0,0 +1,144 @@
+<?php
+
+    /**
+     * User: Daschmi (daschmi@dsachmi.de)
+     * Date: 06.08.2016
+     * Time: 13:45
+     */
+
+?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Bestelldaten', 'wpsg')); ?>
+    <table class="wpsg_produkte table">
+        <tr class="wpsg_kopf">
+            <th class="wpsg_cell_name"><?php echo __('Produktname', 'wpsg'); ?></th>
+            <th class="wpsg_cell_preis"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
+            <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+            <th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
+            <?php } ?>
+            <th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>
+            <th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
+        </tr>
+        <?php $i = 0; foreach ($this->view['basket']['produkte'] as $produkt_key => $p) { $i ++; ?>
+        <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+            <td class="wpsg_cell_name">
+                <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id=<?php echo $this->getProduktID($p['id']); ?>" title="<?php echo __('Zum Produkt', 'wpsg'); ?>">
+                    <?php echo wpsg_hspc($this->getProductName($this->getProduktID($p['id']))); ?>
+                </a>
+            </td>
+            <td class="wpsg_cell_preis"><?php echo wpsg_ff($p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
+            <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+            <td class="wpsg_cell_mwst"><?php echo wpsg_ff($p['mwst_value']); ?> %</td>
+            <?php } ?>
+            <td class="wpsg_cell_menge"><?php echo wpsg_hspc($p['menge']); ?></td>
+            <td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['menge'] * $p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
+        </tr>
+        <?php if (wpsg_isSizedArray($p['order_allowedshipping'])) { ?>
+        <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+            <td class="wpsg_cell_name">
+                <?php echo __('MÃ¶gliche Versandarten', 'wpsg'); ?>:
+            </td>
+            <td class="wpsg_cell_gesamtpreis" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?4:3); ?>">
+                <?php $j = 0; foreach ($p['order_allowedshipping'] as $shipping) { $j ++; ?>
+                <?php echo $this->getShippingName($shipping); ?><?php if ($j < sizeof($p['order_allowedshipping'])) { ?>, <?php } ?>
+                <?php } ?>
+            </td>
+        </tr>
+        <?php } ?>
+        <?php $this->callMods('order_view_row', array(&$p, $i)); ?>
+        <?php } ?>
+        <?php if (isset($this->view['basket']['gs'])) { ?>
+        <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_gutschein">
+            <td class="wpsg_cell_name"><?php echo __('Gutschein', 'wpsg'); ?> <?php echo ($this->view['basket']['gs']['code'] != '')? '('.$this->view['basket']['gs']['code'].')':'' ?></td>
+            <td class="wpsg_cell_preis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
+            <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+            <td class="wpsg_cell_mwst"><?php echo __('anteilig', 'wpsg'); ?></td>
+            <?php } ?>
+            <td class="wpsg_cell_menge">1</td>
+            <td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
+        </tr>
+        <?php } ?>
+        <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && $this->view['basket']['sum']['preis_rabatt'] > 0) { ?>
+        <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_row_rabatt">
+            <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_rabatt_label">
+                <?php echo __('AbzÃŒglich Rabatt', 'wpsg'); ?>
+            </td>
+            <td class="wpsg_cell_rabatt_value wpsg_cell_gesamtpreis">
+                <?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
+            </td>
+        </tr>
+        <?php } ?>
+        <tr class="wpsg_row_summe">
+            <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
+                <?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
+                    <?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+                <?php } else { ?>
+                    <?php if ($this->getFrontendTaxview() == 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>'); ?>
+                    <?php } else { ?>
+                    <?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+                    <?php } ?>
+                <?php } ?>
+            </td>
+            <td class="wpsg_cell_summe_value wpsg_cell_gesamtpreis">
+                <?php echo wpsg_ff($this->view['basket']['sum']['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+            </td>
+        </tr>
+        <?php if ($this->view['basket']['sum']['preis_shipping'] != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
+        <tr class="wpsg_row_shipping">
+            <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>
+            </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'); ?>
+            </td>
+        </tr>
+        <?php } ?>
+        <?php if ($this->view['basket']['sum']['preis_payment'] != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
+        <tr class="wpsg_row_payment">
+            <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_payment_label">
+                <?php echo __('Zahlungsart', 'wpsg'); ?>
+            </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'); ?>
+            </td>
+        </tr>
+        <?php } ?>
+        <?php if ($this->get_option('wpsg_preisangaben') == '1' && $this->get_option('wpsg_kleinunternehmer') != '1') { ?>
+        <?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
+        <tr class="wpsg_row_mwst">
+            <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
+                <?php echo wpsg_translate(__('zuzÃŒglich MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
+            </td>
+            <td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
+                <?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+            </td>
+        </tr>
+        <?php } ?>
+        <?php } ?>
+        <tr class="wpsg_row_gesamt">
+            <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
+                <?php echo __('Gesamtpreis', 'wpsg'); ?>
+            </td>
+            <td class="wpsg_cell_gesamt_value wpsg_cell_gesamtpreis">
+                <strong><?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?></strong>
+            </td>
+        </tr>
+        <?php if ($this->get_option('wpsg_kleinunternehmer') == '1' || $this->get_option('wpsg_preisangaben') != '1') { ?>
+        <?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
+        <tr class="wpsg_row_mwst">
+            <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
+                <?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
+                    <?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
+                <?php } else { ?>
+                    <?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
+                <?php } ?>
+            </td>
+            <td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
+                <?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+            </td>
+        </tr>
+        <?php } ?>
+        <?php } ?>
+    </table>
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
Index: /views/order/view_orderlog.phtml
===================================================================
--- /views/order/view_orderlog.phtml	(revision 5720)
+++ /views/order/view_orderlog.phtml	(revision 5720)
@@ -0,0 +1,28 @@
+<?php
+
+    /**
+     * User: Daschmi (daschmi@daschmi.de)
+     * Date: 06.08.2016
+     * Time: 11:24
+     */
+
+?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Bestellprotokoll', 'wpsg')); ?>
+<div class="panel-group">
+    <?php foreach ($this->view['oOrder']->getLog() as $k => $ol) { ?>
+    <div class="panel panel-default">
+        <div class="panel-heading" data-toggle="collapse" href="#collapse<?php echo $k; ?>" style="cursor:pointer;">
+            <h4 class="panel-title" style="float:right;"><?php echo wpsg_formatTimestamp($ol['cdate']); ?></h4>
+            <h4 class="panel-title"><?php echo $ol['title']; ?></h4>
+        </div>
+        <div id="collapse<?php echo $k; ?>" class="panel-collapse collapse">
+            <div class="panel-body">
+                <pre><?php echo $ol['mailtext']; ?></pre>
+            </div>
+        </div>
+    </div>
+    <?php } ?>
+</div>
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
+
Index: /views/order/view_shippay.phtml
===================================================================
--- /views/order/view_shippay.phtml	(revision 5720)
+++ /views/order/view_shippay.phtml	(revision 5720)
@@ -0,0 +1,31 @@
+<?php
+
+    /**
+     * User: Daschmi (daschmi@daschmi.de)
+     * Date: 07.08.2016
+     * Time: 10:52
+     */
+
+?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Versand- und Zahlungsart', 'wpsg')); ?>
+
+    <?php echo wpsg_drawForm_TextStart(); ?>
+        <?php echo wpsg_hspc($this->view['oOrder']->getShippingLabel()); ?>
+        <?php $shippingCost = $this->view['oOrder']->getShippingAmount($this->getBackendTaxview()); ?>
+        <?php if ($shippingCost > 0) { ?>
+        (<?php echo wpsg_ff($shippingCost, $this->get_option('wpsg_currency')); ?>)
+        <?php } ?>
+    <?php echo wpsg_drawForm_TextEnd(__('Versandart:', 'wpsg')); ?>
+
+    <?php echo wpsg_drawForm_TextStart(); ?>
+        <?php echo wpsg_hspc($this->view['oOrder']->getPaymentLabel()); ?>
+        <?php $paymentCost = $this->view['oOrder']->getPaymentAmount($this->getBackendTaxview()); ?>
+        <?php if ($paymentCost > 0) { ?>
+        (<?php echo wpsg_ff($paymentCost, $this->get_option('wpsg_currency')); ?>)
+        <?php } ?>
+    <?php echo wpsg_drawForm_TextEnd(__('Zahlungsart:', 'wpsg')); ?>
+
+    <?php $this->callMods('order_view_afterpayment', array(&$this->view['data']['id'])); ?>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
Index: /views/produkt/addedit.phtml
===================================================================
--- /views/produkt/addedit.phtml	(revision 5717)
+++ /views/produkt/addedit.phtml	(revision 5720)
@@ -33,5 +33,5 @@
 			
 				<?php if (wpsg_isSizedInt($this->view['data']['id'])) { ?>
-				<span class="list-group-head list-group-item"><?php echo wpsg_translate(__('Produkt ID:#1#: <span style="float:right;"><a href="#2#" title="Produkt im Frontend ansehen" target="_blank"><span class="glyphicon glyphicon-new-window"></span></a></span>', 'wpsg'), $this->view['data']['id'], $this->view['oProduct']->getProductURL()); ?></span>
+				<span class="list-group-head list-group-item"><?php echo wpsg_translate(__('Produkt ID:#1# <span style="float:right;"><a href="#2#" title="Produkt im Frontend ansehen" target="_blank"><span class="glyphicon glyphicon-new-window"></span></a></span>', 'wpsg'), $this->view['data']['id'], $this->view['oProduct']->getProductURL()); ?></span>
 				<?php } else { ?>
 				<span class="list-group-head list-group-item"><?php echo __('Neues Produkt', 'wpsg'); ?></span>
