@extends('layouts.app') @section('title', __('Финансы по группам')) {{-- GroupFinanceController::index() — how full each group is and what it earns for the month. The controller's docblock says how every figure is counted; the «?» hints in the table header repeat that for the reader. --}} @section('content') @php $money = static fn ($v) => number_format((float) $v, 0, ',', ' '); $monthNames = [__('Январь'),__('Февраль'),__('Март'),__('Апрель'),__('Май'),__('Июнь'), __('Июль'),__('Август'),__('Сентябрь'),__('Октябрь'),__('Ноябрь'),__('Декабрь')]; // Fill bars are scaled to the biggest group on the page — there's no // per-group capacity in the schema to measure against. $maxStudents = max([1, ...array_column($rows, 'students')]); $query = static fn (array $over) => '?'.http_build_query(array_merge( ['year' => $year, 'month' => $month, 'type' => $type, 'teacher_id' => $teacherId], $over)); @endphp
| {{ __('Группа') }} | {{ __('Преподаватель') }} | {{ __('Студенты') }} | {{ __('Уроков') }} | {{ __('Начислено') }} | {{ __('Оплачено') }} | {{ __('Долг') }} | {{ __('Учитель') }} | {{ __('Аренда') }} | {{ __('Прибыль') }} | {{ __('Маржа') }} | {{ __('На студента') }} |
|---|---|---|---|---|---|---|---|---|---|---|---|
|
{{ $r['group_name'] }}
{{ $r['type'] === 'MiniGroup' ? __('Индив') : __('Группа') }}@if ($r['discipline_name']) • {{ $r['discipline_name'] }}@endif
@if (! $r['is_active']) {{ __('неактивна') }}@endif
|
{{ $r['teacher_name'] ?? '—' }} |
{{ $r['students'] }}
@if ($r['joined'])+{{ $r['joined'] }}@endif
@if ($r['left'])−{{ $r['left'] }}@endif
@endif
|
{{ $r['lessons'] }} | {{ $money($r['charged']) }} | {{ $money($r['paid']) }} | {{ $money($r['debt']) }} | {{ $money($r['teacher_cost']) }} | {{ $money($r['rent']) }} | {{ $money($r['profit']) }} | @if ($r['margin'] !== null) {{ $r['margin'] }}% @else — @endif | {{ $r['per_student'] !== null ? $money($r['per_student']) : '—' }} |
| {{ __('Нет групп за этот период') }} | |||||||||||
| {{ __('Итого') }} | {{ $totals['students'] }} | {{ $totals['lessons'] }} | {{ $money($totals['charged']) }} | {{ $money($totals['paid']) }} | {{ $money($totals['debt']) }} | {{ $money($totals['teacher_cost']) }} | {{ $money($totals['rent']) }} | {{ $money($totals['profit']) }} | {{ $totals['margin'] !== null ? $totals['margin'].'%' : '—' }} | ||
{{ __('Деньги считаются кассовым методом, как на странице «Финансы»: прибыль — от оплаченной части начислений. Нажмите на заголовок столбца, чтобы отсортировать.') }}