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

fix: check customer data for customer init

Übergeordneter ce62bf5d
No related branches found
No related tags found
2 Merge Requests!83fix: check customer data for customer init,!80Update 'next-3.x' with latest changes from 'main'
Pipeline #11513 mit Warnungen bestanden mit Phase
in 3 Minuten und 14 Sekunden
......@@ -239,7 +239,17 @@ public function __construct($id, Handler $Handler)
$this->setAttributes($data);
if (!$this->getCustomer()) {
if ((!$this->getCustomer() || $this->getCustomer() === null) && !empty($data['customer_data'])) {
$customer = json_decode($data['customer_data'], true);
if (!empty($customer['uuid'])) {
$this->setAttribute('customer_id', $customer['uuid']);
} elseif (!empty($customer['id'])) {
$this->setAttribute('customer_id', $customer['id']);
}
}
if (!$this->getCustomer() || $this->getCustomer() === null) {
$this->setAttribute('invoice_address', false);
$this->setAttribute('customer_id', false);
} else {
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren