@php $items = $getRecord()->items()->whereIn('current_status', [1, 2, 3])->get(); @endphp
@foreach($items as $item)
{{-- Status Badge --}} @if($item->current_status == 1) Needs Order @elseif($item->current_status == 2) Ordered @else Sent to SS @endif @if($item->supplier) {{ $item->supplier->code }} @endif {{-- B2B Local Delivered Badge --}} @if($item->b2b_delivery_model_id > 1) 🚚 B2B Local @endif {{-- Will Call / In Stock GA Badge --}} @if($item->b2b_delivery_model_id > 1 && $item->wc_supplier) @php $supplierMapWc = [ "GALTL01" => "In Stock - GA", "GALTL02" => "KSI Will Call", "GALTL03" => "TYC Will Call", "GALTL04" => "DEPO Will Call" ]; $wcLabel = $supplierMapWc[$item->wc_supplier] ?? null; @endphp @if($wcLabel) {{ $wcLabel }} @endif @endif {{-- Part Number --}} {{ $item->ordered_part ?? 'N/A' }} {{-- Quantity --}} x{{ $item->qty }} {{-- Auto Fulfill Toggle --}} {{-- Supplier Dropdown --}}
@endforeach @if($items->isEmpty()) No items pending fulfillment @endif