@csrf

Billing Address

{{ $this->order->billing_street_address }}

{{ $this->order->billing_city }}

{{ $this->order->billing_state }}, {{ $this->order->billing_zip }}

{{ $this->order->billing_country }}

Shipping Address

{{ $this->order->shipping_street_address }}

{{ $this->order->shipping_city }}

{{ $this->order->shipping_state }}, {{ $this->order->shipping_zip }}

{{ $this->order->shipping_country }}

Order Items

@foreach($this->order->items as $item) @endforeach
Product Status Part # Best Carrier Supplier ETA Stock
Extra
partslink
@php $allowShipStatuses = ['needs_order', 'ordered', 'dropshipped']; $canShip = in_array($item->current_status, $allowShipStatuses); @endphp
{{ $item->name ?: ($item->product ? $item->product->name : 'N/A') }}
@php $sku = 'N/A'; if ($item->product) { $sku = $item->product->sku; } elseif ($item->part_num) { // Try to find product by part_num $product = \App\Models\Product::where('partslink', $item->part_num) ->orWhere('sku', $item->part_num) ->first(); if ($product) { $sku = $product->sku; } } @endphp SKU: {{ $sku }}
@php $statusColors = [ 'needs_order' => 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200', 'ordered' => 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200', 'shipped' => 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200', 'cancelled' => 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200', ]; $statusColor = $statusColors[$item->current_status] ?? 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300'; @endphp {{ ucfirst(str_replace('_', ' ', $item->current_status)) }} @php $partslink = 'N/A'; if ($item->product) { $partslink = $item->product->partslink; } elseif ($item->part_num) { // Try to find product by part_num or use part_num itself $product = \App\Models\Product::where('partslink', $item->part_num) ->orWhere('sku', $item->part_num) ->first(); if ($product) { $partslink = $product->partslink ?: $item->part_num; } else { $partslink = $item->part_num; } } @endphp {{ $partslink }} @if($item->current_status == 'needs_order') Calculating... @endif @if($item->supplier) @else @endif

Shipment Details

@php $addressLines = explode("\n", $this->order->shipping_street_address); $line1 = $addressLines[0] ?? ''; $line2 = $addressLines[1] ?? ''; @endphp

@if(config('gopartsship.enabled') && auth()->user() && auth()->user()->is_admin) @php $allowedUsers = config('gopartsship.allowed_user_ids', []); $canUseGps = empty($allowedUsers) || in_array(auth()->user()->user_id, $allowedUsers); $gpsWarehouseCodes = $canUseGps ? array_keys(config('gopartsship.warehouses', [])) : []; $gpsExclusiveWarehouses = $canUseGps ? collect(config('gopartsship.warehouses', []))->filter(fn($w) => !empty($w['exclusive']))->keys()->toArray() : []; @endphp @if($canUseGps)
Provider:
@endif @endif

Dropship Order Items

@php // Show all items in dropship section, just like the classic system $dropshipItems = $this->order->items; @endphp @if($dropshipItems->count() > 0) @foreach($dropshipItems as $item) @endforeach @else @endif
Product Status Part # Supplier ETA
{{ $item->name ?: ($item->product ? $item->product->name : 'N/A') }}
@php $dropshipSku = 'N/A'; if ($item->product) { $dropshipSku = $item->product->sku; } elseif ($item->part_num) { // Try to find product by part_num $dropshipProduct = \App\Models\Product::where('partslink', $item->part_num) ->orWhere('sku', $item->part_num) ->first(); if ($dropshipProduct) { $dropshipSku = $dropshipProduct->sku; } } @endphp SKU: {{ $dropshipSku }}
Dropship @php $dropshipPartslink = 'N/A'; if ($item->product) { $dropshipPartslink = $item->product->partslink; } elseif ($item->part_num) { // Try to find product by part_num or use part_num itself $dropshipProduct2 = \App\Models\Product::where('partslink', $item->part_num) ->orWhere('sku', $item->part_num) ->first(); if ($dropshipProduct2) { $dropshipPartslink = $dropshipProduct2->partslink ?: $item->part_num; } else { $dropshipPartslink = $item->part_num; } } @endphp {{ $dropshipPartslink }} @if($item->supplier) @else @endif
No dropship items in this order
(if available)
Cancel