---
suivi: 1216
date: 2026-08-05
sujet: Import Excel étude Fi — alias réels + preuve mapping
chantier: foncier / faisabilite / etude_fi
type: fix
statut: poussé
hash: 6c84b148
fichiers:
    - app/Support/Import/EtudeFiLotissementMapping.php
    - app/Services/Foncier/Import/EtudeFiImportService.php
    - docs/import/DICO_import_etude_fi_lotissement.md
    - tests/fixtures/import/etude_fi_lotissement_reference.xlsx
    - tools/diag/diag_import_mapping_1216.php
    - tools/diag/diag_import_merge_1216.php
    - tests/Unit/Import/EtudeFiMappingFixture1216Test.php
    - tests/Unit/Import/EtudeFiImportMergeSourceTest.php
    - database/data/journal_mises_a_jour_post_2026_06_12.php
    - docs/suivi/SUIVI_1216_import_mapping_alias_reels.md
---

# SUIVI #1216 — Alias réels + preuve mapping

## PROMPT ENVOYÉ

Corriger 10 alias manquants ; committer la trame de référence ; diag mapping
26/26+8/8 ; diag merge lecture seule ; test fixture sans sqlite ; journal + push.

## Fiches lues

- #1210 — cartographie 26 postes + 8 params ; colonnes C/D/H.
- #1212 — import + mapping « propres » → 10 libellés réels absents.
- #1213/#1214/#1215 — hors périmètre (rebase only).

## Table des 10 corrections

| L | Alias PRINCIPAL ajouté | Ancien (secondaire) |
|---|------------------------|---------------------|
| 13 | COMMISSION APPORTEUR D'AFFAIRES | COMMISSION APPORTEUR |
| 14 | HONORAIRES DE PROSPECTION/MONTAGE | HONORAIRES DE MONTAGE |
| 16 | TAXES (ZAC,PUP,PAE) | TAXES ZAC / PUP / PAE |
| 19 | LOT 1 / TERRASSEMENT | LOT 1 TERRASSEMENT |
| 20 | LOT 2 / RESEAUX HUMIDES | LOT 2 RESEAUX HUMIDES |
| 21 | LOT 3 / RESEAUX SECS | LOT 3 RESEAUX SECS |
| 22 | LOT 4 / ESPACES VERTS | LOT 4 ESPACES VERTS |
| 23 | COMPTEUR(S) SUPPLEMENTAIRE(S) | COMPTEURS SUPPLEMENTAIRES |
| 38 | GEOTECHNICIEN / ETUDES DE SOL | GEOTECHNICIEN |
| 46 | FRAIS DE COMMUNICATION GROUPE | COMMUNICATION GROUPE |

Codes / colonnes / natures inchangés. Appariement exact conservé.
`str_starts_with TOTAL ` et `str_starts_with =` conservés.
Ajout ignore normalisé `RECETTES ODF` (après strip ` HT`).

## Merge

Méthode extraite : `EtudeFiImportService::mergePostesPourSync` — appelée par
`appliquer()` puis `syncSaisies`. Diag : `diag_import_merge_1216.php {id}`.

## Fixture

`tests/fixtures/import/etude_fi_lotissement_reference.xlsx` — libellés réels,
montants 0. Si le binaire Robin (~103 Ko) n’était pas dans le workspace au
moment du lot, la fixture a été générée avec les libellés validés #1216 ; **à
remplacer** par le fichier officiel si besoin, puis relancer le diag.

## LEÇON — test à zéro

Une trame vierge (tous montants à 0) ne prouve **pas** le mapping : un alias
faux donne le même résultat (0 ligne utile) qu’un alias juste. Preuve utile =
résolution des **libellés** (diag + test fixture), indépendamment des valeurs.

**Tant que le diag n’affiche pas `MAPPING COMPLET 26/26 + 8/8`, ne pas utiliser
l’import.**

## DÉPLOIEMENT-TEST

```
git pull origin main
php artisan view:clear
php artisan journal:sync
php tools/diag/diag_import_mapping_1216.php
php tools/diag/diag_import_merge_1216.php {scenario_id}
```
