@extends('reports.pdf.layout')
@section('title', $data['meta']['title'])
@php
$meta = $data['meta'];
$kpis = $data['kpis'];
$axes = $data['axes'];
$actions = $data['actions'];
$fmtNum = function ($v, $unit = '') {
if ($v === null) return '—';
$s = is_numeric($v) ? number_format((float) $v, 0, ',', ' ') : (string) $v;
return trim($s . ' ' . $unit);
};
$toneBg = ['danger' => '#FEE2E2', 'warning' => '#FEF3C7', 'info' => '#DBEAFE', 'success' => '#D1FAE5', 'neutral' => '#F3F4F6'];
$toneColor = ['danger' => '#991B1B', 'warning' => '#92400E', 'info' => '#1E3A8A', 'success' => '#065F46', 'neutral' => '#374151'];
@endphp
@section('content')
DADYCAR FLEET MANAGER
{{ $meta['title'] }}
Fiscalité
{{ $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') }}
Indicateurs clés
Score conformité
{{ $kpis['compliance_score']['value'] }}
{{ $kpis['compliance_score']['delta_label'] }}
Risques identifiés
{{ $kpis['risks_count']['value'] }}
{{ $kpis['risks_count']['delta_label'] }}
Montant des risques
{{ $fmtNum($kpis['risk_amount']['value']) }}{{ $kpis['risk_amount']['unit'] }}
{{ $kpis['risk_amount']['delta_label'] }}
Actions correctives
{{ $kpis['corrective_count']['value'] }}{{ $kpis['corrective_count']['unit'] }}
{{ $kpis['corrective_count']['delta_label'] }}
Conformité par axe fiscal
@if (!empty($axes))
@foreach ($axes as $a)
{{ $a['label'] }} — {{ $a['value'] }}
{{ $a['meta'] }}
@endforeach
@else
Aucun axe à afficher.
@endif
Plan d'actions correctives
@if (!empty($actions))
@foreach ($actions as $a)
@php
$tone = $a['tone'] ?? 'neutral';
$bg = $toneBg[$tone]; $fg = $toneColor[$tone];
@endphp
{{ $a['title'] }}
@endforeach
@else
Aucune action requise.
@endif
@endsection