{{ __('This month') }} · {{ $totals['from']->format('d M') }} – {{ $totals['to']->format('d M') }}
{{ __('Reseller') }} {{ __('P&L') }}.
{{ __('Every billed message is a wallet charge. Revenue is what your customers paid; Meta cost is what Meta bills you; the gap is your margin. Prices & costs are set on') }} {{ __('Wallet rules') }}.
@php
$kpis = [
['Revenue (charged)', $cur($totals['revenue_minor']), 'text-ink-900'],
['Meta cost', $cur($totals['cost_minor']), 'text-ink-700'],
['Margin (profit)', $cur($totals['margin_minor']), 'text-wa-deep'],
['Wallet float held', $cur($totals['wallet_float_minor']), 'text-ink-900'],
];
@endphp
@foreach ($kpis as [$label, $val, $cls])
@endforeach
{{ __($label) }}
{{ $val }}
{{ __('Billed messages') }}
{{ number_format($totals['messages']) }}
{{ __('No Meta cost set') }}
{{ number_format($totals['unpriced_msgs']) }}
{{ __(':n billed message(s) had no Meta cost set for their country/category, so their margin is counted as pure revenue. Add those rows on', ['n' => number_format($totals['unpriced_msgs'])]) }}
{{ __('Wallet rules → Sync Meta costs') }}.
@endif
{{-- Per-workspace P&L --}}
{{ __('Per-workspace (this month)') }}
| {{ __('Workspace') }} | {{ __('Msgs') }} | {{ __('Revenue') }} | {{ __('Meta cost') }} | {{ __('Margin') }} | {{ __('Wallet balance') }} |
|---|---|---|---|---|---|
| {{ $r['workspace_name'] }} | {{ number_format($r['messages']) }} | {{ $cur($r['revenue_minor']) }} | {{ $cur($r['cost_minor']) }} | {{ $cur($r['margin_minor']) }} | {{ $cur(((int) $r['credits_left']) * \App\Services\MessageCreditRate::minorPerCredit()) }} |
| {{ __('No billed messages this month yet.') }} | |||||