diff --git a/app/Services/MetricCalculators/PlanCalculator.php b/app/Services/MetricCalculators/PlanCalculator.php index 080c2b0..bebe38e 100644 --- a/app/Services/MetricCalculators/PlanCalculator.php +++ b/app/Services/MetricCalculators/PlanCalculator.php @@ -49,7 +49,7 @@ class PlanCalculator extends BaseMetricService implements MetricCalculatorInterf ->join('duty_report_metric_results as mr', 'r.id', '=', 'mr.rf_report_id') ->whereIn('r.rf_department_id', $departmentIds) ->where('mr.rf_metrika_item_id', self::getMetricId()) - ->where('r.period_end', '>=', $startCurrentMonth) // Используем >= + ->where('r.period_end', '>', $startCurrentMonth) // Используем >= ->where('r.period_end', '<=', $endDate) ->select('r.rf_department_id', DB::raw('SUM(CAST(mr.value AS DECIMAL)) as total')) ->groupBy('r.rf_department_id')