@php($title = 'Order Details') @php($heading = 'Order Details') @php($sidebar = view()->make('dashboard.partials.customer-sidebar')->render()) @extends('layouts.dashboard', compact('title','heading','sidebar')) @section('content')

Order #{{ $order->id }}

Back to Orders

Summary

Status: {{ ucfirst($order->status ?? '—') }}
Payment Status: {{ ucfirst($order->payment_status ?? '—') }}
Payment Method: {{ $order->payment_method ?? '—' }}
Reference: {{ $order->payment_reference ?? '—' }}
Amount: {{ number_format(($order->price_cents ?? 0)/100, 2) }} {{ $order->currency ?? 'USD' }}
Placed: {{ $order->created_at }}

Product

Name: {{ optional($order->product)->name ?? '—' }}
Download: @php($canDownload = (strtolower($order->status ?? '') === 'approved') && (strtolower($order->payment_status ?? '') === 'paid')) @if($canDownload && optional($order->product)->slug) Download product @else @endif
Download Invoice @php($eligibleReturn = in_array(strtolower($order->status ?? ''), ['delivered','completed','approved']) && strtolower($order->refund_status ?? '') !== 'requested') @if($eligibleReturn)
@csrf
@else Return not eligible or already requested. @endif
@endsection