Skip to content
Code-Schnipsel Gruppen Projekte
Commit 3f773d81 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch 'next-2.x' into 'main'

fix(Order): copy all customer data to invoice

See merge request !120
Übergeordnete d13afa14 b1687615
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!120fix(Order): copy all customer data to invoice,!117Update 'next-3.x' with latest changes from 'main'
Pipeline-Nr. 11519 mit Warnungen bestanden
......@@ -189,6 +189,10 @@ public function createInvoice(
$this->getGlobalProcessId()
);
if ($this->getCustomer()) {
$TemporaryInvoice->setCustomer($this->getCustomer());
}
$this->History->addComment(
QUI::getLocale()->get(
'quiqqer/order',
......@@ -243,7 +247,8 @@ public function createInvoice(
'order_id' => $this->getUUID(),
'order_date' => $this->getCreateDate(),
'project_name' => $this->getAttribute('project_name'),
'customer_id' => $this->customerId,
'customer_id' => $this->getCustomer()?->getUUID(),
'customer_data' => $this->getCustomer()?->getAttributes(),
'payment_method' => $payment,
'time_for_payment' => QUI\ERP\Customer\Utils::getInstance()->getPaymentTimeForUser($this->customerId),
'invoice_address_id' => $invoiceAddressId,
......@@ -287,6 +292,8 @@ public function createInvoice(
'payment_data' => QUI\Security\Encryption::encrypt(json_encode($this->paymentData)),
'currency_data' => json_encode($this->getCurrency()->toArray()),
'currency' => $this->getCurrency()->getCode(),
'customer_id' => $this->getCustomer()?->getUUID(),
'customer_data' => json_encode($this->getCustomer()?->getAttributes()),
],
['hash' => $TemporaryInvoice->getUUID()]
);
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren