@php $d = $insight; $who = $panel === 'seller' ? 'bought from you' : 'ordered'; $maxState = max(1, (float) $d['states']->max('sales')); @endphp
Customers
{{ number_format($d['buyers']) }}
{{ $who }} in this period
New customers
{{ number_format($d['new']) }}
first order {{ $panel === 'seller' ? 'with you' : 'ever' }} · {{ inr($d['new_spend']) }}
Returning customers
{{ number_format($d['returning']) }}
ordered before · {{ inr($d['returning_spend']) }}
Spend per customer
{{ inr($d['avg_spend']) }}
{{ $d['repeat_in_period'] }} ordered more than once @if ($d['signups'] !== null) · {{ number_format($d['signups']) }} new sign-ups @endif
@if ($d['buyers'] > 0)

New vs returning

@php($newPct = round($d['new'] / max(1, $d['buyers']) * 100))
New {{ $newPct }}%Returning {{ 100 - $newPct }}%
@endif

Top customers

@if ($d['top']->isEmpty()) @else
@foreach ($d['top'] as $c) @endforeach
CustomerCityOrdersSpend
{{ $c->name }}@if ($c->is_new) new@endif @if ($panel === 'admin')
{{ $c->email }}
@endif
{{ $c->city }} {{ $c->orders }} {{ inr($c->spend) }}
@endif

Top states

@forelse ($d['states'] as $s)
{{ $s->place ?: 'Unknown' }}{{ inr($s->sales) }} · {{ $s->orders }} {{ Str::plural('order', $s->orders) }}
@empty

No orders yet.

@endforelse

Top cities

    @forelse ($d['cities'] as $c)
  • {{ $c->place ?: 'Unknown' }}{{ inr($c->sales) }} · {{ $c->orders }}
  • @empty
  • No orders yet.
  • @endforelse

Counts customers with at least one item not cancelled. "New" means their first order {{ $panel === 'seller' ? 'with your store' : 'on the marketplace' }} was in this period.