{{ __('Add income') }} {{ __('Add expense') }} @unless ($hasMembers) {{ __('Add members') }} @else {{-- Headline KPIs --}}
{{-- Per-person comparison --}}

{{ __('Who earned & who spent') }}

{{ __('Net income vs spending per person, this month') }} ({{ $base }})

@if (empty($perPerson))

{{ __('No activity yet this month.') }}

@else @php $max = collect($perPerson)->flatMap(fn ($p) => [$p['earned'], $p['spent']])->max() ?: 1; @endphp
@foreach ($perPerson as $p)
{{ $p['name'] }} {{ __('net') }} {{ $base }} {{ number_format($p['net'], 2) }}
{{ __('Earned') }}
{{ number_format($p['earned'], 2) }}
{{ __('Spent') }}
{{ number_format($p['spent'], 2) }}
@endforeach
@endif
{{-- Side column: pots + loans + beneficiary --}}

{{ __('Pot balances') }}

@if ($potTotals->isEmpty())

{{ __('No accounts yet.') }}

@else
@foreach ($potTotals as $code => $sum)
{{ $code }} {{ number_format($sum, 2) }}
@endforeach
@endif

{{ __('Active loans') }}

{{ $loanCount }}

{{ __('open') }}

{{ $base }} {{ number_format($loanOutstanding, 2) }}

{{ __('outstanding') }}

@if (! empty($beneficiary))

{{ __('Spending goes to') }}

@foreach ($beneficiary as $b)
{{ $b['label'] }} {{ $base }} {{ number_format($b['amount'], 2) }} ยท {{ $b['pct'] }}%
@endforeach
@endif
@endunless