Skip to content
Code-Schnipsel Gruppen Projekte
Commit 95367619 erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

fix: Invoice -> load customer country fallback

Übergeordneter 3c152c42
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
...@@ -351,6 +351,15 @@ public function getCustomer(): QUI\ERP\User ...@@ -351,6 +351,15 @@ public function getCustomer(): QUI\ERP\User
$userData['id'] = $this->getAttribute('customer_id'); $userData['id'] = $this->getAttribute('customer_id');
} }
// Country fallback
if (empty($userData['country'])) {
if (!empty($invoiceAddress['country'])) {
$userData['country'] = $invoiceAddress['country'];
} else {
$userData['country'] = QUI\ERP\Defaults::getCountry()->getCode();
}
}
return new QUI\ERP\User($userData); return new QUI\ERP\User($userData);
} }
......
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