From 2d172e73362c7494719e5048b9b2417ecee9a4fc Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Wed, 12 Mar 2025 13:35:36 +0100 Subject: [PATCH 1/4] Added address attribute rml-fibu-account --- Layout/default/Address/Form.php | 6 ++++++ Layout/default/Address/View.php | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Layout/default/Address/Form.php b/Layout/default/Address/Form.php index 3b53f3b26..7acab0f5c 100644 --- a/Layout/default/Address/Form.php +++ b/Layout/default/Address/Form.php @@ -320,6 +320,12 @@ +
+ +
+ +
+
diff --git a/Layout/default/Address/View.php b/Layout/default/Address/View.php index 591b4d778..8ee537164 100644 --- a/Layout/default/Address/View.php +++ b/Layout/default/Address/View.php @@ -180,7 +180,14 @@ RTR Code attributes) && array_key_exists("rtrcode", $address->attributes)) ? $address->attributes['rtrcode']->value : ""?> - + + attributes) && array_key_exists("rtrcode", $address->attributes)): ?> + + RML FIBU Konto + attributes['rml-fibu-account']->value?> + + + From eb085ec6d4d04b9d10e1e121e69c720a7df67e7c Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Wed, 12 Mar 2025 13:36:59 +0100 Subject: [PATCH 2/4] Added address attribute rml-fibu-account --- Layout/default/Address/View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Layout/default/Address/View.php b/Layout/default/Address/View.php index 8ee537164..2f2ff38ce 100644 --- a/Layout/default/Address/View.php +++ b/Layout/default/Address/View.php @@ -181,7 +181,7 @@ RTR Code attributes) && array_key_exists("rtrcode", $address->attributes)) ? $address->attributes['rtrcode']->value : ""?> - attributes) && array_key_exists("rtrcode", $address->attributes)): ?> + attributes) && array_key_exists("rtrcode", $address->attributes) && $address->attributes['rml-fibu-account']->value): ?> RML FIBU Konto attributes['rml-fibu-account']->value?> From 4643661346e7f1c4d9faf0827aec796fa73ee6d1 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Wed, 12 Mar 2025 15:01:29 +0100 Subject: [PATCH 3/4] Removed Preorderflag debug output --- Layout/default/PreorderProduct/include/enduser-prices-setup.php | 1 - application/Preorder/Preorder.php | 1 - 2 files changed, 2 deletions(-) delete mode 100644 Layout/default/PreorderProduct/include/enduser-prices-setup.php diff --git a/Layout/default/PreorderProduct/include/enduser-prices-setup.php b/Layout/default/PreorderProduct/include/enduser-prices-setup.php deleted file mode 100644 index b3d9bbc7f..000000000 --- a/Layout/default/PreorderProduct/include/enduser-prices-setup.php +++ /dev/null @@ -1 +0,0 @@ -getProperty("adb_hausnummer"); foreach(ADBStatusflagModel::getAll() as $hflag) { - echo $hflag->code."\n"; $hflag_value = ADBHausnummerStatusflagValueModel::search(["hausnummer_id" => $hausnummer->id, "flag_id" => $hflag->id]); if(!$hflag_value) { $hflag_value = ADBHausnummerStatusflagValueModel::create([ From baf610ab28da7a33c13a820fa6b31dd2787baa7b Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Wed, 12 Mar 2025 15:01:49 +0100 Subject: [PATCH 4/4] Rimo Import: Now trimming certain stringified control characters from strings --- .../ADBAddressHelper/address_helper.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/adb-rimo-import/ADBAddressHelper/address_helper.php b/scripts/adb-rimo-import/ADBAddressHelper/address_helper.php index dfaa0fec4..a4baa9e17 100644 --- a/scripts/adb-rimo-import/ADBAddressHelper/address_helper.php +++ b/scripts/adb-rimo-import/ADBAddressHelper/address_helper.php @@ -135,8 +135,8 @@ class AddressHelper } - $name = trim($building->name); - $strasse_hausnummer = trim($building->address->name); + $name = $this->trimExtra($building->name); + $strasse_hausnummer = trim($this->trimExtra($building->address->name)); $split_result = $this->splitStreetHausnummer($strasse_hausnummer); if (!$split_result) { @@ -148,18 +148,18 @@ class AddressHelper $hausnummer_name = $this->db->escape($split_result[1]); $addresszusatz = $this->db->escape($split_result[2]); - $gem_kz = $this->db->escape(trim($building->municipality->name)); - $gem_name = $this->db->escape(trim($building->municipality->userLabel)); + $gem_kz = $this->db->escape($this->trimExtra($building->municipality->name)); + $gem_name = $this->db->escape($this->trimExtra($building->municipality->userLabel)); - $ort_name = $this->db->escape(trim($building->address->city)); - $plz_name = $this->db->escape(trim($building->address->zipCode)); + $ort_name = $this->db->escape($this->trimExtra($building->address->city)); + $plz_name = $this->db->escape($this->trimExtra($building->address->zipCode)); $lat = ($building->address->latitude) ? $this->truncateFloat($building->address->latitude, 14) : null; $long = ($building->address->longitude) ? $this->truncateFloat($building->address->longitude, 14) : null; //$lat = $building->address->latitude; //$long = $building->address->longitude; $unit_count = $building->homesCount; - $lot_num = $building->address->lotNumber; + $lot_num = $this->trimExtra($building->address->lotNumber); $fcp_name = false; $adrcd = false; @@ -551,4 +551,7 @@ class AddressHelper echo $logtext . "\n"; } + public function trimExtra($string) { + return preg_replace(['/\\\r+/', '/\\\n+/', '/\\\t+/'], "", trim($string)); + } } \ No newline at end of file