{{ __('Orders & Analytics') }}

Live revenue metrics, merchandise sales breakdown, and Prodigi fulfillment tracking

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
Date Span Chooser
Active Period: {{ $currentFilters['range_label'] }}
@php $presets = [ 'all' => 'All Time', 'today' => 'Today', '7d' => 'Last 7 Days', '30d' => 'Last 30 Days', 'this_month' => 'This Month', 'last_month' => 'Last Month', 'this_year' => 'This Year', ]; @endphp @foreach($presets as $key => $label) @php $isActive = ($currentFilters['range'] === $key); $url = route('admin.orders.index', array_merge(request()->except(['range', 'from_date', 'to_date', 'page']), ['range' => $key])); @endphp {{ $label }} @endforeach
@if(request('product_id')) @endif @if(request('status')) @endif @if(request('search')) @endif
@if($currentFilters['range'] === 'custom' || $currentFilters['from_date'] || $currentFilters['to_date']) Reset Date @endif
Gross Sales
£
£{{ number_format($analytics['gross_revenue'], 2) }}
{{ $analytics['paid_orders_count'] }} paid orders @if($analytics['pending_revenue'] > 0) +£{{ number_format($analytics['pending_revenue'], 2) }} pend. @endif
Net Profit
£{{ number_format($analytics['net_profit_total'], 2) }}
{{ $analytics['profit_margin'] }}% Margin Net Return
Supplier COGS & Tax
£{{ number_format($analytics['supplier_cost_total'] + $analytics['supplier_cost_tax_total'], 2) }}
Net: £{{ number_format($analytics['supplier_cost_total'], 2) }} + VAT: £{{ number_format($analytics['supplier_cost_tax_total'], 2) }}
Supplier Shipping & Tax
£{{ number_format($analytics['supplier_shipping_total'] + $analytics['supplier_shipping_tax_total'], 2) }}
Net: £{{ number_format($analytics['supplier_shipping_total'], 2) }} + VAT: £{{ number_format($analytics['supplier_shipping_tax_total'], 2) }} We charged: £{{ number_format($analytics['postage_collected'], 2) }}
Stripe Fees
£{{ number_format($analytics['stripe_fee_total'], 2) }}
Card processing (1.5% + 20p)
Orders & AOV
{{ $analytics['total_orders_count'] }}
{{ $analytics['conversion_rate'] }}% Paid AOV: £{{ number_format($analytics['aov'], 2) }}

Product Performance & Mix

Sales volume and revenue distribution for {{ $currentFilters['range_label'] }}

Prodigi: {{ $prodigiCounts['in_progress'] }} In Progress {{ $prodigiCounts['complete'] }} Complete @if($prodigiCounts['error'] > 0) {{ $prodigiCounts['error'] }} Error @endif
@foreach($productBreakdown as $productItem) @php $isFilteredProduct = ($currentFilters['product_id'] == $productItem['id']); $filterUrl = $isFilteredProduct ? route('admin.orders.index', request()->except(['product_id', 'page'])) : route('admin.orders.index', array_merge(request()->except(['page']), ['product_id' => $productItem['id']])); @endphp

{{ $productItem['name'] }}

Base £{{ number_format($productItem['price'], 2) }}
{{ $productItem['paid_orders'] }} Sold
£{{ number_format($productItem['revenue'], 2) }} {{ $productItem['share_percent'] }}% rev
Cost: £{{ number_format($productItem['cogs'], 2) }} Profit: +£{{ number_format($productItem['profit'], 2) }} ({{ $productItem['margin'] }}%)
Total: {{ $productItem['total_orders'] }} orders @if($isFilteredProduct) Showing in table @else Filter orders @endif
@endforeach
@if($currentFilters['from_date']) @endif @if($currentFilters['to_date']) @endif
@if($currentFilters['search'] || $currentFilters['product_id'] || $currentFilters['status'] || $currentFilters['range'] !== 'all') Reset @endif
@if($currentFilters['search'] || $currentFilters['product_id'] || $currentFilters['status'] || $currentFilters['range'] !== 'all')
Active filters: @if($currentFilters['range'] !== 'all') Period: {{ $currentFilters['range_label'] }} × @endif @if($currentFilters['product_id']) @php $selectedProduct = $products->firstWhere('id', $currentFilters['product_id']); @endphp Product: {{ $selectedProduct->name ?? 'Selected' }} × @endif @if($currentFilters['status']) Status: {{ ucfirst($currentFilters['status']) }} × @endif @if($currentFilters['search']) Search: "{{ $currentFilters['search'] }}" × @endif Showing {{ $orders->total() }} {{ Str::plural('order', $orders->total()) }}
@endif
@if($orders->isEmpty())

No orders found

No orders match your selected date range or filter criteria.

@else
@foreach($orders as $order) @endforeach
Order Buyer Details Product & Options Value Profit Payment Fulfillment Date Actions
@if($order->mockup_image) Mockup preview @elseif($order->resource && $order->resource->file) Artwork preview @else
#{{ $order->id }}
@endif
#{{ $order->id }} @if($order->stripe_id) {{ Str::limit($order->stripe_id, 9) }} @endif
{{ $order->first_name }} {{ $order->last_name }}
{{ $order->email }}
@if($order->telephone)
{{ $order->telephone }}
@endif
{{ $order->product->name ?? 'Custom Product' }}
@if(!empty($order->options))
{{ collect($order->options)->map(fn($v, $k) => "$k: $v")->join(', ') }}
@endif @if($order->shipping_country)
Ship to: {{ $order->shipping_city ? $order->shipping_city . ', ' : '' }}{{ $order->shipping_country }}
@endif
£{{ number_format((float)($order->total ?? 0), 2) }} @if((float)($order->postage_cost ?? 0) > 0) (post £{{ number_format((float)$order->postage_cost, 2) }}) @endif @if($order->net_profit !== null)
{{ (float)$order->net_profit >= 0 ? '+' : '' }}£{{ number_format((float)$order->net_profit, 2) }} @if($order->profit_margin !== null) {{ number_format($order->profit_margin, 0) }}% @endif
cogs: £{{ number_format((float)(($order->supplier_cost ?? 0) + ($order->supplier_cost_tax ?? 0)), 2) }} | ship: £{{ number_format((float)(($order->supplier_shipping_cost ?? 0) + ($order->supplier_shipping_tax ?? 0)), 2) }} | fee: £{{ number_format((float)($order->stripe_fee ?? 0), 2) }}
@else — @endif
{{ $order->paid ? 'Paid' : 'Pending' }} @if($order->prodigi_status) @php $statusClass = match($order->prodigi_status) { 'Complete' => 'bg-green-100 text-green-800 dark:bg-green-950 dark:text-green-300 border-green-200', 'InProgress', 'Allocated' => 'bg-blue-100 text-blue-800 dark:bg-blue-950 dark:text-blue-300 border-blue-200', 'Error' => 'bg-red-100 text-red-800 dark:bg-red-950 dark:text-red-300 border-red-200', default => 'bg-gray-100 text-gray-700 border-gray-200' }; @endphp {{ $order->prodigi_status }} @if($order->prodigi_order_id)
{{ $order->prodigi_order_id }}
@endif @else {{ $order->paid ? 'Pending push' : 'Unpaid' }} @endif
{{ $order->created_at->format('d M Y') }}
{{ $order->created_at->format('H:i') }}
View Edit @if($order->paid && in_array($order->prodigi_status, ['Error', null]))
@csrf
@endif
@csrf @method('DELETE')
{{ $orders->links() }}
@endif