@once @push('styles') @endpush @endonce @php $shipments = collect($shipments ?? [])->filter(); @endphp @if($shipments->isNotEmpty())
@foreach($shipments as $index => $shipment) @php $itemRows = $shipment->relationLoaded('items') ? $shipment->items : $shipment->items()->get(); $itemCount = $itemRows->count() > 0 ? $itemRows->count() : ($shipment->item_name ? 1 : 0); $openShipment = $index === 0; @endphp
@endforeach
@else

No shipments linked to this payment.

@endif @once @push('scripts') @endpush @endonce