From e66d96a097615e73af10051fb372d44f4e769ce5 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Fri, 28 Mar 2025 12:45:39 +0100 Subject: [PATCH] Preorderlogistics: changed connection_type filter to unit_count --- application/Preorder/PreorderModel.php | 16 +++++++++++++++- .../PreorderlogisticsController.php | 4 +++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/application/Preorder/PreorderModel.php b/application/Preorder/PreorderModel.php index ae152e9c4..11de8341d 100644 --- a/application/Preorder/PreorderModel.php +++ b/application/Preorder/PreorderModel.php @@ -343,7 +343,7 @@ class PreorderModel if (is_array($limit) && count($limit)) { if (is_numeric($limit['start']) && is_numeric($limit['count'])) { $sql .= " LIMIT " . $limit['start'] . ", " . $limit['count']; - } elseif (is_numeric($count)) { + } elseif (is_numeric($limit['count'])) { $sql .= " LIMIT " . $limit['count']; } } @@ -967,6 +967,20 @@ class PreorderModel } } + if (array_key_exists("unit_count>=", $filter)) { + $unit_count = $filter['unit_count>=']; + if (is_numeric($unit_count)) { + $where .= " AND adb_hausnummer.unit_count >= $unit_count"; + } + } + + if (array_key_exists("unit_count<=", $filter)) { + $unit_count = $filter['unit_count<=']; + if (is_numeric($unit_count)) { + $where .= " AND adb_hausnummer.unit_count <= $unit_count"; + } + } + if (array_key_exists("sent", $filter)) { $sent = $filter['sent']; if ($sent) { diff --git a/application/Preorderlogistics/PreorderlogisticsController.php b/application/Preorderlogistics/PreorderlogisticsController.php index 052f78a46..b53c2d262 100644 --- a/application/Preorderlogistics/PreorderlogisticsController.php +++ b/application/Preorderlogistics/PreorderlogisticsController.php @@ -81,7 +81,9 @@ class PreorderlogisticsController extends mfBaseController { $filter["status_code"] = 140; //$filter[" "145"]); if ($filter['sent'] !== true) { $filter["preorder_status_flags_disabled"] = [$installation_kit_status_flag->id];