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) {