@php $money = fn ($v) => number_format((float) $v, 2); $pct = fn ($v) => rtrim(rtrim(number_format((float) $v, 2), '0'), '.'); $cards = [ ['key' => 'available', 'label' => __('Available to Spend'), 'icon' => 'banknotes', 'chip' => 'bg-emerald-50 text-emerald-600', 'hint' => __('Collected accruals − spend')], ['key' => 'pending', 'label' => __('Pending Collection'), 'icon' => 'clock', 'chip' => 'bg-amber-50 text-amber-600', 'hint' => __('Accrued, invoice not yet paid')], ['key' => 'spent', 'label' => __('Total Spent'), 'icon' => 'receipt-percent', 'chip' => 'bg-violet-50 text-violet-600', 'hint' => __('Marketing-category expenses')], ['key' => 'accrued', 'label' => __('Total Accrued'), 'icon' => 'arrow-trending-up', 'chip' => 'bg-indigo-50 text-indigo-600', 'hint' => __('All marketing earmarks to date')], ]; @endphp
{{ __('Current allocation rate') }}
{{ $pct($stats['rate']) }}% {{ __('of each completed job\'s gross profit') }}
{{ $card['label'] }}
{{ $value }}
{{ $card['hint'] }}
{{ __('Accrued vs spent each month, with the cumulative fund balance.') }}
{{ __('Credits (job accruals) and debits (marketing spend), newest first.') }} @if ($ledgerTotal > $ledger->count()) {{ __('Showing the latest :n of :total.', ['n' => $ledger->count(), 'total' => $ledgerTotal]) }} @endif
| {{ __('Date') }} | {{ __('Entry') }} | {{ __('Amount') }} | {{ __('Balance') }} |
|---|---|---|---|
| {{ optional($row['date'])->format('d M Y') ?? '—' }} |
$row['type'] === 'credit',
'bg-rose-50 text-rose-600' => $row['type'] === 'debit',
])>
{{ $row['label'] }} @if ($row['detail']){{ \Illuminate\Support\Str::limit(strip_tags($row['detail']), 60) }} @endif |
{{ $row['type'] === 'credit' ? '+' : '−' }}{{ $baseCode }} {{ $money($row['amount']) }} | {{ $baseCode }} {{ $money($row['balance']) }} |
|
|
|||