@extends('layouts.clivax') @section('content')

High Value Customers Report

Back to Reports Customers
High Value Customers

{{ $customers->count() }}

Total Revenue

${{ number_format($customers->sum('total_revenue'), 2) }}

Avg. Revenue

${{ number_format($customers->avg('total_revenue'), 2) }}

Top Customer
${{ number_format($customers->max('total_revenue'), 2) }}
Customer Tiers

Gold Tier

$1,000+

{{ $customers->where('total_revenue', '>=', 5000)->count() }} customers

Silver Tier

$500 - $999

{{ $customers->whereBetween('total_revenue', [1000, 4999])->count() }} customers

Bronze Tier

$100 - $499

{{ $customers->whereBetween('total_revenue', [500, 999])->count() }} customers

@foreach($customers as $index => $customer) @endforeach
Rank Customer Customer Type Total Revenue Shipments Avg. Shipment First Shipment Last Shipment Status
#{{ $index + 1 }}
{{ strtoupper(substr($customer->name, 0, 1)) }}
{{ $customer->name }} @if($customer->company_name)
{{ $customer->company_name }} @endif
{{ $customer->phone }}
{{ ucfirst($customer->customer_type) }} ${{ number_format($customer->total_revenue, 2) }} {{ $customer->total_shipments }} ${{ number_format($customer->average_shipment_value, 2) }} {{ $customer->first_shipment_date ? $customer->first_shipment_date->format('M d, Y') : 'Never' }} {{ $customer->last_shipment_date ? $customer->last_shipment_date->format('M d, Y') : 'Never' }} {{ ucfirst($customer->status) }}
Revenue by Customer Type
Customers by Type
@endsection @push('scripts') @endpush