changed filter in Contractqueue Import
This commit is contained in:
@@ -121,8 +121,9 @@ class ContractqueueController extends mfBaseController {
|
||||
//$max_orders = 1500;
|
||||
|
||||
$not_before = new DateTime("2024-07-01");
|
||||
$not_before->setTimezone(new DateTimeZone("Europe/Vienna"));
|
||||
|
||||
foreach(OrderModel::search(["finish_date" => true, "finish_date<" => date("U"), "finish_date>" => $not_before->getTimestamp()]) as $order) {
|
||||
foreach(OrderModel::search(["finish_date" => true, "finish_date<=" => date("U"), "finish_date>=" => $not_before->getTimestamp()]) as $order) {
|
||||
if(!is_array($order->products) || !count($order->products)) {
|
||||
//echo "keine Produkte in Order ".$order->id."\n";
|
||||
continue;
|
||||
|
||||
@@ -301,14 +301,28 @@ class OrderModel {
|
||||
$where .= " AND `Order`.finish_date > $finish_date";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(array_key_exists("finish_date>=", $filter)) {
|
||||
$finish_date = $filter['finish_date>='];
|
||||
if($finish_date) {
|
||||
$where .= " AND `Order`.finish_date >= $finish_date";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("finish_date<", $filter)) {
|
||||
$finish_date = $filter['finish_date<'];
|
||||
if($finish_date) {
|
||||
$where .= " AND `Order`.finish_date < $finish_date";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(array_key_exists("finish_date<=", $filter)) {
|
||||
$finish_date = $filter['finish_date<='];
|
||||
if($finish_date) {
|
||||
$where .= " AND `Order`.finish_date <= $finish_date";
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists("upgrade", $filter)) {
|
||||
if($filter['upgrade'] == 1) {
|
||||
$where .= " AND `Order`.upgrade = 1";
|
||||
|
||||
Reference in New Issue
Block a user