@php $items = $record->items; $invoice = $record->invoice; $order = $record; @endphp
{{-- Header strip --}}
Order
#{{ $order->id }}
Date
{{ $order->created_at->format('d M Y H:i') }}
@if($invoice)
Invoice
{{ $invoice->invoice_number }}
@endif
Payment
{{ str_replace('_', ' ', $order->payment_method ?? '—') }} @if($order->payment_ref) ({{ $order->payment_ref }}) @endif
Status
{{ ucfirst($order->status) }}
{{-- Addresses + Shipping --}}
Shipping Address
{{ $order->shipping_name }}
@if($order->shipping_address) {{ $order->shipping_address }}
@endif @if($order->shipping_city) {{ $order->shipping_city }}@if($order->shipping_province), {{ $order->shipping_province }}@endif
@endif @if($order->shipping_postal_code) {{ $order->shipping_postal_code }}
@endif @if($order->shipping_phone) {{ $order->shipping_phone }}
@endif @if($order->shipping_email) {{ $order->shipping_email }} @endif
Shipping
Carrier: {{ $order->shipping_carrier ?? '—' }}
@if($order->shipping_service)
Service: {{ $order->shipping_service }}
@endif
Waybill: @if($order->waybill_number) {{ $order->waybill_number }} @else — @endif
Cost: R {{ number_format($order->shipping_cost, 2) }}
Totals
Subtotal (excl.): R {{ number_format($order->subtotal_excl, 2) }}
VAT: R {{ number_format($order->vat_amount, 2) }}
Shipping: R {{ number_format($order->shipping_cost, 2) }}
Total: R {{ number_format($order->total_incl, 2) }}
{{-- Products --}}
Products ({{ $items->count() }})
@foreach($items as $item) @endforeach
Product Part # Brand Qty Unit Total
{{ $item->product_name }} {{ $item->part_number ?? '—' }} {{ $item->brand_name ?? '—' }} {{ $item->qty }} R {{ number_format($item->unit_price_incl, 2) }} R {{ number_format($item->line_total_incl, 2) }}