@extends('layouts.app') @section('title', 'Order Details') @section('breadcrumb') @endsection @section('content')
{{-- Order Items --}}
Order Items
{{ $order->items->count() }} items
@foreach($order->items as $item) @endforeach
Product Qty Unit Price Total
{{ $item->product_name }}
@if($item->product) {{ $item->product->sku }} @endif
{{ $item->quantity }} {{ $item->unit }} Rs. {{ number_format($item->unit_price, 2) }} Rs. {{ number_format($item->total, 2) }}
{{-- Order Notes --}} @if($order->notes)
Notes

{{ $order->notes }}

@endif
{{-- Order Summary Sidebar --}}
{{-- Order Info --}}
Order Info
Status: @php $statusClass = match($order->status) { 'completed' => 'status-completed', 'pending' => 'status-pending', 'cancelled' => 'status-cancelled', 'refunded' => 'status-refunded', default => 'status-pending' }; @endphp {{ ucfirst($order->status) }}
Order Date: {{ $order->created_at->format('M d, Y') }}
Time: {{ $order->created_at->format('h:i A') }}
Cashier: {{ $order->user?->name ?? '-' }}
Customer: {{ $order->customer?->name ?? 'Walk-in' }}
{{-- Payment Summary --}}
Summary
Subtotal: Rs. {{ number_format($order->subtotal, 2) }}
@if($order->discount_amount > 0)
Discount: - Rs. {{ number_format($order->discount_amount, 2) }}
@endif @if($order->tax_amount > 0)
Tax: Rs. {{ number_format($order->tax_amount, 2) }}
@endif
TOTAL: Rs. {{ number_format($order->total_amount, 2) }}
Paid: Rs. {{ number_format($order->paid_amount, 2) }}
@if($order->change_amount > 0)
Change: Rs. {{ number_format($order->change_amount, 2) }}
@endif
{{-- Payment Methods --}} @if($order->payments && $order->payments->count() > 0)
Payments
@foreach($order->payments as $payment)
@php $paymentIcon = match($payment->method) { 'cash' => 'bi-cash', 'card' => 'bi-credit-card', 'bank_transfer' => 'bi-bank', default => 'bi-wallet2' }; @endphp {{ ucfirst(str_replace('_', ' ', $payment->method)) }}
Rs. {{ number_format($payment->amount, 2) }}
@endforeach
@endif {{-- Actions --}} @if($order->status === 'completed')
@endif
@push('styles') @endpush @endsection