@extends('layouts.app') @section('title', 'Orders') @section('breadcrumb') @endsection @section('content') {{-- Stats Cards --}}
{{ $orders->total() }}
Total Orders
{{ $orders->where('status', 'completed')->count() }}
Completed
{{ $orders->where('status', 'pending')->count() }}
Pending
{{ $orders->where('status', 'refunded')->count() }}
Refunded
{{-- Filters --}}
{{-- Orders Table --}}
All Orders
{{ $orders->total() }} orders
@forelse($orders as $order) @empty @endforelse
Order # Date Customer Cashier Items Total Status Actions
{{ $order->order_number }}
{{ $order->created_at->format('M d, Y') }}
{{ $order->created_at->format('h:i A') }}
@if($order->customer)
{{ $order->customer->name }}
@if($order->customer->phone) {{ $order->customer->phone }} @endif @else Walk-in Customer @endif
{{ $order->user?->name ?? '-' }} {{ $order->items_count ?? $order->items()->count() }} items 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) }}
@if($order->status !== 'completed' && $order->status !== 'refunded')
@csrf @method('DELETE')
@endif

No orders found

Create First Sale
@if($orders->hasPages())
{{ $orders->links() }}
@endif
@endsection