Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit b1687615 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix(Order): copy all customer data to invoice

Übergeordneter 95922cb1
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. 11512 bestanden
...@@ -189,6 +189,10 @@ public function createInvoice( ...@@ -189,6 +189,10 @@ public function createInvoice(
$this->getGlobalProcessId() $this->getGlobalProcessId()
); );
if ($this->getCustomer()) {
$TemporaryInvoice->setCustomer($this->getCustomer());
}
$this->History->addComment( $this->History->addComment(
QUI::getLocale()->get( QUI::getLocale()->get(
'quiqqer/order', 'quiqqer/order',
...@@ -243,7 +247,8 @@ public function createInvoice( ...@@ -243,7 +247,8 @@ public function createInvoice(
'order_id' => $this->getUUID(), 'order_id' => $this->getUUID(),
'order_date' => $this->getCreateDate(), 'order_date' => $this->getCreateDate(),
'project_name' => $this->getAttribute('project_name'), 'project_name' => $this->getAttribute('project_name'),
'customer_id' => $this->customerId, 'customer_id' => $this->getCustomer()?->getUUID(),
'customer_data' => $this->getCustomer()?->getAttributes(),
'payment_method' => $payment, 'payment_method' => $payment,
'time_for_payment' => QUI\ERP\Customer\Utils::getInstance()->getPaymentTimeForUser($this->customerId), 'time_for_payment' => QUI\ERP\Customer\Utils::getInstance()->getPaymentTimeForUser($this->customerId),
'invoice_address_id' => $invoiceAddressId, 'invoice_address_id' => $invoiceAddressId,
...@@ -287,6 +292,8 @@ public function createInvoice( ...@@ -287,6 +292,8 @@ public function createInvoice(
'payment_data' => QUI\Security\Encryption::encrypt(json_encode($this->paymentData)), 'payment_data' => QUI\Security\Encryption::encrypt(json_encode($this->paymentData)),
'currency_data' => json_encode($this->getCurrency()->toArray()), 'currency_data' => json_encode($this->getCurrency()->toArray()),
'currency' => $this->getCurrency()->getCode(), 'currency' => $this->getCurrency()->getCode(),
'customer_id' => $this->getCustomer()?->getUUID(),
'customer_data' => json_encode($this->getCustomer()?->getAttributes()),
], ],
['hash' => $TemporaryInvoice->getUUID()] ['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