added date filter

This commit is contained in:
Luca Haid
2026-01-27 10:55:10 +01:00
parent d883d72b4a
commit 9b6ed35ddc
3 changed files with 58 additions and 15 deletions

View File

@@ -337,6 +337,16 @@ class PreorderlogisticsController extends mfBaseController {
}
}
// Date filter for sent date (Versanddatum range)
if (!empty($filter['sent_date']) && is_array($filter['sent_date'])) {
if (!empty($filter['sent_date']['from'])) {
$new_filter['add-where'] .= " AND Preorderlogistics.sent >= " . intval($filter['sent_date']['from']);
}
if (!empty($filter['sent_date']['to'])) {
$new_filter['add-where'] .= " AND Preorderlogistics.sent <= " . intval($filter['sent_date']['to']);
}
}
$new_filter["status_code"] = 140;
$new_filter["deleted"] = 0;
$new_filter["unit_count<="] = 2;