@extends('reports.pdf.layout') @section('title', $data['meta']['title']) @php $meta = $data['meta']; $kpis = $data['kpis']; $portfolio = $data['portfolio']; $calendar = $data['calendar']; $fmt = fn ($v, $unit = '') => is_numeric($v) ? number_format((float) $v, 0, ',', ' ') . ' ' . $unit : '—'; $statusColors = [ 'conforme' => ['bg' => '#D1FAE5', 'fg' => '#065F46'], 'non_conforme' => ['bg' => '#FEE2E2', 'fg' => '#991B1B'], ]; $levelColors = [ 'critical' => ['bg' => '#FEE2E2', 'fg' => '#991B1B'], 'warning' => ['bg' => '#FEF3C7', 'fg' => '#92400E'], 'info' => ['bg' => '#DBEAFE', 'fg' => '#1E3A8A'], 'past' => ['bg' => '#F3F4F6', 'fg' => '#374151'], ]; @endphp @section('content')
DADYCAR FLEET MANAGER

{{ $meta['title'] }}

Fiscalité {{ $meta['code'] }} {{ $meta['period']['label'] }} · {{ $meta['clients_count'] }} clients · {{ $meta['total_vehicles'] }} véhicules · Généré le {{ $meta['generated_at']->locale('fr')->isoFormat('D MMMM YYYY') }}

Indicateurs portefeuille

Clients
{{ $kpis['clients_total']['value'] }}
{{ $kpis['clients_total']['delta_label'] }}
Flotte cumulée
{{ $fmt($kpis['fleet_total']['value']) }}véh.
{{ $kpis['fleet_total']['delta_label'] }}
Taxes annuelles
{{ $fmt($kpis['tax_annual_total']['value']) }}€
{{ $kpis['tax_annual_total']['delta_label'] }}
TAI risk
{{ $fmt($kpis['tai_risk_total']['value']) }}€
{{ $kpis['tai_risk_total']['delta_label'] }}

Calendrier des échéances

@foreach ($calendar as $c) @php $lvl = $levelColors[$c['level']] ?? $levelColors['info']; @endphp @endforeach
Échéance Date Dans (j) Niveau
{{ $c['label'] }} {{ $c['date_label'] }} {{ $c['days'] }} {{ strtoupper($c['level']) }}

Portefeuille clients (drill-down)

@if (!empty($portfolio)) @foreach ($portfolio as $p) @php $sc = $statusColors[$p['lom_status']] ?? ['bg' => '#F3F4F6', 'fg' => '#374151']; @endphp @endforeach
Client Flotte Verdissement Statut LOM VFE manq. TAI € Taxes ann. €
{{ $p['client_name'] }} {{ $p['fleet'] }} {{ $p['verdissement_rate'] }}% / {{ $p['quota_pct'] }}% {{ $p['lom_status'] === 'conforme' ? 'OK' : 'KO' }} {{ $p['vfe_missing'] }} {{ $fmt($p['tai_amount']) }} {{ $fmt($p['tax_annual']) }}
@else

Aucun site avec véhicules dans le portefeuille.

@endif

Vue "multi-clients" approximée par sites. Vraie multi-tenancy nécessite refonte permissions (open point).

@endsection