@php /** * Month-End Summary pack (FRS §7) as a branded document. Same figures as * /month-end, same order; this is the copy that gets handed to a director or * an accountant. $preview = true renders for an on-screen browser view. */ $preview = $preview ?? false; $accent = $setting?->primary_color ?: '#124a61'; $ink = '#111827'; $muted = '#6b7280'; $soft = '#9ca3af'; $line = '#e5e7eb'; $wash = '#f8fafc'; $good = '#047857'; $bad = '#be123c'; $font = $setting?->font_family ? $setting->font_family.', Arial, sans-serif' : 'Arial, Helvetica, sans-serif'; $logoData = null; if ($setting?->logo_path) { try { $logoFull = \Illuminate\Support\Facades\Storage::disk('public')->path($setting->logo_path); if (is_file($logoFull)) { $logoData = 'data:'.(mime_content_type($logoFull) ?: 'image/png').';base64,'.base64_encode(file_get_contents($logoFull)); } } catch (\Throwable $e) { $logoData = null; } } $companyName = $setting?->company_name ?: $team?->name; $base = $pack['base']; $money = fn ($v) => trim(($symbol ?: ($base.' ')).number_format((float) $v, 2)); $signed = fn ($v) => ((float) $v >= 0 ? '+ ' : '− ').trim(($symbol ?: ($base.' ')).number_format(abs((float) $v), 2)); $income = $pack['income']; $bridge = $pack['bridge']; $profit = $pack['profit']; $cash = $pack['cash']; $equity = $pack['equity']; $snapshot = $pack['snapshot']; @endphp
|
@if ($logoData)
{{ $companyName }}
@endif
|
{{ __('Month-End Summary') }}
{{ __('Period') }}: {{ $pack['period']['label'] }}
{{ __('Prepared') }}: {{ $preparedOn->format('d M Y, H:i') }}
{{ $base }}
|
| {{ __('Period closed') }} — {{ __('closed by :who on :when. The cash figures below are read from the frozen snapshot, not recomputed.', [ 'who' => $snapshot->closer?->name ?? __('the system'), 'when' => optional($snapshot->locked_at)->timezone(config('app.display_timezone'))->format('j M Y, H:i') ?? '—', ]) }} |
| {{ __('Period open') }} — {{ __('these figures are provisional. Anything back-dated into :month still changes them.', ['month' => $pack['period']['label']]) }} @if ($snapshot?->reopened_at) {{ __('This month was reopened by :who: “:reason”.', [ 'who' => $snapshot->reopener?->name ?? __('an administrator'), 'reason' => $snapshot->reopen_reason ?: __('no reason given'), ]) }} @endif |
|
{{ __('Gross Sales') }}
{{ $money($income['gross_sales']) }}
{{ __('Invoiced') }}
|
{{ __('Cash Collected') }}
{{ $money($profit['cash_collected']) }}
{{ __('Mgmt revenue') }}
|
{{ __('Gross Profit') }}
{{ $money($profit['gross_profit']) }}
{{ number_format($profit['gross_margin_pct'], 1) }}% {{ __('margin') }}
|
{{ __('Net Profit') }}
{{ $money($profit['net_profit']) }}
{{ number_format($profit['net_margin_pct'], 1) }}% {{ __('margin') }}
|
{{ __('Closing Cash') }}
{{ $money($cash['closing']) }}
{{ $cash['source'] === 'snapshot' ? __('Frozen') : __('Live') }}
|
| {{ __('Gross Sales (invoiced)') }} {{ __('Total value of invoices raised in the month. This is what "Gross Sales" means on the directors\' sheet.') }} | {{ $money($bridge['gross_sales']) }} |
| {{ $step['label'] }}{{ $step['hint'] }} | {{ $signed($step['amount']) }} |
| {{ __('Cash Collected (management revenue)') }} {{ __('The revenue basis behind every profit figure in this pack.') }} | {{ $money($bridge['cash_collected']) }} |
| {{ __('Unreconciled difference, please report this') }} | {{ $money($bridge['residual']) }} |
|
|
| {{ __('Line') }} | {{ __('Categories included') }} | {{ __('Amount') }} |
|---|---|---|
| {{ $l['label'] }} | {{ $l['categories'] ? implode(', ', array_keys($l['categories'])) : '—' }} | {{ $money($l['amount']) }} |
| {{ __('Total expenses recorded') }} | {{ $money($pack['expenses']['total']) }} | |
| {{ __('Opening') }} | {{ __('In') }} | {{ __('Out') }} | {{ __('Closing') }} |
|---|---|---|---|
| {{ $money($cash['opening']) }} | {{ $money($cash['in']) }} | {{ $money($cash['out']) }} | {{ $money($cash['closing']) }} |
|
@endforeach
|
|
| {{ __('Account') }} | {{ __('Reason') }} | {{ __('Approved by') }} | {{ __('Effect on profit') }} |
|---|---|---|---|
| {{ $adj->account_label }} | {{ $adj->reason }} | {{ $adj->approver?->name ?? '—' }} | {{ $signed($adj->signedAmount()) }} |
| {{ __('Net adjustment') }} | {{ $signed($pack['adjustments']['net']) }} | ||