@extends('reports.pdf.layout') @section('title', $data['meta']['title']) @php $meta = $data['meta']; $kpis = $data['kpis']; $sites = $data['by_site']; $trucks = array_values(array_filter($data['by_vehicle'], fn ($v) => $v['unidentified'] > 0)); $limit = \App\Services\Api\V1\Fleet\Reports\Generators\Telematique\TL07Generator::PDF_DETAIL_LIMIT; $details = array_slice($data['unidentified_trips'], 0, $limit); $hidden = count($data['unidentified_trips']) - count($details); $fmt = function ($v, $decimals = 0, $unit = '') { if ($v === null) return '—'; return trim(number_format((float) $v, $decimals, ',', ' ') . ' ' . $unit); }; @endphp @section('content')
DADYCAR FLEET MANAGER

{{ $meta['title'] }}

Télématique {{ $meta['code'] }} Période : {{ $meta['period']['label'] }} · {{ $meta['site_label'] }} · {{ $meta['total_vehicles'] }} véhicules · Généré le {{ $meta['generated_at']->locale('fr')->isoFormat('D MMMM YYYY, HH:mm') }}
Trajets
{{ $fmt($kpis['trips']) }}
{{ $kpis['vehicles_with_trips'] }} camions ont roulé
Sans identification
{{ $fmt($kpis['unidentified']) }}
{{ $kpis['unidentified_pct'] !== null ? $fmt($kpis['unidentified_pct'], 1, '%') . ' des trajets' : 'Aucun trajet' }} · {{ $kpis['vehicles_concerned'] }} camions
Identifiés par badge
{{ $fmt($kpis['badge_pct'], 1, '%') }}
Par affectation manuelle : {{ $fmt($kpis['assignment_pct'], 1, '%') }}
Km sans identification
{{ $fmt($kpis['km_unidentified'], 1) }}km
Infractions non désignables sur ces trajets

Par site

@if (!empty($sites)) @foreach ($sites as $s) @endforeach
Site Camions Trajets Par badge Par affectation Sans identification Km sans identification Identifiés
{{ $s['site'] }} {{ $s['vehicles'] }} {{ $s['trips'] }} {{ $s['badge'] }} {{ $s['assignment'] }} {{ $s['unidentified'] }} {{ $fmt($s['km_unidentified'], 1) }} {{ $fmt($s['identified_pct'], 1, '%') }}
@else

Aucun trajet sur la période.

@endif

Camions avec des trajets sans identification

@if (!empty($trucks)) @foreach ($trucks as $v) @endforeach
Site Camion Modèle Trajets Sans identification Km Dernier trajet sans identification
{{ $v['site'] }} {{ $v['plate'] }} {{ $v['model'] }} {{ $v['trips'] }} {{ $v['unidentified'] }} {{ $fmt($v['km_unidentified'], 1) }} {{ $v['last_unidentified'] }}
@else

Tous les trajets de la période sont identifiés.

@endif @if (!empty($details))

Trajets sans identification

@foreach ($details as $t) @endforeach
Date Départ Arrivée Site Camion Km Durée Adresse de départ Adresse d'arrivée Dernier conducteur identifié
{{ $t['date'] }} {{ $t['start'] }} {{ $t['end'] }} {{ $t['site'] }} {{ $t['plate'] }} {{ $fmt($t['km'], 1) }} {{ $t['duration'] }} {{ $t['start_address'] }} {{ $t['end_address'] }} {{ $t['last_driver'] }}
@if ($hidden > 0)

{{ $hidden }} autres trajets sans identification : la liste complète est dans l'export Excel.

@endif @endif

Un trajet est identifié quand une affectation du camion le couvre : badge lu dans le camion ou affectation manuelle. Les heures sont celles de Paris.

@endsection