@extends('vendor.layout.app') @section('title', 'Sales Report') @section('content')

My Sales Report

Summary
Orders
{{ $totals->orders_count ?? 0 }}
Qty Sold
{{ $totals->qty_sold ?? 0 }}
Revenue
₹{{ number_format($totals->revenue ?? 0, 2) }}
@if($viewType === 'daily' && $dailyBreakdown)
Daily Breakdown
@forelse($dailyBreakdown as $row) @empty @endforelse
Date Orders Qty Sold Revenue (₹)
{{ \Carbon\Carbon::parse($row->date)->format('d M Y') }} {{ $row->orders_count }} {{ $row->qty_sold }} ₹{{ number_format($row->revenue, 2) }}
No daily sales found.
@endif @if($viewType === 'monthly' && $monthlyBreakdown)
Monthly Breakdown
@forelse($monthlyBreakdown as $row) @empty @endforelse
Month Orders Qty Sold Revenue (₹)
{{ \Carbon\Carbon::create($row->year, $row->month)->format('M Y') }} {{ $row->orders_count }} {{ $row->qty_sold }} ₹:{{ number_format($row->revenue, 2) }}
No monthly sales found.
@endif @if($viewType === 'summary')
Product Breakdown
@forelse($productBreakdown as $row) @empty @endforelse
Product SKU Qty Sold Revenue (₹)
{{ $row->product_name ?? ('Product #' . $row->vendor_product_id) }} {{ $row->sku ?? '-' }} {{ $row->qty_sold }} ₹:{{ number_format($row->revenue, 2) }}
No product sales found.
@endif @if($orderLines->count() > 0)
Order Details
Showing {{ $orderLines->count() }} of {{ $orderLines->total() }} orders
@foreach($orderLines as $order) @endforeach
Order # Date Product SKU Qty Price (₹) Total (₹)
{{ $order->order_number ?? ('Order #' . $order->order_id) }} {{ \Carbon\Carbon::parse($order->created_at)->format('d M Y') }} {{ $order->product_name ?? ('Product #' . $order->vendor_product_id) }} {{ $order->sku ?? '-' }} {{ $order->quantity }} ₹{{ number_format($order->price, 2) }} ₹:{{ number_format($order->total, 2) }}
{{ $orderLines->appends(request()->query())->links() }}
@endif
@endsection