Index: /changelog
===================================================================
--- /changelog	(revision 8455)
+++ /changelog	(revision 8456)
@@ -644,2 +644,3 @@
 #4.4.11
 - Bugfix: Korrektur von Rechnungen mit Gutscheinen die zum Rechnungszeitpunkt nicht mehr gÃŒltig sind
+- Feature: eInvoice RechnungsempfÃ€nger unabhÃ€ngig von E-Mail des Kunden
Index: /controller/wpsg_OrderController.class.php
===================================================================
--- /controller/wpsg_OrderController.class.php	(revision 8455)
+++ /controller/wpsg_OrderController.class.php	(revision 8456)
@@ -869,5 +869,5 @@
 					$customer_id = $this->db->fetchOne("SELECT `k_id` FROM `".WPSG_TBL_ORDER."` WHERE `id` = '".wpsg_q($_REQUEST['edit_id'])."' ");
 					$arOrder = $this->db->fetchAssocField("SELECT `id` FROM `".WPSG_TBL_ORDER."` WHERE `k_id` = '".wpsg_q($customer_id)."' ");
-
+					
 				}
 				else
@@ -917,5 +917,6 @@
 						
 						$this->db->UpdateQuery(WPSG_TBL_KU, [
-							'ustidnr' => wpsg_q($form_data['dialog_ustidnr'])
+							'ustidnr' => wpsg_q($form_data['dialog_ustidnr']),
+							'email_einvoice' => wpsg_q($form_data['email_einvoice'])
 						], " `id` = '".wpsg_q($oOrder->getCustomer()->id)."' ");
 						
Index: /lib/functions.inc.php
===================================================================
--- /lib/functions.inc.php	(revision 8455)
+++ /lib/functions.inc.php	(revision 8456)
@@ -157,9 +157,9 @@
 	 * @param String $val
 	 */
-	function wpsg_isValidEMail(&$val)
-	{
-		
-		if (wpsg_isSizedString($val) && strpos($val, '@') !== false) return true;
-		else return false;
+	function wpsg_isValidEMail(string &$val): bool {
+		
+		if (!isset($val)) return false;
+		
+		return filter_var($val, FILTER_VALIDATE_EMAIL);
 		
 	} // function wpsg_isValidEMail($val)
Index: /lib/install.php
===================================================================
--- /lib/install.php	(revision 8455)
+++ /lib/install.php	(revision 8456)
@@ -98,4 +98,5 @@
    		status VARCHAR(255) NOT NULL,
    		email VARCHAR(500) NOT NULL COMMENT 'E-Mail Adresse des Kunden',
+   		email_einvoice VARCHAR(500) NOT NULL COMMENT 'E-Mail Adresse fÃŒr eRechnung',
    		ustidnr VARCHAR(100) NOT NULL,   		
    		custom TEXT NOT NULL,
Index: /lib/wpsg_basket.class.php
===================================================================
--- /lib/wpsg_basket.class.php	(revision 8455)
+++ /lib/wpsg_basket.class.php	(revision 8456)
@@ -733,4 +733,5 @@
 				$data = array(
 					'email' => wpsg_q(wpsg_getStr($this->arCheckout['email'])),
+					'email_einvoice' => $this->arCheckout['email_einvoice']??'',
 					'invisible' => 1,
 					'geb' => wpsg_q(wpsg_toDate(wpsg_getStr($this->arCheckout['geb']))),
@@ -1088,4 +1089,16 @@
 					$_SESSION['wpsg']['errorFields'][] = 'email';
 					$bError = true;
+					
+				}
+				
+				if (intval($custom_config['eInvoice']) === 1 && trim($this->arCheckout['email_einvoice']??'') !== '') { // e-Mail fÃŒr eRechnung wird abgefragt und ist angegeben
+					
+					if (!wpsg_isValidEMail($this->arCheckout['email_einvoice'])) {
+						
+						$this->shop->addFrontendError(__('Bitte die Eingabe der E-Mail Adresse fÃŒr eRechnung ÃŒberprÃŒfen!', 'wpsg'));
+						$_SESSION['wpsg']['errorFields'][] = 'einvoice_input';
+						$bError = true;
+						
+					}
 					
 				}
Index: /model/wpsg_customer.class.php
===================================================================
--- /model/wpsg_customer.class.php	(revision 8455)
+++ /model/wpsg_customer.class.php	(revision 8456)
@@ -397,5 +397,20 @@
 			
 		} // public function getBirthdate()
