@extends('pdf.reports.base') @section('content')
| Duty Code | Date & Route | Vehicle & Category | Driver / Operator | Start & End Time | Duration | Distance (KM) | Status |
|---|---|---|---|---|---|---|---|
|
@if($tour->driverDuty)
{{ $tour->driverDuty->duty_code }}
Shift: {{ ucfirst($tour->driverDuty->shift) }}
@else
#TOUR-{{ str_pad($tour->id, 5, '0', STR_PAD_LEFT) }}
@endif
|
{{ $tour->start_time ? $tour->start_time->format('d M Y') : 'N/A' }}
{{ $tour->route->name ?? ($tour->driverDuty->route->name ?? 'Sweeping Tour') }}
|
{{ $tour->vehicle->vehicle_number ?? 'N/A' }}
{{ $tour->vehicle->category->name ?? 'Standard' }}
|
{{ $tour->employee->full_name ?? ($tour->user->name ?? 'N/A') }}
@if($tour->employee?->employee_code)
ID: {{ $tour->employee->employee_code }}
@endif
|
S: {{ $tour->start_time ? $tour->start_time->format('h:i A') : 'N/A' }}
E: {{ $tour->end_time ? $tour->end_time->format('h:i A') : 'Active' }}
|
{{ $tour->formatted_duration }} | {{ number_format((float) $tour->total_distance_km, 3) }} KM | @if($tour->status === 'completed') Completed @elseif($tour->status === 'in_progress') Active @else {{ ucfirst($tour->status) }} @endif |
| No sweeping shift logs found matching the selected filter criteria. | |||||||
| TOTAL SUMMARY ({{ $tours->count() }} SHIFTS): | {{ number_format((float) $totalDistanceKm, 3) }} KM | {{ $totalDurationFormatted }} | |||||