Added unit_missing & connection_count filter in Preorder/Index

This commit is contained in:
Frank Schubert
2023-04-18 15:21:43 +02:00
parent 9cdd77e7dc
commit 8929e9b7d4
3 changed files with 37 additions and 0 deletions
+11
View File
@@ -372,6 +372,8 @@ class PreorderModel {
$where .= " AND adb_wohneinheit_id IN (".implode(",",$adb_wohneinheit_id).")";
} elseif($adb_wohneinheit_id === null) {
$where .= " AND adb_wohneinheit_id IS NULL";
} elseif($adb_wohneinheit_id === true) {
$where .= " AND adb_wohneinheit_id IS NOT NULL AND adb_wohneinheit_id > 0";
}
}
@@ -408,6 +410,15 @@ class PreorderModel {
}
}
if(array_key_exists("connection_count", $filter)) {
$connection_count = $filter['connection_count'];
if(intval($connection_count) === 1) {
$where .= " AND connection_count = 1";
} elseif(intval($connection_count) === 2) {
$where .= " AND connection_count > 1";
}
}
if(array_key_exists("ucode", $filter)) {
$ucode = FronkDB::singleton()->escape($filter['ucode']);
if($ucode) {