- 
+		
+		/**
+		 * Gibt die optionale E-Mail Adresse fÃŒr eRechnungen zurÃŒck
+		 * @return string|null
+		 */
+		public function getEMailEInvoice(): ?string {
+			
+			if (!$this->isLoaded()) return '';
+			
+			$email_einvoice = $this->__get('email_einvoice');
+			
+			if (trim($email_einvoice) !== '' && filter_var($email_einvoice, FILTER_VALIDATE_EMAIL)) return $email_einvoice;
+			else return null;
+			
+		}
+		
 		/**
 		 * Gibt die EMail des Kunden zurÃŒck 
Index: /mods/mod_rechnungen/wpsg_invoice.php
===================================================================
--- /mods/mod_rechnungen/wpsg_invoice.php	(revision 8455)
+++ /mods/mod_rechnungen/wpsg_invoice.php	(revision 8456)
@@ -264,4 +264,13 @@
             return \wpsg_order::getInstance($this->getOrderIds()[0]);
 
+		}
+		
+		public function getCustomer(): ?\wpsg_customer {
+			
+			$oCustomer = $this->getOrder()->getCustomer();
+			
+			if ($oCustomer === false) return null;
+			else return $oCustomer;
+			
 		}
 
Index: /mods/wpsg_mod_kundenverwaltung.class.php
===================================================================
--- /mods/wpsg_mod_kundenverwaltung.class.php	(revision 8455)
+++ /mods/wpsg_mod_kundenverwaltung.class.php	(revision 8456)
@@ -1939,4 +1939,5 @@
 			wpsg_checkRequest('knr', [WPSG_SANITIZE_TEXTFIELD], __('Kundennummer', 'wpsg'), $data);
 			wpsg_checkRequest('email', [WPSG_SANITIZE_EMAIL, ['allowEmpty' => true]], __('E-Mail', 'wpsg'), $data);
+			wpsg_checkRequest('email_einvoice', [WPSG_SANITIZE_EMAIL, ['allowEmpty' => true]], __('E-Mail fÃŒr eRechnung', 'wpsg'), $data);
 			wpsg_checkRequest('ustidnr', [WPSG_SANITIZE_USTIDNR, ['allowEmpty' => true]], __('UStIdNr.', 'wpsg'), $data);
 			wpsg_checkRequest('comment', [WPSG_SANITIZE_TEXTAREA], __('Kundenkommentar', 'wpsg'), $data);
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 8455)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 8456)
@@ -660,4 +660,9 @@
 				
 				$email = $this->shop->view['kunde']['email'];
+				
+				$oCustomer = $oInvoice->getCustomer();
+				$email_einvoice = $oCustomer->getEMailEInvoice();
+				
+				if ($email_einvoice !== null) $email = $email_einvoice;
 
                 $rn_file = $oInvoice->getFilePath();
Index: /views/admin/kundendaten_tab1.phtml
===================================================================
--- /views/admin/kundendaten_tab1.phtml	(revision 8455)
+++ /views/admin/kundendaten_tab1.phtml	(revision 8456)
@@ -21,4 +21,5 @@
 <?php echo wpsg_drawForm_Select('pflicht[email]', __('E-Mail Adresse', 'wpsg'), $arSelect, $this->view['pflicht']['email'])?>
 <?php echo wpsg_drawForm_Checkbox('pflicht[emailconfirm]', __('E-Mail Adresse (Wiederholung)', 'wpsg'), $this->view['pflicht']['emailconfirm']); ?>
+<?php echo wpsg_drawForm_Checkbox('pflicht[eInvoice]', __('E-Mail Adresse fÃŒr eRechnung abfragen (optional)', 'wpsg'), $this->view['pflicht']['eInvoice']??0); ?>
 <?php echo wpsg_drawForm_Select('pflicht[tel]', __('Telefon', 'wpsg'), $arSelect, $this->view['pflicht']['tel'])?>
 <?php echo wpsg_drawForm_Select('pflicht[fax]', __('Fax', 'wpsg'), $arSelect, $this->view['pflicht']['fax'])?>
Index: /views/css/frontend.css
===================================================================
--- /views/css/frontend.css	(revision 8455)
+++ /views/css/frontend.css	(revision 8456)
@@ -153,4 +153,7 @@
 .wpsg_overview .wpsg_cell_weight_value { text-align:right; }
 .wpsg_overview .wpsg_cell_deliverytime_value { text-align:right; }
+.wpsg_overview {
+	.einvoice_input { margin-bottom:2rem; }
+}
 
 .wpsg_overview .wpsg_table_wrap {}
Index: /views/mailtemplates/adminmail.phtml
===================================================================
--- /views/mailtemplates/adminmail.phtml	(revision 8455)
+++ /views/mailtemplates/adminmail.phtml	(revision 8456)
@@ -7,5 +7,5 @@
 	$this->htmlMail = false;
  
-    
+	$oCustomer = wpsg_customer::getInstance(intval($this->view['basket']['checkout']['k_id']));
     
 ?><?php echo __('Hallo Administrator,', 'wpsg'); ?> 
@@ -28,5 +28,8 @@
 <?php echo wpsg_pad_right(__('Telefon', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['tel']; ?> 
 <?php echo wpsg_pad_right(__('Fax', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['fax']; ?> 
-<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>  
+<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
+<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
+<?php echo wpsg_pad_right(__('E-Mail (eRechnung)', 'wpsg').':', 35); ?><?php echo $email_einvoice; ?>
+<?php } ?>
 
 <?php echo __('Lieferadresse:', 'wpsg'); ?> 
@@ -55,4 +58,7 @@
 <?php echo wpsg_pad_right(__('Fax', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['fax']; ?> 
 <?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>  
+<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
+<?php echo wpsg_pad_right(__('E-Mail (eRechnung)', 'wpsg').':', 35); ?><?php echo $email_einvoice; ?>
+<?php } ?>
 
 <?php } ?>
Index: /views/mailtemplates/html/customer.phtml
===================================================================
--- /views/mailtemplates/html/customer.phtml	(revision 8455)
+++ /views/mailtemplates/html/customer.phtml	(revision 8456)
@@ -1,2 +1,7 @@
+<?php
+
+	$oCustomer = wpsg_customer::getInstance(intval($this->view['basket']['checkout']['k_id']));
+	
+?>
 
 <?php if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['basket']['checkout']['k_id'], 'o_id' => $this->view['o_id']))) { ?>
@@ -41,5 +46,11 @@
 		<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('E-Mail Adresse', 'wpsg'); ?>:</td>
 		<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><a href="mailto:<?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?>"><?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?></a></td>
-	</tr>	
+	</tr>
+	<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
+	<tr>
+		<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('E-Mail (eRechnung)', 'wpsg'); ?>:</td>
+		<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><a href="mailto:<?php echo htmlspecialchars($email_einvoice); ?>"><?php echo htmlspecialchars($email_einvoice); ?></a></td>
+	</tr>
+	<?php } ?>
 </table>
 
@@ -111,4 +122,10 @@
 		<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><a href="mailto:<?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?>"><?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?></a></td>
 	</tr>
+	<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
+	<tr>
+		<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('E-Mail (eRechnung)', 'wpsg'); ?>:</td>
+		<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><a href="mailto:<?php echo htmlspecialchars($email_einvoice); ?>"><?php echo htmlspecialchars($email_einvoice); ?></a></td>
+	</tr>
+	<?php } ?>
 </table>
 
Index: /views/mailtemplates/kundenmail.phtml
===================================================================
--- /views/mailtemplates/kundenmail.phtml	(revision 8455)
+++ /views/mailtemplates/kundenmail.phtml	(revision 8456)
@@ -9,7 +9,7 @@
 	$arPflicht = $this->loadPflichtFeldDaten();
 	$arTitle = explode('|', $arPflicht['anrede_auswahl']);
-		
-	//wpsg_debug($this->view);
-
+	
+	$oCustomer = wpsg_customer::getInstance(intval($this->view['basket']['checkout']['k_id']));
+	
 ?><?php echo wpsg_translate(__('Hallo #1# #2# #3#,', 'wpsg'), @$arTitle[$this->view['basket']['checkout']['title']], $this->view['basket']['checkout']['vname'], $this->view['basket']['checkout']['name']); ?> 
  
@@ -31,6 +31,8 @@
 <?php echo wpsg_pad_right(__('Telefon', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['tel']; ?> 
 <?php echo wpsg_pad_right(__('Fax', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['fax']; ?> 
-<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>  
-
+<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
+<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
+<?php echo wpsg_pad_right(__('E-Mail (eRechnung)', 'wpsg').':', 35); ?><?php echo $email_einvoice; ?>
+<?php } ?>
 <?php echo __('Lieferadresse:', 'wpsg'); ?> 
 
@@ -57,5 +59,8 @@
 <?php echo wpsg_pad_right(__('Telefon', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['tel']; ?> 
 <?php echo wpsg_pad_right(__('Fax', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['fax']; ?> 
-<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>  
+<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
+<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
+<?php echo wpsg_pad_right(__('E-Mail (eRechnung)', 'wpsg').':', 35); ?><?php echo $email_einvoice; ?>
+<?php } ?>
  
 <?php } ?> 
Index: /views/mods/mod_kundenverwaltung/edit.phtml
===================================================================
--- /views/mods/mod_kundenverwaltung/edit.phtml	(revision 8455)
+++ /views/mods/mod_kundenverwaltung/edit.phtml	(revision 8456)
@@ -4,5 +4,7 @@
 	 * Template fÃŒr die Bearbeitung eines Kunden im Backend
 	 */
