@extends('layouts.app') @section('title', 'Sales Report') @section('breadcrumb')
{{ $from->format('d M Y') }} — {{ $to->format('d M Y') }}
| Method | Count | Total |
|---|---|---|
| {{ ucfirst(str_replace('_',' ',$m->payment_method)) }} | {{ $m->count }} | ৳{{ number_format($m->total,0) }} |
| Date | Count | Total |
|---|---|---|
| {{ \Carbon\Carbon::parse($d->sale_date)->format('d M Y') }} | {{ $d->count }} | ৳{{ number_format($d->total,0) }} |
| Invoice | Date | Customer | Type | Method | Total | Paid | Due | Status |
|---|---|---|---|---|---|---|---|---|
| {{ $sale->invoice_no }} | {{ $sale->sale_date->format('d M Y') }} | {{ $sale->customer?->name ?? 'Walk-in' }} | {{ ucfirst($sale->sale_type) }} | {{ ucfirst(str_replace('_',' ',$sale->payment_method)) }} | ৳{{ number_format($sale->total_amount,2) }} | ৳{{ number_format($sale->paid_amount,2) }} | {{ $sale->due_amount > 0 ? '৳'.number_format($sale->due_amount,2) : '—' }} | @php $sc=['completed'=>'success','hold'=>'warning','returned'=>'danger']; @endphp{{ ucfirst($sale->status) }} |
| No sales in this period | ||||||||
| Totals: | ৳{{ number_format($totals->total_revenue,2) }} | ৳{{ number_format($totals->total_paid,2) }} | ৳{{ number_format($totals->total_due,2) }} | |||||