@extends('pdf.reports.base') @section('content') @forelse($vehicles as $index => $v) @empty @endforelse @if($vehicles->count() > 0) @endif
# Vehicle Reg. No. Category & Type Assigned Driver Tours Count Total Distance Duty Hours Status
{{ $index + 1 }} {{ $v->vehicle_number }} @if($v->power_source)
{{ $v->power_source }}
@endif
{{ $v->category->name ?? 'General Fleet' }}
{{ $v->primary_function ?? 'Road Sweeping' }}
{{ $v->assignedEmployee ? $v->assignedEmployee->full_name : 'Unassigned / Float' }} {{ $v->tours_count ?? $v->tours->count() }} {{ number_format((float) ($v->total_distance_km ?? 0), 3) }} KM {{ $v->formatted_total_hours ?? '0.0 hrs' }} @if($v->status === 'active') Active @elseif($v->status === 'maintenance') Service @else {{ ucfirst($v->status) }} @endif
No vehicles found matching the selected filter criteria.
FLEET TOTALS ({{ $vehicles->count() }} VEHICLES): {{ $totalTours }} Shifts {{ number_format((float) $totalFleetDistanceKm, 3) }} KM {{ $totalFleetHoursFormatted }}
@endsection