Merge branch 'Preorder/add-new-filter' into 'master'
fixed preorder filter See merge request fronk/thetool!1628
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user