{{-- resources/views/backend/orders/details_ajax.blade.php --}} {{-- Form tag with NO action or method to completely block native submission --}}
@csrf @method('PUT')
Invoice #{{ $order->invoice_no }}
{{ $order->created_at->format('d M, h:i A') }}
{{-- 1. Status & Basic Info --}}
{{-- 2. Customer Info --}}
{{-- 3. Customer Previous Order History Section --}}
Previous Order History

Loading history...
{{-- 4. Fraud Check Auto Load Section --}}
Courier History (Fraud Check)

Fetching data from API...
{{-- 5. Product Section --}}
Products
@foreach($order->details as $line) @php $product = $line->product; $variants = $product->variations ?? collect(); $selectedV = $line->variation; $priceNow = $line->unit_price; $lineTotal = $priceNow * $line->quantity; @endphp
{{ $product?->name ?? 'Product Not Found' }}
SKU: {{ $product?->sku ?? 'N/A' }}
@if($variants->count() > 0) @else
No Variants
@endif
{{ number_format($lineTotal, 2, '.', '') }}
@endforeach
{{-- 6. Courier & Calculation --}}
{{-- Redx Extra --}}
{{-- Pathao Extra --}}

Grand Total
{{ (int)$order->final_amount }}
{{-- SUBMIT BUTTON: Added onclick event --}}
{{-- =============================================== DRAWER JAVASCRIPT (LOCALIZED LOGIC) =============================================== --}}