Index: /changelog
===================================================================
--- /changelog	(revision 8417)
+++ /changelog	(revision 8418)
@@ -628,3 +628,4 @@
 - Feature: Vorauswahl Leer bei Zahlungsarten zugelassen
 - Feature: Suche nach Bestellungen eines speziellen Gutscheins im Backend
+- Feature: InvoiveNr die zu PayPal ÃŒbermittelt wird kann angepasst werden (Es gab einen Kunden bei dem waren die IDs bei PayPal schon vergeben)
 - Bugfix: Korrektur Gutschein mit % Wert auf Rechnung
Index: /mods/wpsg_mod_paypal.class.php
===================================================================
--- /mods/wpsg_mod_paypal.class.php	(revision 8417)
+++ /mods/wpsg_mod_paypal.class.php	(revision 8418)
@@ -114,4 +114,5 @@
 			
 			$this->shop->update_option('wpsg_mod_paypal_subject', $_REQUEST['wpsg_mod_paypal_subject'], false, false, WPSG_SANITIZE_TEXTFIELD);
+			$this->shop->update_option('wpsg_mod_paypal_invoicenumber', $_REQUEST['wpsg_mod_paypal_invoicenumber'], false, false, WPSG_SANITIZE_TEXTFIELD);
 			$this->shop->addTranslationString('wpsg_mod_paypal_hint', wpsg_sanitize(WPSG_SANITIZE_TEXTFIELD, $_REQUEST['wpsg_mod_paypal_hint']) ?: $this->shop->get_option('wpsg_mod_paypal_hint'));
 			
@@ -621,6 +622,19 @@
 			$transaction->setItemList($itemList);
 			$transaction->setDescription($this->shop->replaceUniversalPlatzhalter(__($this->shop->get_option('wpsg_mod_paypal_subject'), 'wpsg'), $oOrder->id));
-			$transaction->setInvoiceNumber($oOrder->id);
-				
+			
+			$wpsg_mod_paypal_invoicenumber = trim($this->shop->get_option('wpsg_mod_paypal_invoicenumber'));
+			
+			if ($wpsg_mod_paypal_invoicenumber !== '') {
+				
+				$invoice_number = $this->shop->replaceUniversalPlatzhalter($wpsg_mod_paypal_invoicenumber, $oOrder->getId());
+				
+			} else {
+				
+				$invoice_number = $oOrder->id;
+				
+			}
+			
+			$transaction->setInvoiceNumber($invoice_number);
+			
 			$redirectUrls = new \PayPal\Api\RedirectUrls();
 			$redirectUrls->setReturnUrl($this->shop->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypal', 'executePayment'));
Index: /views/mods/mod_paypal/settings_edit.phtml
===================================================================
--- /views/mods/mod_paypal/settings_edit.phtml	(revision 8417)
+++ /views/mods/mod_paypal/settings_edit.phtml	(revision 8418)
@@ -61,4 +61,5 @@
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_paypal_sandbox'), array('help' => 'wpsg_mod_paypal_sandbox')); ?>
 <?php echo wpsg_drawForm_Input('wpsg_mod_paypal_subject', __('Betreff der Ãberweisung', 'wpsg'), $this->get_option('wpsg_mod_paypal_subject'), array('help' => 'wpsg_mod_paypal_subject')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_invoicenumber', __('Formatierung InvoiceNumber', 'wpsg'), $this->get_option('wpsg_mod_paypal_invoicenumber'), array('help' => 'wpsg_mod_paypal_invoicenumber')); ?>
 
 <br />
