From b89ef1a44d42339c8c42ca139b022a0cafba1626 Mon Sep 17 00:00:00 2001 From: brusnitsyn Date: Fri, 5 Jun 2026 16:28:19 +0900 Subject: [PATCH] =?UTF-8?q?[=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5]:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=B2=D0=B5=D1=80=D1=85=D0=BD?= =?UTF-8?q?=D1=8F=D1=8F=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0=20=D1=81=20?= =?UTF-8?q?=D0=BF=D0=BB=D0=B0=D0=BD=D0=BE=D0=BC=20#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/StatisticsService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Services/StatisticsService.php b/app/Services/StatisticsService.php index 58cf0fb..ba0cfdf 100644 --- a/app/Services/StatisticsService.php +++ b/app/Services/StatisticsService.php @@ -104,11 +104,12 @@ class StatisticsService // 5. Собираем данные $groupedData = []; $totalsByType = []; - $grandRecipientPlan = 0; - $grandProgressPlan = 0; $departmentsPlans = $this->planCalculator->calculate($allDeptIds, $startDate, $endDate); + $grandRecipientPlan = collect($departmentsPlans)->sum('cumulative_plan'); + $grandProgressPlan = collect($departmentsPlans)->sum('actual_year_to_date'); + foreach ($departments as $typeName => $deptList) { $groupedData[$typeName] = []; $totalsByType[$typeName] = $this->initTypeTotals();