]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-370] fix
authorAlexander Smirnov <fredeom@mail.ru>
Thu, 13 Mar 2025 07:22:37 +0000 (10:22 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Thu, 13 Mar 2025 07:22:37 +0000 (10:22 +0300)
erp24/records/WriteOffs.php

index ed50e996ffd25c81e900ce10b2b52fd43d9ff983..b214f211e4c5d023b4f0fe59a9ae19303542d712 100755 (executable)
@@ -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();