Added rimo_gn to ConstructionConsent

This commit is contained in:
Frank Schubert
2025-04-15 15:59:54 +02:00
parent 2bbd1292cf
commit e2351d1f3d
6 changed files with 59 additions and 3 deletions
@@ -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) {
@@ -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;