From 3235d03deda1f4d1457f3685581d4d10fd13c8a3 Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Fri, 31 Jan 2025 09:37:14 +0100 Subject: [PATCH] Added adb_netzgebiet_id Filter for ConstructionConsent --- Layout/default/ConstructionConsent/Index.php | 22 +++++++++++++++---- .../ConstructionConsent.php | 9 ++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/Layout/default/ConstructionConsent/Index.php b/Layout/default/ConstructionConsent/Index.php index 437ce156e..80e86754e 100644 --- a/Layout/default/ConstructionConsent/Index.php +++ b/Layout/default/ConstructionConsent/Index.php @@ -33,10 +33,10 @@ $pagination_entity_name = "Zustimmungserklärungen";
">
-
+
- +
-
+
+ + +
+ +
" />
diff --git a/application/ConstructionConsent/ConstructionConsent.php b/application/ConstructionConsent/ConstructionConsent.php index 13678782f..ec54bedb7 100644 --- a/application/ConstructionConsent/ConstructionConsent.php +++ b/application/ConstructionConsent/ConstructionConsent.php @@ -353,6 +353,7 @@ class ConstructionConsent extends mfBaseModel { $where = self::getSqlFilter($filter); $sql = "SELECT COUNT(*) as cnt FROM ConstructionConsent + LEFT JOIN ".ADDRESSDB_DBNAME.".view_hausnummer ON (ConstructionConsent.adb_hausnummer_id = view_hausnummer.hausnummer_id) WHERE $where"; //mfLoghandler::singleton()->debug($sql); @@ -377,6 +378,7 @@ class ConstructionConsent extends mfBaseModel { $where = self::getSqlFilter($filter); $sql = "SELECT * FROM ConstructionConsent + LEFT JOIN ".ADDRESSDB_DBNAME.".view_hausnummer ON (ConstructionConsent.adb_hausnummer_id = view_hausnummer.hausnummer_id) WHERE $where ORDER BY $order"; @@ -494,6 +496,13 @@ class ConstructionConsent extends mfBaseModel { } } + if(array_key_exists("network", $filter)) { + $network = FronkDB::singleton()->escape($filter["network"]); + if($network) { + $where .= " AND view_hausnummer.netzgebiet_id=$network"; + } + } + if(array_key_exists("add-where", $filter)) {