-
+	
+	$oCustomer = wpsg_customer::getInstance(intval($_REQUEST['edit_id']??0));
+	
 ?>
 <div class="wpsg_customer" id="wpsg-bs">
@@ -58,9 +60,14 @@
 						<?php } ?>
 						<?php if ($this->view['pflicht']['geb'] != '2') { ?>
-	                    	<?php echo wpsg_drawForm_Input('geb', __('Geburtsdatum', 'wpsg'), wpsg_formatTimestamp(strtotime(@$this->view['data']['geb']), true), array('autocomplete' => false, 'datepicker' => true, 'hint' => __('Format: TT.MM.JJJJ', 'wpsg'))); ?>
+	                    	<?php echo wpsg_drawForm_Input('geb', __('Geburtsdatum', 'wpsg'), wpsg_formatTimestamp(strtotime($this->view['data']['geb']??''), true), array('autocomplete' => false, 'datepicker' => true, 'hint' => __('Format: TT.MM.JJJJ', 'wpsg'))); ?>
                        	<?php } ?>
                         <?php if ($this->view['pflicht']['email'] != '2') { ?>
                         	<?php echo wpsg_drawForm_Input('email', __('E-Mail', 'wpsg'), @$this->view['data']['email']); ?>
                         <?php } ?>
+						
+						<?php if ($oCustomer->getEMailEInvoice() !== null) { ?>
+							<?php echo wpsg_drawForm_Input('email_einvoice', __('E-Mail fÃŒr eRechnung', 'wpsg'), $oCustomer->getEMailEInvoice()); ?>
+						<?php } ?>
+						
                         <?php if ($this->view['pflicht']['firma'] != '2') { ?>
                         	<?php echo wpsg_drawForm_Input('firma', __('Firma', 'wpsg'), @$this->view['data']['firma']); ?>
Index: /views/mods/mod_rechnungen/order_view_orderdata_after.phtml
===================================================================
--- /views/mods/mod_rechnungen/order_view_orderdata_after.phtml	(revision 8455)
+++ /views/mods/mod_rechnungen/order_view_orderdata_after.phtml	(revision 8456)
@@ -98,5 +98,12 @@
                     <input type="checkbox" name="wpsg_rechnungen_sendmail" value="1" id="invoice_sendmail" checked="checked" />
                     <label for="invoice_sendmail"><?php echo __('E-Mail an Kunden senden', 'wpsg'); ?></label>
-                    <input type="email" name="wpsg_rechnungen_email" value="<?php echo $oCustomer->getEMail(); ?>" />
+                    <input type="email" name="wpsg_rechnungen_email" value="<?php
+						
+						$mail = $oCustomer->getEMailEInvoice();
+						if ($mail === null) $mail = $oCustomer->getEMail();
+						
+						echo $mail;
+						
+					?>" />
                     
                     <input type="checkbox" name="wpsg_rechnungen_faelligkeit" value="1" id="invoice_faelligkeit" checked="checked" />
@@ -272,5 +279,12 @@
                     <input type="checkbox" name="storno_send" id="storno_send" value="1" />
                     <label for="storno_send"><?php echo __('E-Mail an Kunden senden', 'wpsg'); ?></label>
-                    <input type="email" name="storno_mail" value="<?php echo $oCustomer->getEMail(); ?>" />
+                    <input type="email" name="storno_mail" value="<?php
+						 
+						$mail = $oCustomer->getEMailEInvoice();
+						if ($mail === null) $mail = $oCustomer->getEMail();
+						
+						echo $mail;
+						
+					?>" />
                     
                     <input type="checkbox" id="storno_shippay" name="storno_shippay" value="1" id="invoice_shippay" <?php 
Index: /views/order/view_customerdata.phtml
===================================================================
--- /views/order/view_customerdata.phtml	(revision 8455)
+++ /views/order/view_customerdata.phtml	(revision 8456)
@@ -56,4 +56,7 @@
 					<?php } ?>
 				<?php } ?>
