@extends('layouts.admin') @section('title', 'Sales Report') @section('page_title', 'Sales Report') @section('content')
{{ $totals['orders'] }}
Total Orders
{{ \App\Support\Currency::symbol() }}{{ number_format($totals['revenue'], 2) }}
Total Revenue
{{ $totals['items'] }}
Total Items
{{ \App\Support\Currency::symbol() }}{{ number_format($totals['revenue'] > 0 ? $totals['revenue'] / $totals['orders'] : 0, 2) }}
Avg Order Value
Filter Report
@forelse($orders as $order) @php $paymentMethod = $order->transactions->first()?->paymentMethod?->name ?? 'N/A'; @endphp @empty @endforelse
Order # Customer Email Payment Method Items Total Status Date Actions
{{ $order->order_number }} {{ $order->user->name }} {{ $order->user->email }} {{ $paymentMethod }} {{ $order->items->count() }} {{ \App\Support\Currency::symbol() }}{{ number_format($order->total, 2) }} {{ ucfirst($order->status) }} {{ $order->created_at->format('M d, Y') }} View
No sales data found
@if($orders->count())
@endif @endsection