HGV Inspection Sheet

Sheet #{{ $inspectionSheet->id }}

Job Card: {{ $inspectionSheet->jobCard?->job_card_number ?? ('JCT'.($inspectionSheet->jobCard?->team_job_card_id ?? $inspectionSheet->job_card_id)) }}
Inspection Type: {{ $inspectionSheet->inspectionType?->name ?? '-' }}
Inspection Date: {{ optional($inspectionSheet->inspection_date)->format('d/m/Y H:i') }}
Vehicle: {{ $inspectionSheet->vehicle?->registration ?? '-' }}
Customer: {{ $inspectionSheet->customer?->name ?? '-' }}
Technician: {{ $inspectionSheet->technician?->name ?? '-' }}
Technician Signed: {{ optional($inspectionSheet->techician_signature_date)->format('d/m/Y H:i') }}
Foreman: {{ $inspectionSheet->foreman?->name ?? '-' }}
Foreman Approved: {{ optional($inspectionSheet->foreman_signature_date)->format('d/m/Y H:i') }}
@php $rows = $inspectionSheet->itemResults->sortBy(function ($row) { return ($row->inspectionItem?->inspectionCategory?->im_number ?? 9999).'-'.($row->inspectionItem?->code ?? ''); }); $currentCategory = null; @endphp @foreach($rows as $row) @php $category = $row->inspectionItem?->inspectionCategory; $categoryName = $category ? ($category->im_number.' - '.$category->name) : 'Uncategorised'; @endphp @if($currentCategory !== $categoryName) @php $currentCategory = $categoryName; @endphp @endif @endforeach
DVSA Ref Defect / Check Mark Dangerous Remarks
{{ $categoryName }}
{{ $row->inspectionItem?->code ?? '-' }} {{ $row->inspectionItem?->deficiency ?? '-' }}
{{ $row->inspectionItem?->description ?? '' }}
{{ $markingLabels[$row->marking_code] ?? 'Not marked' }} {{ $row->is_dangerous ? 'Yes' : 'No' }} {{ $row->remarks ?: '-' }}