@extends('layouts.app') @section('title', 'Подтверждение доначисления') {{-- Interstitial screen for GroupProfileController::storeSchedule() when the new schedule row starts in the past — the lesson days between its begin_date and today were never billed, because the daily cron only ever charges "today" (ScheduleAddBackfillService::preview()). Nothing has been written yet: neither the schedule row nor the charges. Cancelling just navigates away. Two submit buttons, both carrying $hidden (every field of the original add-schedule modal, plus confirmed=1) back to /add_schedule.php: backfill=1 inserts the row and the charges in one transaction, backfill=0 inserts only the row — the equivalent of unchecking everything on groups/confirm-schedule-recalc.blade.php, which is this screen's mirror image for the shrinking-schedule case. Per-student rows rather than a shared day-by-day table, for the same reason groups/confirm-join-backfill-bulk.blade.php does it: the amounts differ per student (tariff, discount, frozen days, join date), so one table of dates would be wrong for everyone. The dates themselves are the same for the whole group, so they get their own card below. --}} @section('content')

Подтверждение доначисления

Группе {{ $groupName }} добавляется расписание: {{ date('d.m.Y', strtotime($beginDate)) }} — {{ $endDate ? date('d.m.Y', strtotime($endDate)) : 'без даты окончания' }}, дни недели: {{ \App\Support\Weekdays::toString($weekdays) ?: '—' }}. Дата начала уже наступила, поэтому за прошедшие уроки (по {{ date('d.m.Y') }}) нужно доначислить — ежедневное начисление их не заметит.

Будет доначислено
{{ number_format($preview['total'], 0, ',', ' ') }} ₸
{{ $preview['days_charged'] }} начислени(й) у {{ collect($preview['students'])->where('days', '>', 0)->count() }} ученик(ов)
Новых учебных дней
{{ count($preview['dates']) }}
дни, которых ещё не было в расписании группы
@if ($preview['missing_tariff_days'] > 0)
Нет действующего тарифа на {{ $preview['missing_tariff_days'] }} урок(ов) в этом периоде — эти дни начислены не будут.
@endif
Уже существующие начисления и дни, которые группа и так посещала по другому расписанию, повторно не начисляются. Уроки, списанные с пакетных тарифов учеников, уменьшат остаток уроков по тарифу.
По ученикам
@forelse ($preview['students'] as $row) @empty @endforelse
Ученик Уроков Сумма Предупреждения
{{ $row['student_name'] }} {{ $row['days'] }} {{ number_format($row['total'], 0, ',', ' ') }} ₸ @if ($row['exhausted_warning']) {{ $row['exhausted_warning'] }}
@endif @if ($row['missing_tariff_days'] > 0) Нет тарифа на {{ $row['missing_tariff_days'] }} урок(ов) — не начислено @endif
Некого доначислять
Учебные дни в периоде
@foreach ($preview['dates'] as $date) {{ date('d.m.Y', strtotime($date)) }} @endforeach
@csrf @foreach ($hidden as $name => $value) @endforeach Отмена
@endsection