@extends('reports.pdf.layout') @section('title', $data['meta']['title'] ?? 'Taxe Annuelle Incitative (TAI)') @php $meta = $data['meta'] ?? []; $ban = $data['banner'] ?? []; $calc = $data['calculation'] ?? []; $detail = $calc['detail'] ?? []; $step1 = $detail['step1_ecart'] ?? []; $step2 = $detail['step2_taux'] ?? []; $step3 = $detail['step3_tarif'] ?? []; $verd = $data['verdissement'] ?? []; $kpis = $data['kpis'] ?? []; $vehicles = $data['vehicles'] ?? []; $fr = function ($v, $d = 0) { if ($v === null) return '—'; return is_numeric($v) ? number_format((float) $v, $d, ',', ' ') : (string) $v; }; $coeff = fn ($c) => '×' . rtrim(rtrim(number_format((float) $c, 1, '.', ''), '0'), '.'); @endphp @section('styles') @endsection @section('content') @if (($meta['is_provisional'] ?? false))
PROVISOIRE
@endif
DADYCAR FLEET MANAGER

{{ $meta['title'] ?? 'Taxe Annuelle Incitative (TAI)' }}

Fiscalité {{ $meta['code'] ?? 'FI-12' }} Exercice {{ $meta['exercice'] ?? '' }} {{ ($meta['is_projection'] ?? false) ? 'Projection' : 'Provisoire' }} · SIREN {{ $ban['siren'] ?? '—' }} · @if (!empty($meta['generated_at'])) Généré le {{ $meta['generated_at']->locale('fr')->isoFormat('D MMMM YYYY') }} @endif
{{-- Assujettissement banner --}}
{{ $ban['title'] ?? '' }}
{{ $fr($ban['registry_count'] ?? 0) }} véhicules au registre · {{ $fr($ban['taxable_annual'] ?? 0, 2) }} véh./an taxables · SIREN {{ $ban['siren'] ?? '—' }} @if (($meta['to_complete_count'] ?? 0) > 0) · {{ $meta['to_complete_count'] }} à compléter @endif
@if (!empty($ban['projection_note'])) @endif {{-- TAI calculation card --}}
TAI {{ $meta['exercice'] ?? '' }} · {{ ($meta['is_projection'] ?? false) ? 'PROJECTION' : 'PROVISOIRE' }}
{{ $fr($calc['tai_amount'] ?? 0) }} €
{{ $calc['summary'] ?? '' }}
Écart à l'objectif
{{ $fr($calc['ecart'] ?? 0, 2) }} véh.
×
Taux de renouvellement
{{ $fr($calc['taux_renouvellement_pct'] ?? 0, 1) }} %
×
Tarif unitaire {{ $meta['exercice'] ?? '' }}
{{ $fr($calc['tarif_unitaire'] ?? 0) }} €
=
TAI
{{ $fr($calc['tai_amount'] ?? 0) }} €
{{-- Verdissement gauge --}}

Taux de verdissement — Cible {{ $verd['target_pct'] ?? 0 }} %

@php $pct = (float) ($verd['pct'] ?? 0); $width = max(0, min(100, $pct)); @endphp
{{ $fr($pct, 1) }} % / cible {{ $verd['target_pct'] ?? 0 }} % — {{ $verd['label'] ?? '' }}
{{-- KPIs --}}

Indicateurs

@foreach ($kpis as $k)
{{ $k['label'] ?? '' }}
{{ $fr($k['value'] ?? 0, is_numeric($k['value'] ?? null) && floor($k['value']) != $k['value'] ? 2 : 0) }}{{ $k['unit'] ?? '' }}
{{ $k['caption'] ?? '' }}
@endforeach
{{-- Détail du calcul --}}

Détail du calcul

@foreach (($step1['buckets'] ?? []) as $b) @endforeach
1. Écart à l'objectifvéh./an
Taille flotte annuelle{{ $fr($step1['taille_flotte_annuelle'] ?? 0, 2) }}
Objectif cible ({{ $step1['objectif_pct'] ?? 0 }} %){{ $fr($step1['objectif_cible'] ?? 0, 2) }}
{{ $b['label'] }} ({{ $coeff($b['coeff']) }}){{ $fr($b['value'], 2) }}
Total VFE pondérés{{ $fr($step1['total_vfe_ponderes'] ?? 0, 2) }}
Écart (plancher 0){{ $fr($step1['ecart_plancher'] ?? 0, 2) }}
2. Taux de renouvellementvaleur
Numérateur (acquisitions polluantes){{ $fr($step2['numerateur'] ?? 0, 2) }}
Dénominateur (taille flotte annuelle){{ $fr($step2['denominateur'] ?? 0, 2) }}
Taux{{ $fr($step2['taux_pct'] ?? 0, 2) }} %
3. Tarif unitaire€ / véh.
{{ $step3['bareme_label'] ?? '' }}{{ $fr($step3['tarif'] ?? 0) }}
{{-- Vehicles --}}

Véhicules ({{ count($vehicles) }})

@if (!empty($vehicles)) @foreach (array_slice($vehicles, 0, 25) as $v) @endforeach
Immatriculation Énergie CO₂ WLTP Catégorie Jours Véh./an Classification Coeff. Pondéré
{{ $v['plate'] ?? '—' }} {{ $v['energy'] ?? '—' }} {{ $v['co2'] !== null ? $v['co2'] . ' g/km' : '—' }} {{ $v['category_label'] ?? '—' }} {{ $v['days'] ?? 0 }}{{ ($v['immobilized'] ?? false) ? ' *' : '' }} {{ $fr($v['veh_an'] ?? 0, 2) }} {{ $v['classification_label'] ?? '—' }} {{ $coeff($v['coeff'] ?? 1) }} {{ $fr($v['pondere'] ?? 0, 2) }}
@if (count($vehicles) > 25) @endif @else

Aucun véhicule taxable sur l'exercice.

@endif @endsection