@extends('layouts.app') @section('title', 'POS Report') @section('breadcrumb') @endsection @section('content') {{-- Date Filter --}}
{{-- Summary Stats --}}
Rs. {{ number_format($totalSales, 0) }}
Total Sales
{{ $orders->count() }}
Total Transactions
Rs. {{ number_format($totalRefunds, 0) }}
Total Refunds
Rs. {{ number_format($totalSales - $totalRefunds, 0) }}
Net Sales
{{-- Payment Methods Breakdown --}}
Payment Methods
@php $totalPayments = array_sum($paymentSummary); @endphp
Cash
Rs. {{ number_format($paymentSummary['cash'], 2) }}
Card
Rs. {{ number_format($paymentSummary['card'], 2) }}
Bank Transfer
Rs. {{ number_format($paymentSummary['bank_transfer'], 2) }}
Mobile
Rs. {{ number_format($paymentSummary['mobile'], 2) }}
@if($paymentSummary['other'] > 0)
Other
Rs. {{ number_format($paymentSummary['other'], 2) }}
@endif
{{-- Order Status Summary --}}
Order Status
{{ $statusSummary['completed'] }}
Completed
{{ $statusSummary['pending'] }}
Pending
{{ $statusSummary['cancelled'] }}
Cancelled
{{ $statusSummary['refunded'] }}
Refunded
{{-- Recent Transactions --}}
Recent Transactions
Last 50 transactions
@foreach($orders->take(50) as $order) @endforeach
Date/Time Order # Cashier Payment Method Amount Status
{{ $order->created_at->format('M d, Y') }}
{{ $order->created_at->format('h:i A') }}
{{ $order->order_number }} {{ $order->user?->name ?? '-' }} @foreach($order->payments as $payment) {{ ucfirst(str_replace('_', ' ', $payment->method)) }} @endforeach Rs. {{ number_format($order->total_amount, 2) }} @php $statusClass = match($order->status) { 'completed' => 'status-completed', 'pending' => 'status-pending', 'cancelled' => 'status-cancelled', 'refunded' => 'status-refunded', default => 'status-pending' }; @endphp {{ ucfirst($order->status) }}
@push('styles') @endpush @endsection