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

Sales Reports

Export Sales Register (CSV)
Total Sales
{{ number_format($summary['total_sales'],2) }}
Orders
{{ $summary['order_count'] }}
Avg Order Value
{{ number_format($summary['avg_order_value'],2) }}
Daily Sales
@foreach ($dailySales as $d) @endforeach
DateTotal
{{ $d->date }}{{ number_format($d->total,2) }}
Top Products
@foreach ($topProducts as $p) @endforeach
ProductQty SoldRevenue
{{ $p->name }}{{ $p->qty_sold }}{{ number_format($p->revenue,2) }}
@if ($branchSales && $branchSales->count())
Sales by Branch
@foreach ($branchSales as $b) @endforeach
BranchOrdersTotal
{{ $b->name }}{{ $b->order_count }}{{ number_format($b->total,2) }}
@endif @if ($paymentBreakdown->count())
Sales by Payment Method
@foreach ($paymentBreakdown as $p) @endforeach
MethodPaymentsTotal
{{ \App\Models\Payment::methodLabels()[$p->method] ?? ucfirst($p->method) }} {{ $p->payment_count }} {{ number_format($p->total,2) }}
@endif @if ($channelBreakdown->count())
Sales by Channel (Net of Delivery Commission)
@foreach ($channelBreakdown as $label => $row) @endforeach
ChannelOrdersGross SalesPlatform CommissionNet
{{ $label }} {{ $row['order_count'] }} {{ number_format($row['gross'],2) }} {{ $row['commission'] > 0 ? '-'.number_format($row['commission'],2) : '-' }} {{ number_format($row['net'],2) }}
@endif @endsection