From 31eee76a05a239479d978592ee118aaac9a4744c Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Wed, 3 Sep 2025 16:49:35 +0200 Subject: [PATCH] Fixed PreorderProductPrice time ranges --- .../PreorderProduct/PreorderProduct.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/application/PreorderProduct/PreorderProduct.php b/application/PreorderProduct/PreorderProduct.php index c9330be1e..67b547faf 100644 --- a/application/PreorderProduct/PreorderProduct.php +++ b/application/PreorderProduct/PreorderProduct.php @@ -129,7 +129,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => $campaign_id, "preorderproduct_id" => $this->id, "start_date<=" => $date, - "end_date>" => $date, + "end_date>=" => $date, ], "start_date DESC, end_date ASC, `create` DESC"); if(!$price) { @@ -229,7 +229,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => null, "preorderproduct_id" => $this->id, "start_date<=" => date($this->today_date), - "end_date>" => date($this->today_date), + "end_date>=" => date($this->today_date), ], "start_date DESC, end_date ASC, `create` DESC"); if(!$price) { $price = PreorderProductPrice::getFirst([ @@ -324,7 +324,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => $this->filter_campaign_id, "preorderproduct_id" => $this->id, "start_date>=" => null, - "end_date>" => null, + "end_date>=" => null, ], "`create` ASC"); if(!$price) { $price = PreorderProductPrice::getFirst([ @@ -332,8 +332,8 @@ class PreorderProduct extends mfBaseModel { "netoperator_id" => $this->filter_netoperator_id, "campaign_id" => null, "preorderproduct_id" => $this->id, - "start_date>=" => null, - "end_date>" => null, + "start_date" => null, + "end_date" => null, ], "`create` ASC"); } if(!$price) { @@ -342,8 +342,8 @@ class PreorderProduct extends mfBaseModel { "netoperator_id" => null, "campaign_id" => null, "preorderproduct_id" => $this->id, - "start_date>=" => null, - "end_date>" => null, + "start_date" => null, + "end_date" => null, ], "`create` ASC"); } if($price) { @@ -363,7 +363,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => $this->filter_campaign_id, "preorderproduct_id" => $this->id, "start_date<=" => date($this->today_date), - "end_date>" => null, + "end_date" => null, ], "`create` ASC"); if($price) { @@ -385,7 +385,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => $this->filter_campaign_id, "preorderproduct_id" => $this->id, "start_date<=" => date($this->today_date), - "end_date>" => date($this->today_date), + "end_date>=" => date($this->today_date), ], "start_date DESC, end_date ASC, `create` DESC"); if(!$price) { @@ -417,7 +417,7 @@ class PreorderProduct extends mfBaseModel { "campaign_id" => null, "preorderproduct_id" => $this->id, "start_date<=" => date($this->today_date), - "end_date>" => date($this->today_date), + "end_date>=" => date($this->today_date), ], "start_date DESC, end_date ASC, `create` DESC"); }