From f8b58899aec831335739d196a742a969749e2b57 Mon Sep 17 00:00:00 2001 From: Dennis Garding Date: Thu, 13 Jul 2023 14:11:20 +0200 Subject: [PATCH] fix(PT-12831): When creating an order, the customer number is now stored at the billing address --- Components/Order/Factory/OrderFactory.php | 1 + Tests/Functional/Components/Order/Factory/OrderFactoryTest.php | 1 + plugin.xml | 2 ++ 3 files changed, 4 insertions(+) diff --git a/Components/Order/Factory/OrderFactory.php b/Components/Order/Factory/OrderFactory.php index ab620d0..5c428a6 100644 --- a/Components/Order/Factory/OrderFactory.php +++ b/Components/Order/Factory/OrderFactory.php @@ -279,6 +279,7 @@ private function createBillingAddress(OrderStruct $orderStruct, Customer $custom } $billing->setCustomer($customer); + $billing->setNumber($customer->getNumber()); return $billing; } diff --git a/Tests/Functional/Components/Order/Factory/OrderFactoryTest.php b/Tests/Functional/Components/Order/Factory/OrderFactoryTest.php index f54e6db..954fc6a 100644 --- a/Tests/Functional/Components/Order/Factory/OrderFactoryTest.php +++ b/Tests/Functional/Components/Order/Factory/OrderFactoryTest.php @@ -60,6 +60,7 @@ public function testCreateBillingAddressShoudAddDefaultShippingToCustomer(): voi static::assertInstanceOf(Address::class, $defaultBillingAddress); static::assertSame(1, $defaultBillingAddress->getId()); static::assertSame('20001', $result->getCustomer()->getNumber()); + static::assertSame('20001', $result->getNumber()); static::assertSame('Musterhausen', $result->getCity()); } diff --git a/plugin.xml b/plugin.xml index 02871fc..49d610e 100644 --- a/plugin.xml +++ b/plugin.xml @@ -15,9 +15,11 @@ PT-12411 - Deaktivierte Zahlungs- und Versandarten werden nicht mehr in den entsprechenden Auswahl-Listen zur Verfügung gestellt; + PT-12831 - Beim erstellen einer Bestellung wird nun auch die Kundennummer an der Rechnungsadresse gespeichert; PT-12411 - Deactivated payment and shipping methods aren't available anymore in the corresponding selections; + PT-12831 - When creating an order, the customer number is now stored at the billing address;