{{-- One product's billing at a glance. Every figure is counted from BCP's own tables. Where a product has nothing yet — no plans, no subscriptions — the screen says so and offers the way to start, rather than showing an example of what it would look like if it did. --}}
@php $tones = [ 'trialing' => 'bg-sky-50 text-sky-700 border-sky-200', 'active' => 'bg-emerald-50 text-emerald-700 border-emerald-200', 'past_due' => 'bg-amber-50 text-amber-700 border-amber-200', 'grace' => 'bg-orange-50 text-orange-700 border-orange-200', 'suspended' => 'bg-rose-50 text-rose-700 border-rose-200', 'cancelled' => 'bg-slate-800 text-slate-400 border-slate-700', ]; @endphp {{-- ── Headline figures ───────────────────────────────────────── --}}

Plans

{{ number_format($summary['plans']) }}

What this product sells

Subscriptions

{{ number_format($summary['subscriptions']) }}

All time, every account

In force

{{ number_format($summary['live']) }}

Trialing, active, past due or in grace

Needs attention

{{ number_format(($summary['by_status']['past_due'] ?? 0) + ($summary['by_status']['grace'] ?? 0)) }}

Past due or in grace

{{-- ── By status ──────────────────────────────────────────────── --}}

Subscriptions by status

Each one links to the list filtered to it.

@foreach ($summary['by_status'] as $status => $count) {{ str_replace('_', ' ', $status) }} {{ $count }} @endforeach
{{-- ── Recent subscriptions ───────────────────────────────────── --}}

Recent subscriptions

View all →
@forelse ($recent as $subscription) @php $value = $subscription->status instanceof \BackedEnum ? $subscription->status->value : (string) $subscription->status; @endphp @empty @endforelse
Account Plan Status Renews
{{ $subscription->tenant?->name ?? 'No account' }} {{ $subscription->plan?->name ?? 'Plan removed' }} {{ str_replace('_', ' ', $value) }} {{ $subscription->current_period_ends_at?->format('M d, Y') ?? '—' }}

Nobody is subscribed to {{ $product->name }} yet

@if ($summary['plans'] === 0) It has no plans either — add one before it can be sold. @else Subscriptions appear here as accounts take up one of its {{ $summary['plans'] }} {{ Str::plural('plan', $summary['plans']) }}. @endif