From 3b2762efec22a061e4449b4d9186764d72778a86 Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Tue, 12 Aug 2025 09:50:31 +0200 Subject: [PATCH] fixed preorder filter --- application/Preorder/PreorderModel.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/Preorder/PreorderModel.php b/application/Preorder/PreorderModel.php index 71d276c71..dc3603513 100644 --- a/application/Preorder/PreorderModel.php +++ b/application/Preorder/PreorderModel.php @@ -948,9 +948,9 @@ class PreorderModel } } - if (array_key_exists("billed", $filter)) { + if (array_key_exists("billed", $filter) && !empty($filter['billed'])) { $billed = $filter['billed']; - if ($billed == 0 || $billed === null) { + if ($billed == 0) { $where .= " AND (tt_preorder.billed IS NULL OR tt_preorder.billed = 0)"; } elseif ($billed) { $where .= " AND tt_preorder.billed > 0"; @@ -1035,7 +1035,7 @@ class PreorderModel } } - if (array_key_exists("attributes_bep_specified", $filter)) { + if (array_key_exists("attributes_bep_specified", $filter) && !empty($filter['attributes_bep_specified'])) { if ($filter['attributes_bep_specified'] == 1) { $where .= " AND JSON_EXTRACT(tt_preorder.attributes, \"$.bep_specified\") = 1"; } else if ($filter['attributes_bep_specified'] == 0) {