@extends('admin.layouts.main') @section('title', 'Orders by Date Range') @section('content')

Orders by Date Range

Select Date Range
Total Orders
{{ isset($apiData['total_orders']) ? $apiData['total_orders'] : 0 }}
Total Revenue
Rp {{ number_format(isset($apiData['total_revenue']) ? $apiData['total_revenue'] : 0, 0, ',', '.') }}
Average Order Value
Rp {{ number_format(isset($apiData['average_order_value']) ? $apiData['average_order_value'] : 0, 0, ',', '.') }}
Peak Day
{{ isset($apiData['peak_day']['date']) ? date('d M', strtotime($apiData['peak_day']['date'])) : 'N/A' }}
{{ isset($apiData['peak_day']['orders']) ? $apiData['peak_day']['orders'] : 0 }} orders
Daily Orders Breakdown
Order Details
Showing {{ isset($apiData['orders']) ? count($apiData['orders']) : 0 }} orders
@if(isset($apiData['orders']) && count($apiData['orders']) > 0) @foreach($apiData['orders'] as $order) @endforeach @else @endif
Order ID Date Customer Items Total (Rp) Payment Method Status Actions
#{{ $order['order_id'] }} {{ date('d/m/Y H:i', strtotime($order['created_at'])) }} {{ $order['customer_name'] }} {{ $order['item_count'] }} Rp {{ number_format($order['total_amount'], 0, ',', '.') }} {{ ucfirst(str_replace('_', ' ', $order['payment_method'])) }} {{ ucfirst($order['status']) }}
No orders found for the selected date range
Order Status Distribution
Top Customers
@if(isset($apiData['top_customers']) && count($apiData['top_customers']) > 0) @foreach($apiData['top_customers'] as $customer) @endforeach @else @endif
Customer Orders Total Spent Avg. Order
{{ $customer['name'] }}
{{ $customer['name'] }}
{{ $customer['email'] }}
{{ $customer['order_count'] }} Rp {{ number_format($customer['total_spent'], 0, ',', '.') }} Rp {{ number_format($customer['average_order'], 0, ',', '.') }}
No customer data available
@endsection @section('scripts') @endsection