@extends('layouts.admin') @section('title', 'Reports') @section('content')
Sales

Reports

Export low stock
Reset
@foreach ($metrics as $metric)
{{ $metric['label'] }} {{ $metric['value'] }} {{ $metric['note'] }}
@endforeach

Monthly Revenue

Last 12 months
@foreach ($monthlyRevenue as $month)
{{ $month['label'] }}
{{ $month['revenue_display'] }}
@endforeach

Low Stock

At or below {{ $lowStockThreshold }} units
Export CSV
@forelse ($lowStockItems->take(8) as $item)
{{ $item['product'] }} {{ $item['variant'] }} {{ $item['stock'] }} left
@empty

No low stock items.

@endforelse

Best-Selling Products

{{ $from->format('M d, Y') }} to {{ $to->format('M d, Y') }}
@forelse ($bestSellingProducts as $product) @empty @endforelse
Product Units Sold Revenue
{{ $product['name'] }} {{ number_format($product['units_sold']) }} {{ $product['revenue_display'] }}
No sales found for this date range.

Low Stock Export Preview

{{ $lowStockItems->count() }} rows available for CSV export
@forelse ($lowStockItems->take(12) as $item) @empty @endforelse
Type Product Variant Sale Price Purchase Price Stock
{{ $item['type'] }} {{ $item['product'] }} {{ $item['variant'] }} {{ $item['sale_price'] }} {{ $item['purchase_price'] }} {{ $item['stock'] }}
No low stock items.
@endsection