+				
+				<?php echo wpsg_drawForm_Input('email_einvoice', __('E-Mail fÃŒr eInvoice', 'wpsg'), $this->view['data']['email_einvoice']); ?>
+				
                 <br />
                 <?php if ($this->view['pflicht']['strasse'] != '2') { ?>
@@ -144,5 +147,5 @@
 
     <?php echo wpsg_drawForm_TextEnd(__('Anschrift', 'wpsg')); ?>
-	    
+	   
     <?php if ($this->view['pflicht']['geb'] != '2') { ?>
     	<?php if (strtotime($this->view['data']['geb']) > 0) { ?>
@@ -173,4 +176,10 @@
     <?php echo wpsg_drawForm_TextEnd(__('E-Mail', 'wpsg')); ?>
 	
+	<?php $email_einvoice = $Customer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
+		<?php echo wpsg_drawForm_TextStart(); ?>
+			<a href="mailto:<?php echo htmlspecialchars($email_einvoice); ?>"><?php echo htmlspecialchars($email_einvoice); ?></a>
+		<?php echo wpsg_drawForm_TextEnd(__('E-Mail fÃŒr eRechnungen', 'wpsg')); ?>
+	<?php } ?>
+
     <script>
 
Index: /views/warenkorb/checkout.phtml
===================================================================
--- /views/warenkorb/checkout.phtml	(revision 8455)
+++ /views/warenkorb/checkout.phtml	(revision 8456)
@@ -145,5 +145,12 @@
 					<?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
 					</label>
-					<input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[checkout][vname]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['vname'])); ?>" />		
+					<input
+						class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>"
+						type="text"
+						id="vname"
+						autocomplete="vname"
+						name="wpsg[checkout][vname]"
+						value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['vname'])); ?>"
+					/>
 				</div>
 				<?php } ?>
