made preorderlogistics working again

This commit is contained in:
Luca Haid
2025-03-25 17:13:08 +01:00
parent 7b7bf8028d
commit 33b36c6296
5 changed files with 1864 additions and 70 deletions
+14 -2
View File
@@ -623,6 +623,18 @@ class PreorderModel
}
}
if (array_key_exists("preorder_status_flags_disabled", $filter)) {
$preorder_status_flags_disabled = $filter['preorder_status_flags_disabled'];
if (is_array($preorder_status_flags_disabled) && count($preorder_status_flags_disabled)) {
$where .= " AND tt_preorder.id NOT IN (
SELECT psv.preorder_id
FROM `" . FRONKDB_DBNAME . "`.PreorderStatusflagValue psv
WHERE psv.flag_id IN (" . implode(',', $preorder_status_flags_disabled) . ")
AND psv.value = 1
)";
}
}
if (array_key_exists("created_from", $filter)) {
$created_from = $filter['created_from'];
if (is_numeric($created_from)) {
@@ -958,9 +970,9 @@ class PreorderModel
if (array_key_exists("sent", $filter)) {
$sent = $filter['sent'];
if ($sent) {
$where .= " AND sent > 0";
$where .= " AND Preorderlogistics.sent > 0";
} else {
$where .= " AND (sent = 0 OR sent IS NULL)";
$where .= " AND (Preorderlogistics.sent = 0 OR Preorderlogistics.sent IS NULL)";
}
}