@php $canceled = $order->status === 'canceled'; $address = $order->shipping_address ?? []; $shipment = $order->fulfillments->sortByDesc('fulfilled_at')->first(); $steps = [ ['Placed', 'clipboard-check', true, $order->created_at->format('d M, H:i')], [$order->payment_due_at && $order->payment_status !== 'paid' && $order->payment_due_at->isFuture() ? 'On account' : 'Payment', 'landmark', $order->payment_status === 'paid' || ($order->payment_due_at?->isFuture() ?? false), $order->payment_status === 'paid' ? 'Received' : ($order->payment_due_at ? 'Due '.$order->payment_due_at->format('d M') : 'Pending')], ['In production', 'factory', true, null], ['Dispatched', 'truck', $order->fulfillment_status === 'fulfilled', $shipment?->fulfilled_at?->format('d M') ?? ($order->fulfillment_status === 'partially_fulfilled' ? 'Partly' : null)], ]; @endphp
All orders
{{ $order->payment_status === 'paid' ? 'Tax invoice' : 'Invoice' }} @if($wsMember->canOrder())
@csrf
@endif
{{-- Tracker --}}
@if($canceled)

This order was canceled{{ $order->canceled_at ? ' on '.$order->canceled_at->format('d M Y') : '' }}.

@else
    @foreach($steps as $index => [$label, $icon, $done, $meta])
  1. @if($index < count($steps) - 1) @endif

    {{ $label }}

    {{ $meta ?? '—' }}

  2. @endforeach
@if($order->isOverdue())

Payment was due {{ $order->payment_due_at->format('d M Y') }}. Please settle to keep your credit line open.

@endif @endif
@foreach($order->lines as $line) @endforeach
ItemQtyUnitTotal

{{ $line->title }}

{{ $line->variant_title ?: '—' }} · {{ $line->sku }}

{{ number_format($line->quantity) }} {{ $order->moneyFromCents((int) $line->unit_price_cents) }} {{ $order->moneyFromCents((int) $line->total_cents) }}
Subtotal{{ $order->money('subtotal_cents') }}
Trade discount−{{ $order->money('discount_cents') }}
Freight{{ $order->shipping_cents ? $order->money('shipping_cents') : 'Quoted at dispatch' }}
GST{{ $order->money('tax_cents') }}
Total{{ $order->money('total_cents') }}
@if($order->savingsCents() > 0)

You saved {{ $order->moneyFromCents($order->savingsCents()) }} against retail on this order

@endif