@extends('layouts.app') @section('title', 'Sales Report') @section('breadcrumb') @endsection @section('content') @php $saleTypeRetailSelected = request('sale_type') === 'retail' ? 'selected' : ''; $saleTypeWholesaleSelected = request('sale_type') === 'wholesale' ? 'selected' : ''; @endphp @include('reports.partials.date-filter', ['extraFilters' => '
'])
{{ number_format($totals->total_count) }}
Total Sales
৳{{ number_format($totals->total_revenue,0) }}
Revenue
৳{{ number_format($totalProfit,0) }}
Profit
৳{{ number_format($totals->total_due,0) }}
Outstanding Due
By Payment Method
@foreach($byPaymentMethod as $m) @endforeach
MethodCountTotal
{{ ucfirst(str_replace('_',' ',$m->payment_method)) }} {{ $m->count }} ৳{{ number_format($m->total,0) }}
Daily Summary
@foreach($dailySummary as $d) @endforeach
DateCountTotal
{{ \Carbon\Carbon::parse($d->sale_date)->format('d M Y') }} {{ $d->count }} ৳{{ number_format($d->total,0) }}
Sales Transactions ({{ $sales->total() }})
@forelse($sales as $sale) @empty @endforelse
InvoiceDateCustomerTypeMethodTotalPaidDueStatus
{{ $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) }}
@if($sales->hasPages())@endif
@endsection