Fixed updateing address without housenumber in AddressDB rimo sync

This commit is contained in:
Frank Schubert
2025-09-22 13:29:49 +02:00
parent 2c0793dcb8
commit 281fd35500

View File

@@ -65,7 +65,10 @@ class ADBHausnummer extends mfBaseModel {
}
$update_data = [];
if($this->strasse_id && $this->getProperty("strasse")->name) $update_data["address"] = $this->getProperty("strasse")->name;
if($this->strasse_id && $this->getProperty("strasse")->name) {
$update_data["address"] = $this->getProperty("strasse")->name;
if(strlen($this->hausnummer)) $update_data["address"] .= " ".$this->hausnummer;
}
if($this->ortschaft_id && $this->getProperty("ortschaft")->name) $update_data["city"] = $this->getProperty("ortschaft")->name;
if($this->plz_id && $this->getProperty("plz")->plz) $update_data["zipCode"] = $this->getProperty("plz")->plz;
if($this->strasse_id && $this->getProperty("strasse")->gemeinde_id && $this->getProperty("strasse")->gemeinde->name) $update_data["district"] = $this->getProperty("strasse")->gemeinde->name;