@extends('layouts.app') @section('title', __('Подтверждение пересчёта начислений')) {{-- Interstitial screen for any single-group `student_groups` write that would add and/or remove `charges` rows (per GroupMembershipRecalcService::preview()). Nothing has been written yet — preview() only simulated. Cancelling just navigates away; Подтвердить resubmits $hidden plus confirmed=1 (and whichever remove_charge_ids[] the admin left checked) to $actionUrl, which is what GroupMembershipRecalcService::commit() actually applies. Shared by three call sites, distinguished only by wording/fields: - AdviserScheduleController::renderRecalcConfirm() — editing joined_at/end_date - GroupProfileController::renderRemoveRecalcConfirm() — removing a student from a group (admin and teacher flows both backdate end_date to yesterday) Originally adviser/schedule/confirm-recalc.blade.php, hardcoded to the edit-flow wording/fields; generalized here once a second and third call site needed the same screen. Styling mirrors groups/confirm-join-backfill.blade.php. --}} @section('content')

{{ __('Подтверждение пересчёта начислений') }}

{{ __('У') }} {{ $studentName }} {{ __('в группе') }} {{ $groupName }}{{ __(': :description Ниже — какие начисления это затронет.', ['description' => $description]) }}

{{ __('Будет доначислено') }}
{{ number_format($toAdd['total'], 0, ',', ' ') }} ₸
{{ __(':days урок(ов)', ['days' => count($toAdd['days'])]) }}
{{ __('Вне нового периода') }}
{{ number_format(collect($toRemove)->sum('amount'), 0, ',', ' ') }} ₸
{{ __(':toremove начислени(й) — выберите ниже, что удалить', ['toremove' => count($toRemove)]) }}
@if ($toAdd['missing_tariff_days'] > 0)
{{ __('Нет тарифа на :missing_tariff_days урок(ов) в этом периоде — эти дни начислены не будут.', ['missing_tariff_days' => $toAdd['missing_tariff_days']]) }}
@endif
@csrf @foreach ($hidden as $name => $value) @endforeach @if (! empty($toAdd['days']))
{{ __('Будет доначислено') }}
@foreach ($toAdd['days'] as $row) @endforeach
{{ __('Дата') }} {{ __('Сумма') }}
{{ date('d.m.Y', strtotime($row['date'])) }} {{ number_format($row['amount'], 0, ',', ' ') }} ₸
@endif @if (! empty($toRemove)) @include('partials._charges_removal_table', ['toRemove' => $toRemove]) @endif {{ __('Отмена') }}
@endsection