@extends('layouts.app') @section('title', 'Daily Sales Report') @section('breadcrumb') @endsection @section('content') {{-- Date Picker --}}
{{-- Summary Stats --}}
{{ $summary['total_orders'] }}
Total Orders
Rs. {{ number_format($summary['total_sales'], 0) }}
Total Sales
Rs. {{ number_format($summary['cash_sales'], 0) }}
Cash Sales
Rs. {{ number_format($summary['card_sales'], 0) }}
Card Sales
{{-- Order Status Breakdown --}}
Order Status
Completed {{ $summary['completed'] }}
Cancelled {{ $summary['cancelled'] }}
Refunded {{ $summary['refunded'] }}
{{-- Sales Summary --}}
Sales Summary
Gross Sales Rs. {{ number_format($summary['total_sales'] + $summary['total_discount'], 2) }}
Discounts - Rs. {{ number_format($summary['total_discount'], 2) }}
Tax Collected Rs. {{ number_format($summary['total_tax'], 2) }}

Net Sales Rs. {{ number_format($summary['total_sales'], 2) }}
{{-- Hourly Sales Chart --}}
Hourly Sales
@for($h = 6; $h <= 22; $h++) @php $hour = str_pad($h, 2, '0', STR_PAD_LEFT); $data = $hourlyData[$hour] ?? ['count' => 0, 'total' => 0]; $maxTotal = $hourlyData->max('total') ?: 1; $percentage = ($data['total'] / $maxTotal) * 100; @endphp
{{ $h > 12 ? ($h - 12) . 'PM' : ($h == 12 ? '12PM' : $h . 'AM') }}
@if($data['count'] > 0) {{ $data['count'] }} Rs. {{ number_format($data['total'], 0) }} @else - @endif
@endfor
{{-- Transactions List --}}
All Transactions
{{ $orders->count() }} orders
@forelse($orders as $order) @empty @endforelse
Time Order # Customer Cashier Items Payment Amount Status
{{ $order->created_at->format('h:i A') }} {{ $order->order_number }} {{ $order->customer?->name ?? 'Walk-in' }} {{ $order->user?->name ?? '-' }} {{ $order->items->count() }} @foreach($order->payments as $payment) {{ ucfirst($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) }}

No transactions on this date

@push('styles') @endpush @endsection