From 975931ef1b10d8e4d1189c46fbefe2af1006eb90 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Tue, 3 Sep 2024 17:18:15 +0300 Subject: [PATCH] =?utf8?q?[ERP-140]=20=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?utf8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BD=D0=B5=D0=B4=D0=BE=D1=87?= =?utf8?q?=D1=91=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/services/MotivationService.php | 6 ++++++ 1 file changed, 6 insertions(+) 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]) -- 2.39.5