From 87667065f07d0654d7860ef5a191769cfeb377cd Mon Sep 17 00:00:00 2001 From: brusnitsyn Date: Sat, 6 Jun 2026 10:17:51 +0900 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=BF=D0=BE=D0=B4=D1=81?= =?UTF-8?q?=D1=87=D0=B5=D1=82=D0=B0=20=D0=B4=D0=BE=D0=BB=D0=B3=D0=B0=20?= =?UTF-8?q?=D0=B7=D0=B0=20=D0=BF=D1=80=D0=BE=D1=88=D0=B5=D0=B4=D1=88=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BC=D0=B5=D1=81=D1=8F=D1=86=D1=8B=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/MetricCalculators/PlanCalculator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/MetricCalculators/PlanCalculator.php b/app/Services/MetricCalculators/PlanCalculator.php index bebe38e..ff45070 100644 --- a/app/Services/MetricCalculators/PlanCalculator.php +++ b/app/Services/MetricCalculators/PlanCalculator.php @@ -38,7 +38,7 @@ class PlanCalculator extends BaseMetricService implements MetricCalculatorInterf ->whereIn('r.rf_department_id', $departmentIds) ->where('mr.rf_metrika_item_id', self::getMetricId()) ->where('r.period_end', '>=', $startYear) // Используем >= - ->where('r.period_end', '<', $startPreviousMonth) // Используем < + ->where('r.period_end', '<=', $startPreviousMonth) // Используем < ->select('r.rf_department_id', DB::raw('SUM(CAST(mr.value AS DECIMAL)) as total')) ->groupBy('r.rf_department_id') ->get()