From dfee63e51f1ccbb1f6911d30c8d6e2b99efb0b96 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 13 Mar 2025 10:22:37 +0300 Subject: [PATCH] [ERP-370] fix --- erp24/records/WriteOffs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erp24/records/WriteOffs.php b/erp24/records/WriteOffs.php index ed50e996..b214f211 100755 --- a/erp24/records/WriteOffs.php +++ b/erp24/records/WriteOffs.php @@ -436,7 +436,7 @@ class WriteOffs extends \yii\db\ActiveRecord ->select(['price']) ->where(['region_id' => $regionId, 'product_id' => $productId]) ->andWhere(['<=', 'date_from', $writeOffDate]) - ->andWhere(['or', 'date_to IS NULL', ['>=', 'date_to', $writeOffDate]]) + ->andWhere(['>=', 'date_to', $writeOffDate]) ; $pricesDynamic = $query->scalar(); -- 2.39.5