Order Investigation Portal

Search for orders by order number and branch to investigate issues and complaints.

@error('orderNumber')

{{ $message }}

@enderror
@error('branchId')

{{ $message }}

@enderror
@error('search')

{{ $message }}

@enderror
@if($showDetails && $order)
@if(count($issues) > 0)

Found {{ count($issues) }} Issue(s)

    @foreach($issues as $issue)
  • {{ $issue['title'] }}: {{ $issue['message'] }} @if(isset($issue['severity']) && $issue['severity'] === 'high') HIGH @endif
  • @endforeach
@else

No issues found. Order appears to be in good standing.

@endif

Order Information

#{{ $order->order_number }}

{{ $order->id }}

{{ strtoupper($order->status) }}

{{ ucfirst(str_replace('_', ' ', $order->order_status->value)) }}

{{ ucfirst(str_replace('_', ' ', $order->order_type)) }}

{{ $order->created_at->timezone(timezone())->format('Y-m-d H:i:s') }}

{{ $order->created_at->diffForHumans() }}

{{ $order->branch->name ?? 'N/A' }}

@if($order->table)

{{ $order->table->table_code }} (Status: {{ $order->table->available_status }})

@endif

{{ number_format($order->total, 2) }}

{{ number_format($order->payments->where('payment_method', '!=', 'due')->sum('amount'), 2) }}

@if($order->isPaymentComplete()) Complete @else Incomplete @endif

@if(count($issues) > 0)
@if($order->status === 'pending_verification' && $order->isPaymentComplete()) This order can be fixed (pending_verification → paid) @endif
@endif
@if($order->kot->isNotEmpty())

KOTs ({{ $order->kot->count() }})

@foreach($order->kot as $kot)
KOT #{{ $kot->id }} {{ ucfirst(str_replace('_', ' ', $kot->status)) }}
{{ $kot->created_at->timezone(timezone())->format('Y-m-d H:i:s') }}
@if($kot->items->isNotEmpty())
Items: {{ $kot->items->count() }}
@endif
@endforeach
@endif @if($order->payments->isNotEmpty())

Payments ({{ $order->payments->count() }})

@foreach($order->payments as $payment) @endforeach
Method Amount Date
{{ ucfirst($payment->payment_method) }} {{ number_format($payment->amount, 2) }} {{ $payment->created_at->timezone(timezone())->format('Y-m-d H:i:s') }}
@endif @if($order->items->isNotEmpty())

Items ({{ $order->items->count() }})

@foreach($order->items as $item) @endforeach
Item Quantity Price Total
@if($item->menuItem) @if(!empty($item->menuItem->name)) {{ $item->menuItem->name }} @else Menu Item #{{ $item->menu_item_id }} (Empty Name) @endif @if($item->menuItemVariation) ({{ $item->menuItemVariation->name }}) @endif @elseif($item->menu_item_id) Menu Item #{{ $item->menu_item_id }} (Not Found) @else N/A @endif {{ $item->quantity }} {{ number_format($item->price, 2) }} {{ number_format($item->quantity * $item->price, 2) }}
@endif
@endif