@push('header') @endpush

Moon Traders
Vehicle Report
Total Records: {{ number_format($vehicles->total()) }}
Printed by: {{ auth()->user()->name }} | {{ now()->format('d-M-Y h:i A') }}

@php $groupedVehicles = $vehicles->groupBy(fn($v) => $v->supplier_id ?? 0); @endphp @forelse ($groupedVehicles as $supplierId => $supplierVehicles) @foreach ($supplierVehicles as $idx => $vehicle) @if ($idx === 0) @endif @endforeach @empty @endforelse
Sr# Supplier Van # Vehicle Type Salesman Driver Status
{{ $vehicles->firstItem() + $vehicles->search(fn($v) => $v->id === $vehicle->id) }} {{ $vehicle->supplier?->supplier_name ?? '-' }} {{ $vehicle->registration_number }} {{ $vehicle->vehicle_type ?? '-' }} {{ $vehicle->employee?->name ?? '-' }} {{ $vehicle->driver_name ?? '-' }}
{{ $vehicle->driver_phone ?? '-' }}
@if($vehicle->is_active) Active @else Inactive @endif
No records found.
@if ($vehicles->hasPages())
{{ $vehicles->links() }}
@endif