@@ -154,5 +161,12 @@
 					<?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
 					</label>
-					<input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[checkout][name]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['name'])); ?>" />
+					<input
+						class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>"
+						type="text"
+						id="name"
+						autocomplete="name"
+						name="wpsg[checkout][name]"
+						value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['name'])); ?>"
+					/>
 				</div>
 				<?php } ?>
@@ -190,4 +204,18 @@
 				</div>
 				<?php } ?>
+				<?php } ?>
+				
+				<?php if (intval($this->view['pflicht']['eInvoice']??0) === 1) { ?>
+				<div class="wpsg_checkoutblock" id="wpsg_email_einvoice">
+					<label for="wpsg_email_einvoice_input" class="wpsg_checkout"><?php echo __("E-Mail (fÃŒr eRechnung, optional)", "wpsg"); ?></label>
+					<input
+						class="wpsg_input_text wpsg_checkout <?php echo ((in_array("email_einvoice", (array)$this->view['error']))?'wpsg_error':''); ?>"
+						type="email"
+						id="wpsg_email_einvoice_input"
+						name="wpsg[checkout][email_einvoice]"
+						value="<?php echo htmlspecialchars($this->view['basket']['checkout']['email_einvoice']??''); ?>"
+						autocomplete="off"
+					/>
+				</div>
 				<?php } ?>
 				
Index: /views/warenkorb/overview.phtml
===================================================================
--- /views/warenkorb/overview.phtml	(revision 8455)
+++ /views/warenkorb/overview.phtml	(revision 8456)
@@ -166,4 +166,11 @@
 		<?php if (wpsg_isSizedString($this->view['basket']['checkout']['ustidnr'])) { ?>
 		<?php echo __('UStIdNr.', 'wpsg'); ?>: <?php echo wpsg_hspc($this->view['basket']['checkout']['ustidnr']); ?><br /><br />
+		<?php } ?>
+		
+		<?php if (trim($this->view['basket']['checkout']['email_einvoice']??'') !== '') { ?>
+		<div class="einvoice_input">
+			<span><?php echo __('E-Mail fÃŒr eRechnung:', 'wpsg'); ?></span>
+			<span><?php echo $this->view['basket']['checkout']['email_einvoice']; ?></span>
+		</div>
 		<?php } ?>
 
