diff --git a/Layout/default/Preorder/Index.php b/Layout/default/Preorder/Index.php
index c69392746..6ed872395 100644
--- a/Layout/default/Preorder/Index.php
+++ b/Layout/default/Preorder/Index.php
@@ -107,7 +107,7 @@
-
+
-
-
+
+
+
+
+
+
+
diff --git a/application/Preorder/PreorderModel.php b/application/Preorder/PreorderModel.php
index 40dfb3cab..039b694a6 100644
--- a/application/Preorder/PreorderModel.php
+++ b/application/Preorder/PreorderModel.php
@@ -468,6 +468,18 @@ class PreorderModel {
}
}
+ if(array_key_exists("unit_count", $filter)) {
+ $unit_count = $filter['unit_count'];
+ if(intval($unit_count) === 1) {
+ $where .= " AND adb_hausnummer.unit_count = 1";
+ } elseif(intval($unit_count) === 2) {
+ $where .= " AND adb_hausnummer.unit_count > 1";
+ } elseif(intval($unit_count) === 0) {
+ $where .= " AND adb_hausnummer.unit_count = 0 OR adb_hausnummer.unit_count IS NULL";
+ }
+ }
+
+
if(array_key_exists("attributes", $filter)) {
$attributes = FronkDB::singleton()->escape($filter['attributes']);
if(is_array($attributes) && count($attributes)) {