From 6584985e0369eb7c5077b55f4640219baf57939a Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Tue, 20 Jan 2026 13:16:51 +0100 Subject: [PATCH] Qgis Preorder sync um Felder erweitert und in ADB verlinkt --- scripts/fiberplan/sync_preorder_qgis.php | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/scripts/fiberplan/sync_preorder_qgis.php b/scripts/fiberplan/sync_preorder_qgis.php index 01b66d530..24ab6cc67 100644 --- a/scripts/fiberplan/sync_preorder_qgis.php +++ b/scripts/fiberplan/sync_preorder_qgis.php @@ -202,6 +202,21 @@ SQL; continue; } + $block = $po->adb_block ?? null; + $stiege = $po->adb_stiege ?? null; + $stock = $po->adb_stock ?? null; + $tuer = $po->adb_tuer ?? null; + + if (!empty($po->adb_wohneinheit_id)) { + $wohneinheit = new ADBWohneinheit($po->adb_wohneinheit_id); + if ($wohneinheit->id) { + $block = $wohneinheit->block; + $stiege = $wohneinheit->stiege; + $stock = $wohneinheit->stock; + $tuer = $wohneinheit->tuer; + } + } + $latVal = str_replace(',', '.', $gps_lat); $lonVal = str_replace(',', '.', $gps_long); @@ -211,10 +226,10 @@ SQL; ':type_label' => $po->type_label, ':strasse' => $po->adb_strasse, ':hausnummer' => $po->adb_hausnummer, - ':block' => $po->block, - ':stiege' => $po->stiege, - ':stock' => $po->stock, - ':tuer' => $po->tuer, + ':block' => $block, + ':stiege' => $stiege, + ':stock' => $stock, + ':tuer' => $tuer, ':plz' => $po->adb_plz, ':ort' => $po->adb_ort, ':company' => $po->company,