+
" />
+
+
+ " />
+
+
" />
diff --git a/Layout/default/ConstructionConsent/View.php b/Layout/default/ConstructionConsent/View.php
index e74d1a6ef..0a703c5d4 100644
--- a/Layout/default/ConstructionConsent/View.php
+++ b/Layout/default/ConstructionConsent/View.php
@@ -184,6 +184,9 @@ $pagination_entity_name = "Adressen";
| GSTNR |
=$item->gstnr?> |
+
+ | Rimo GN |
+ =$item->rimo_gn?> |
| Plan/Skizze |
diff --git a/application/ConstructionConsent/ConstructionConsent.php b/application/ConstructionConsent/ConstructionConsent.php
index ab7fa3e10..82fc10100 100644
--- a/application/ConstructionConsent/ConstructionConsent.php
+++ b/application/ConstructionConsent/ConstructionConsent.php
@@ -309,7 +309,7 @@ class ConstructionConsent extends mfBaseModel {
$table_fields = [
"constructionconsentproject_id", "termination_id","adb_hausnummer_id", "adb_strasse_id", "object_type", "name", "ez", "kg", "gst", "gstnr",
- "usage_length", "usage_pipe_on_plot", "usage_pipe_in_building", "usage_manhole", "usage_owner",
+ "rimo_gn", "usage_length", "usage_pipe_on_plot", "usage_pipe_in_building", "usage_manhole", "usage_owner",
"status", "result", "result_text", "note", "create_by","edit_by","create","edit"
];
@@ -508,6 +508,13 @@ FROM ConstructionConsent
}
}
+ if(array_key_exists("rimo_gn", $filter)) {
+ $rimo_gn = FronkDB::singleton()->escape($filter["rimo_gn"]);
+ if($rimo_gn) {
+ $where .= " AND rimo_gn LIKE '%$rimo_gn%'";
+ }
+ }
+
if(array_key_exists("address", $filter)) {
$address = FronkDB::singleton()->escape($filter["address"]);
if ($address) {
diff --git a/application/ConstructionConsent/ConstructionConsentController.php b/application/ConstructionConsent/ConstructionConsentController.php
index ec3f26f1b..ae1c7660e 100644
--- a/application/ConstructionConsent/ConstructionConsentController.php
+++ b/application/ConstructionConsent/ConstructionConsentController.php
@@ -252,6 +252,7 @@ class ConstructionConsentController extends mfBaseController {
$data["kg"] = $r->kg;
$data["gst"] = $r->gst;
$data["gstnr"] = $r->gstnr;
+ $data["rimo_gn"] = $r->rimo_gn;
$data["usage_length"] = $r->usage_length ?: null;
$data["usage_pipe_on_plot"] = $r->usage_pipe_on_plot ? 1 : 0;
$data["usage_pipe_in_building"] = $r->usage_pipe_in_building ? 1 : 0;
diff --git a/db/migrations/20250415134656_construction_consent_add_rimo_gn.php b/db/migrations/20250415134656_construction_consent_add_rimo_gn.php
new file mode 100644
index 000000000..584f222ae
--- /dev/null
+++ b/db/migrations/20250415134656_construction_consent_add_rimo_gn.php
@@ -0,0 +1,33 @@
+getEnvironment() == "thetool") {
+ $table = $this->table('ConstructionConsent');
+ $table->addColumn('rimo_gn', 'string', ['limit' => 64, 'null' => true, 'default' => null, "after" => "gstnr"]);
+ $table->update();
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+
+ public function down(): void
+ {
+ if($this->getEnvironment() == "thetool") {
+ $table = $this->table('ConstructionConsent');
+ $table->removeColumn('rimo_gn');
+ $table->update();
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+}
|