@php $marginPct = $profit['margin_bps'] === null ? null : $profit['margin_bps'] / 100; $statusLabel = match ($profit['status']) { 'final' => 'Final', 'estimated' => 'Estimate', default => 'Not costed', }; $statusTone = match ($profit['status']) { 'final' => 'success', 'estimated' => 'warning', default => 'muted', }; @endphp

Order profitability

Internal only · ex. tax

{{ $statusLabel }}
Gross profit
{{ $profit['costed'] ? $order->moneyFromCents($profit['profit_cents']) : '—' }}
{{ $marginPct === null ? 'Add costs to see margin' : number_format($marginPct, 1).'% margin' }}
Sales incl. {{ $order->moneyFromCents($profit['shipping_charged_cents']) }} shipping charged
{{ $order->moneyFromCents($profit['gross_sales_cents']) }}
@if($profit['refunds_cents'] > 0)
Refunds ex. tax
−{{ $order->moneyFromCents($profit['refunds_cents']) }}
@endif
Net revenue
{{ $order->moneyFromCents($profit['revenue_cents']) }}
Cost of goods sold
{{ $profit['costed'] ? '−'.$order->moneyFromCents($profit['total_cost_cents']) : '—' }}
@if($profit['costed']) @foreach($profit['costs'] as $component) @continue($component['cents'] === 0)
{{ $component['label'] }}
{{ $order->moneyFromCents($component['cents']) }}
@endforeach @endif @if($profit['shipping_margin_cents'] !== null)
Shipping margin charged − paid
{{ $profit['shipping_margin_cents'] < 0 ? '−' : '' }}{{ $order->moneyFromCents(abs($profit['shipping_margin_cents'])) }}
@endif
@if($profit['period_label'])

Order date {{ $order->created_at->format('j M Y') }}, so it counts in the {{ $profit['period_label'] }} P&L.

@endif @if($profit['tax_cents'] > 0)

{{ $order->moneyFromCents($profit['tax_cents']) }} tax collected is excluded from revenue.

@endif @if($order->status === 'canceled')

Canceled order. Record any costs already incurred as a loss.

@endif @unless($profit['costed']) Add order costs @endunless