From: Alexander Smirnov Date: Tue, 3 Sep 2024 14:18:15 +0000 (+0300) Subject: [ERP-140] Исправление недочёта X-Git-Tag: 1.4~5^2~9 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=975931ef1b10d8e4d1189c46fbefe2af1006eb90;p=erp24_rep%2Fyii-erp24%2F.git [ERP-140] Исправление недочёта --- diff --git a/erp24/services/MotivationService.php b/erp24/services/MotivationService.php index ef1abf89..b262da9e 100644 --- a/erp24/services/MotivationService.php +++ b/erp24/services/MotivationService.php @@ -534,6 +534,9 @@ class MotivationService if ($weekEnd > $monthEnd) { $weekEnd = $monthEnd; } + if ($weekStart > $monthEnd) { + continue; + } // Ищем продажи по продуктовым гуидам по каталог-гуидам категории service $sales = Sales::find()->alias('s') @@ -632,6 +635,9 @@ class MotivationService if ($weekEnd > $monthEnd) { $weekEnd = $monthEnd; } + if ($weekStart > $monthEnd) { + continue; + } $sales = Sales::find() ->where(['between', 'date', $weekStart, $weekEnd])