@php $typeBadge = [ 'bank' => 'indigo', 'cash' => 'emerald', 'mobile_money' => 'sky', 'director' => 'amber', 'other' => 'slate', ]; $metrics = [ [ 'label' => __('Accounts to bring over'), 'value' => number_format(count($rows)), 'icon' => 'banknotes', 'accent' => '#124a61', 'sub' => __('Active accounts'), ], [ 'label' => __('Cash carried in'), 'value' => $baseCode . ' ' . number_format($countedBase, 2), 'icon' => 'arrow-down-tray', 'accent' => '#10b981', 'sub' => __('Counted, in base currency'), ], [ 'label' => __('To be posted'), 'value' => $baseCode . ' ' . number_format($diffBase, 2), 'icon' => 'arrows-right-left', 'accent' => $diffBase >= 0 ? '#0ea5e9' : '#f43f5e', 'sub' => __('Difference vs the books'), ], [ 'label' => __('Books start'), 'value' => $alreadySet ? \Illuminate\Support\Carbon::parse($alreadySet)->format('j M Y') : __('Not set'), 'icon' => 'flag', 'accent' => $alreadySet ? '#8b5cf6' : '#94a3b8', 'sub' => $alreadySet ? __('Cut-over recorded') : __('Awaiting cut-over'), ], ]; @endphp
{{ __('Back to Treasury') }} {{-- What this screen actually does to the books, in plain terms. --}}

{{ __('How the cut-over works') }}

{{ __('Count what is really in each account on the cut-over date and type it below. Any difference between your count and what the books say is charged to a system "Opening Balances (Pre-System)" account, one per currency, so every account starts on its true figure.') }}

{{ __('The entry is posted as a transfer, so it creates no sale, no cost and no income: the month you go live is not distorted. Only the difference is posted, so running this again with the same figures changes nothing.') }}

{{-- KPIs --}}
@foreach ($metrics as $m)

{{ $m['label'] }}

{{ $m['value'] }}

{{ $m['sub'] }}
@endforeach
{{-- When the clean books start --}}

{{ __('Balances are brought forward at the end of this day. Everything before it is treated as pre-system.') }}

{{ __('Shown against every brought-forward entry in the treasury ledger.') }}

@if ($alreadySet)
{{ __('A cut-over was already recorded for :date. Re-running it only posts what has changed since, but check the differences below before saving.', ['date' => \Illuminate\Support\Carbon::parse($alreadySet)->format('j M Y')]) }}
@endif
{{-- Count every account --}}

{{ __('Count each account') }}

{{ __('Type what was really held on the cut-over date. Leave a box blank to skip that account.') }}

@forelse ($rows as $row) @php $account = $row['account']; @endphp @empty @endforelse
{{ __('Account') }} {{ __('Type') }} {{ __('Books say') }} {{ __('Actually held') }} {{ __('To post') }}
{{ $account->name }} @if ($account->reference) {{ $account->reference }} @endif {{ $account->type_label }} {{ $account->currency_code }} {{ number_format($row['system'], 2) }}
{{ $account->currency_code }}
@if (abs($row['diff']) < 0.01) — @else {{ $row['diff'] > 0 ? '+' : '−' }}{{ number_format(abs($row['diff']), 2) }} @endif
{{-- What the pre-system era already carries --}} @if ($parked->isNotEmpty())

{{ __('Held against the pre-system era') }}

{{ __('The balancing side of everything brought forward. It is not a shortfall, it is the value of trading done before the books started.') }}

@foreach ($parked as $p)
{{ $p->currency_code }}
{{ number_format($p->balance, 2) }}
@endforeach
@endif {{-- Sticky commit bar --}}

{{ __('Posts a dated transfer for every account whose count differs from the books.') }}

{{ __('Cancel') }} {{ __('Run cut-over') }} {{ __('Posting…') }}