@extends('layouts.app') @section('title', 'Order ' . $storefrontOrder->order_number) @section('page-title', 'Order: ' . $storefrontOrder->order_number) @section('content')
← All Orders @if($storefrontOrder->invoice) 📄 View Invoice ⬇ Download PDF @endif @if($waUrl) 💬 WhatsApp Customer @endif
{{-- Order details --}}
{{-- Items --}}

Order Items

@foreach($storefrontOrder->items as $item) @endforeach
Item Qty Unit Price GST Total
{{ $item->item_name }} {{ $item->quantity }} {{ $item->unit }} ₹{{ number_format($item->unit_price, 2) }} {{ $item->gst_rate }}%
₹{{ number_format($item->gst_amount, 2) }}
₹{{ number_format($item->total_amount, 2) }}
Total: ₹{{ number_format($storefrontOrder->total_amount, 2) }}
{{-- Invoice link --}} @if($storefrontOrder->invoice)

Invoice Auto-Generated

{{ $storefrontOrder->invoice->invoice_number }} — {{ $storefrontOrder->invoice->invoice_date->format('d M Y') }}

Open Invoice →
@endif
{{-- Right sidebar --}}
{{-- Customer info --}}

Customer

{{ $storefrontOrder->customer_name }}

📞 {{ $storefrontOrder->customer_phone }}

@if($storefrontOrder->customer_email)

📧 {{ $storefrontOrder->customer_email }}

@endif @if($storefrontOrder->delivery_address)

Delivery Address

{{ $storefrontOrder->delivery_address }}

@endif @if($storefrontOrder->special_instructions)

Special Instructions

{{ $storefrontOrder->special_instructions }}

@endif
{{-- Order status --}}

Update Status

@csrf
@foreach(['pending','confirmed','preparing','ready','delivered','cancelled'] as $status) @endforeach
{{-- Payment info --}}

Payment

Mode{{ $storefrontOrder->payment_mode }}
Status {{ $storefrontOrder->payment_status }}
@if($storefrontOrder->razorpay_payment_id)
Razorpay ID{{ $storefrontOrder->razorpay_payment_id }}
@endif
Total ₹{{ number_format($storefrontOrder->total_amount, 2) }}
{{-- Notifications --}}

Notifications Sent

{{ $storefrontOrder->email_sent ? '✓' : '○' }} Email invoice
{{ $storefrontOrder->whatsapp_sent ? '✓' : '○' }} WhatsApp invoice
@endsection