From: Alexander Smirnov Date: Thu, 13 Mar 2025 07:22:37 +0000 (+0300) Subject: [ERP-370] fix X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=dfee63e51f1ccbb1f6911d30c8d6e2b99efb0b96;p=erp24_rep%2Fyii-erp24%2F.git [ERP-370] fix --- 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();