@php $tabMeta = [ 'pending' => ['label' => __('Awaiting approval'), 'icon' => 'clock'], 'approved' => ['label' => __('Approved'), 'icon' => 'check-circle'], 'all' => ['label' => __('All requests'), 'icon' => 'queue-list'], ]; @endphp
{{ __('Close Month') }} @if ($canRequest) {{ __('Request Adjustment') }} @endif
@foreach ($metrics as $m)

{{ $m['label'] }}

{{ $m['value'] }}

{{ $m['sub'] }}
@endforeach
{{-- Reconciling view: frozen figure, correction, corrected figure. --}} @if ($reconciliation->isNotEmpty())

{{ __('Closed months with approved corrections') }}

{{ __('The frozen column is exactly what was locked on closing day and has not been touched. The corrected column is what the month reads once the approved adjustments are applied on top.') }}

@foreach ($reconciliation as $r) @endforeach
{{ __('Month') }} {{ __('Status') }} {{ __('Corrections') }} {{ __('Net profit (frozen)') }} {{ __('Adjustment') }} {{ __('Net profit (corrected)') }}
{{ $r['label'] }} {{ $r['locked'] ? __('Locked') : __('Reopened') }} {{ $r['count'] }} {{ $r['frozen'] === null ? '—' : $baseCode.' '.number_format($r['frozen'], 2) }} {{ $r['effect'] >= 0 ? '+' : '−' }}{{ number_format(abs($r['effect']), 2) }} {{ $r['adjusted'] === null ? '—' : $baseCode.' '.number_format($r['adjusted'], 2) }}
@endif
@foreach ($tabMeta as $key => $meta) @endforeach
{{-- The register --}}

{{ $tabMeta[$tab]['label'] }}

{{ __('A request changes nothing until it is approved.') }}

@forelse ($rows as $row) @php $signed = $row->signedAmount(); @endphp @empty @endforelse
{{ __('Month') }} {{ __('Line') }} {{ __('Effect on profit') }} {{ __('Requested by') }} {{ __('Status') }} {{ __('Actions') }}
{{ \Illuminate\Support\Carbon::create($row->period_year, $row->period_month, 1)->format('M Y') }} {{ $row->account_label }} {{ $row->reason }} {{ $signed >= 0 ? '+' : '−' }}{{ number_format(abs($signed), 2) }} {{ $row->direction === \App\Models\PeriodAdjustment::DIRECTION_CREDIT ? __('Credit') : __('Debit') }} {{ $row->requester?->name ?? '—' }} {{ $row->created_at?->timezone(config('app.display_timezone'))->format('j M Y') }} @if ($row->isApproved()) {{ __('Approved') }} {{ __('by :who', ['who' => $row->approver?->name ?? '—']) }} @else {{ __('Awaiting approval') }} @endif
@if (! $row->isApproved() && $canApprove) @endif @if (! $row->isApproved() && $canRequest) @endif @if ($row->isApproved()) {{ __('Immutable') }} @endif
{{ $rows->links() }}
{{-- Request / edit --}} {{ $editingId ? __('Edit adjustment request') : __('Request a period adjustment') }}

{{ __('This does not edit the closed month. It books a separate line against it, so the figure that was reported and the correction are both visible.') }}

{{ __('Every director is told the moment a request is raised.') }}

{{ __('Cancel') }} {{ $editingId ? __('Save Request') : __('Submit Request') }} {{ __('Saving…') }}
{{-- Approve --}} {{ __('Approve this adjustment') }}

{{ __('Approving makes the correction count. It is added as a reconciling line on the month it names; the closed figures stay exactly as they were locked, and an approved adjustment can never be edited, only reversed by another one.') }}

{{ __('Cancel') }} {{ __('Approve') }} {{ __('Approving…') }}