[Исправление]: исправлена верхняя строка с планом #3

This commit is contained in:
brusnitsyn
2026-06-05 16:28:19 +09:00
parent 2c82f488a1
commit b89ef1a44d

View File

@@ -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();