Added unit_missing & connection_count filter in Preorder/Index
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user