@php($listTitle = $completed ? 'Order Complete' : 'Orders') {{-- One view for both lists. Order Complete has no status tabs and no Create button: new orders start in Orders. --}} @if ($statusTabs) @endif OrderCustomerTotalGatewayPaymentStatusActions @foreach ($orders as $order) {{ $order->order_number }}
{{ $order->created_at->format('d M Y') }}
{{ $order->customer_name }}
{{ $order->customer_email }}
{{ $order->currency }} {{ number_format($order->total_amount, 2) }} {{ $order->payment_gateway }} {{ $order->payment_status }} {{-- JavaScript saves this on change; without it the Save button below does the same. --}}
@csrf @method('PUT')
{{-- Order Complete only views and prints; editing and deleting happen in Orders, and the server holds to that too. --}} @if ($completed) @else @endif Label @unless ($completed)
@csrf @method('DELETE')
@endunless @endforeach @if ($orders->hasPages()) @endif
@foreach ([['customer_name', 'Buyer name', 'text', 150], ['customer_email', 'Buyer email', 'email', 150], ['customer_phone', 'Buyer phone', 'tel', 30]] as [$field, $label, $type, $maxLength])
@endforeach {{-- Read only: checkout sets it from the area list. The server ignores this field. --}}
@foreach ([['subtotal', 'Subtotal', true], ['total_amount', 'Total', true]] as [$field, $label, $isRequired])
@endforeach