From c8a374b850a1621787875df3cf8bb9f007d0f4ce Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Thu, 20 Feb 2025 11:01:57 +0100 Subject: [PATCH] Added new GST Filter --- Layout/default/ConstructionConsent/Index.php | 7 ++++++- application/ConstructionConsent/ConstructionConsent.php | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Layout/default/ConstructionConsent/Index.php b/Layout/default/ConstructionConsent/Index.php index e6bca5e2b..ffe720851 100644 --- a/Layout/default/ConstructionConsent/Index.php +++ b/Layout/default/ConstructionConsent/Index.php @@ -95,6 +95,11 @@ $pagination_entity_name = "Zustimmungserklärungen"; " /> +
+ + " /> +
+ @@ -176,7 +181,7 @@ $pagination_entity_name = "Zustimmungserklärungen"; $height = 96 + 25 * (isset($config['sub']) ? count($config['sub']) : 0); $text = $config['key'] ? $stats[$config['key']].' / '.$config['denominator'].' ('. - round(($stats[$config['key']]/$config['denominator'])*100).'%)' : + round(($config['denominator'] != 0 ? ($stats[$config['key']] / $config['denominator']) : 0) * 100) . '%)' : $config['text']; ?>
diff --git a/application/ConstructionConsent/ConstructionConsent.php b/application/ConstructionConsent/ConstructionConsent.php index f1a53761f..233ddf7f9 100644 --- a/application/ConstructionConsent/ConstructionConsent.php +++ b/application/ConstructionConsent/ConstructionConsent.php @@ -483,6 +483,13 @@ class ConstructionConsent extends mfBaseModel { } } + if(array_key_exists("gst", $filter)) { + $gst = FronkDB::singleton()->escape($filter["gst"]); + if($gst) { + $where .= " AND gst LIKE '%$gst%'"; + } + } + if(array_key_exists("status", $filter)) { $status = FronkDB::singleton()->escape($filter["status"]); if($status) {