@extends('layouts.app') @section('title', 'Bumper Draw') @section('content')

{{ $bumperDraw->draw_name }}

@if (! $bumperDraw->winner_customer_id)
@csrf
@endif
@if ($bumperDraw->winner_name)
Winner: {{ $bumperDraw->winner_name }} ({{ $bumperDraw->winner_phone }}) โ€” spent {{ number_format($bumperDraw->winner_total_amount, 2) }} across {{ $bumperDraw->winner_total_count }} visits. Drawn {{ $bumperDraw->drawn_at->format('d M Y h:i A') }}.
@endif

{{ $bumperDraw->range_start->format('d M Y') }} โ€“ {{ $bumperDraw->range_end->format('d M Y') }} ยท {{ $bumperDraw->qualified_customers }} of {{ $bumperDraw->total_unique_customers }} customers qualified ({{ $bumperDraw->top_percent }}% threshold, {{ strtoupper($bumperDraw->qualification_mode) }} rule)

@forelse ($qualified as $q) @empty @endforelse
CustomerTotal SpendVisitsAvg BillRank (Spend)Rank (Visits)
{{ $q->customer->name ?? $q->customer->phone }} {{ number_format($q->total_amount, 2) }} {{ $q->total_count }} {{ number_format($q->average_bill, 2) }} #{{ $q->rank_amount }} #{{ $q->rank_count }}
No qualified customers.
@endsection