@extends('backend.layout') @section('backend_content')

{{ $shop->name }} Report

Sales, orders, and product performance summary
Total Products

{{ $summary['total_products'] }}

In Stock

{{ $summary['in_stock_products'] }}

Total Orders

{{ $summary['orders_count'] }}

Gross Sales

{{ number_format($summary['gross_sales'], 0) }} BDT

Order Status Breakdown
Pending: {{ (int) ($statusCounts['pending'] ?? 0) }} Processing: {{ (int) ($statusCounts['processing'] ?? 0) }} Completed: {{ (int) ($statusCounts['completed'] ?? 0) }} Cancelled: {{ (int) ($statusCounts['cancelled'] ?? 0) }}

Items Sold {{ $summary['items_sold'] }}
Avg. Order Value {{ $summary['orders_count'] > 0 ? number_format($summary['gross_sales'] / $summary['orders_count'], 0) : 0 }} BDT
Top Products
@forelse ($topProducts as $row) @empty @endforelse
Product Qty Revenue
{{ $row->product_name }} {{ (int) $row->qty_sold }} {{ number_format((float) $row->revenue, 0) }} BDT
No product sales data yet.
Recent Orders
Latest 10 orders for this shop
@forelse ($recentOrders as $order) @empty @endforelse
Order # Customer Status Amount Date
{{ $order->order_number }}
{{ $order->customer_name }}
{{ $order->phone }}
@if ($order->status === 'pending') Pending @elseif ($order->status === 'processing') Processing @elseif ($order->status === 'completed') Completed @elseif ($order->status === 'cancelled') Cancelled @else {{ ucfirst($order->status) }} @endif {{ number_format((float) $order->total_amount, 0) }} BDT {{ \Carbon\Carbon::parse($order->created_at)->format('M d, Y') }}
No orders found for this shop yet.
@endsection