@php $salePrices = $lot->prices->filter(function($price) { return in_array($price->type, ['prix_ht', 'prix_ttc', 'prix_tva_5_5', 'prix_tva_10']); }); @endphp @if($salePrices->count() > 0)
Prix de vente
@foreach($salePrices as $price) @endforeach @if($lot->getTotalTravauxReadOnly() > 0 && $lot->getPrixLotTTC() > 0) @endif
Type Montant
@if($price->type_enum) {{ $price->type_enum->label() }} @else Non défini @endif {{ number_format($price->value, 2, ',', ' ') }} €
Prix foncier (Prix TTC - Travaux inclus) {{ number_format($lot->getPrixFoncier(), 2, ',', ' ') }} €
@endif
Prix foncier
@php $foncierPrices = $lot->prices->filter(function($price) { return in_array($price->type, ['prix_foncier_ttc', 'prix_foncier_ht']); }); @endphp @if($foncierPrices->count() > 0)
@foreach($foncierPrices as $price) @endforeach
Type Montant
@php $priceTypeEnum = \App\Enums\PriceType::tryFrom($price->type); @endphp @if($priceTypeEnum) {{ $priceTypeEnum->label() }} @else {{ $price->type }} @endif {{ number_format($price->value, 2, ',', ' ') }} €
@else
Aucun prix foncier renseigné
@endif

Prix immo
@php $immoPrices = $lot->prices->filter(function($price) { return in_array($price->type, ['prix_immo_ttc', 'prix_immo_ht']); }); @endphp @if($immoPrices->count() > 0)
@foreach($immoPrices as $price) @endforeach
Type Montant
@php $priceTypeEnum = \App\Enums\PriceType::tryFrom($price->type); @endphp @if($priceTypeEnum) {{ $priceTypeEnum->label() }} @else {{ $price->type }} @endif {{ number_format($price->value, 2, ',', ' ') }} €
@else
Aucun prix immo renseigné
@endif
@php $rentalPrices = $lot->prices->filter(function($price) { return in_array($price->type, ['mensuel_ttc', 'mensuel_ht', 'mensuel_denormandie_ttc', 'mensuel_denormandie_ht', 'mensuel_garage', 'mensuel_parking']); }); @endphp @if($rentalPrices->count() > 0)
Prix de loyer
@foreach($rentalPrices as $price) @endforeach
Type Montant mensuel
@if($price->type_enum) {{ $price->type_enum->label() }} @else Non défini @endif {{ number_format($price->value, 2, ',', ' ') }} € /mois
@endif @php $travauxPrices = $lot->prices->filter(function($price) { return in_array($price->type, ['prix_travaux_eligible', 'prix_travaux_non_eligible']); }); @endphp @if($travauxPrices->count() > 0)
Prix des travaux
@foreach($travauxPrices as $price) @endforeach
Type Montant
@if($price->type_enum) {{ $price->type_enum->label() }} @else Non défini @endif @if($price->read_only) (inclus dans le prix du bien) @endif {{ number_format($price->value, 2, ',', ' ') }} €
@endif @php $fraisPrices = $lot->prices->filter(function($price) { return in_array($price->type, ['prix_cuisine', 'frais_notaire', 'frais_notaire_tva_5_5', 'frais_notaire_tva_10', 'frais_pret', 'frais_gerance', 'frais_mise_copro']); }); @endphp @if($fraisPrices->count() > 0)
Frais et prix supplémentaires
@foreach($fraisPrices as $price) @endforeach
Type Montant
@if($price->type_enum) {{ $price->type_enum->label() }} @else Non défini @endif {{ number_format($price->value, 2, ',', ' ') }} €
@endif @php $chargePrices = $lot->prices->filter(function($price) { return in_array($price->type, ['taxe_fonciere', 'charge_copropriete']); }); @endphp @if($chargePrices->count() > 0)
Charges
@foreach($chargePrices as $price) @endforeach
Type Montant
@if($price->type_enum) {{ $price->type_enum->label() }} @else Non défini @endif {{ number_format($price->value, 2, ',', ' ') }} €
@endif @php // Utilisation des méthodes du modèle Product pour les calculs $calculatedPrices = $lot->getCalculatedPrices(); // Extraire les valeurs pour la compatibilité avec le code existant $prixLotTTC = $calculatedPrices->prix_lot_ttc; $prixLotTVA = $calculatedPrices->prix_lot_tva; $totalAnnexesTTC = $calculatedPrices->total_annexes_ttc; $totalAnnexesTVA = $calculatedPrices->total_annexes_tva; $totalLotEtAnnexes = $calculatedPrices->total_lot_et_annexes; $totalTravaux = $calculatedPrices->total_travaux; $totalFrais = $calculatedPrices->total_frais; $fraisNotaire = $calculatedPrices->frais_notaire; $fraisNotaireTVA = $calculatedPrices->frais_notaire_tva; $totalFraisAvecTVA = $calculatedPrices->total_frais_avec_tva; $totalCharges = $calculatedPrices->total_charges; $totalGeneral = $calculatedPrices->total_general; $totalAvecTVA = $calculatedPrices->total_avec_tva; $fraisNotaireTVA5 = $calculatedPrices->frais_notaire_tva_5_5 ?? 0; $fraisNotaireTVA10 = $calculatedPrices->frais_notaire_tva_10 ?? 0; $isTVA55 = $lot->getPrixLotTVA5_5() > 0; // Total avec TVA 10% spécifique $prixLotTVA10 = $calculatedPrices->prix_lot_tva_10; $totalAvecTVA10 = $calculatedPrices->total_avec_tva_10; $totalFraisAvecTVA10 = $calculatedPrices->total_frais_avec_tva_10; @endphp @if($prixLotTTC > 0 || $prixLotTVA > 0 || $prixLotTVA10 > 0 || $totalAnnexesTTC > 0 || $totalAnnexesTVA > 0 || $totalTravaux > 0 || $totalFrais > 0 || $totalFraisAvecTVA > 0 || $totalCharges > 0)
Totaux
@if($prixLotTTC > 0) @endif @if($totalAnnexesTTC > 0) @endif @if($prixLotTTC > 0 || $totalAnnexesTTC > 0) @endif @if($totalTravaux > 0) @endif @if($totalTravaux > 0 || $totalFrais > 0 || $totalCharges > 0) @endif @if($totalFrais > 0) @endif @if($totalFraisAvecTVA > 0) @endif @if($prixLotTVA10 > 0 && $totalFraisAvecTVA10 > 0) @endif @if($totalFrais > 0) @endif @if($prixLotTVA > 0) @endif @if($prixLotTVA10 > 0) @endif @if($totalCharges > 0) @endif
Prix du lot TTC {{ number_format($prixLotTTC, 2, ',', ' ') }} €
Prix des annexes TTC {{ number_format($totalAnnexesTTC, 2, ',', ' ') }} €
Total lot + annexes TTC {{ number_format($totalLotEtAnnexes, 2, ',', ' ') }} €
Total des travaux + {{ number_format($totalTravaux, 2, ',', ' ') }} €

Total des frais + {{ number_format($totalFrais, 2, ',', ' ') }} €
Frais avec TVA {{ $isTVA55 ? '5.5%' : '10% (LLI)' }} @php $detailNotaire = $isTVA55 ? $fraisNotaireTVA5 : $fraisNotaireTVA10; @endphp @if($detailNotaire > 0)
(dont frais de notaire avec TVA {{ $isTVA55 ? '5.5%' : '10% (LLI)' }} : {{ number_format($detailNotaire, 2, ',', ' ') }} €) @endif
+ {{ number_format($totalFraisAvecTVA, 2, ',', ' ') }} €
Frais avec TVA 10% (LLI) @if($fraisNotaireTVA10 > 0)
(dont frais de notaire avec TVA 10% : {{ number_format($fraisNotaireTVA10, 2, ',', ' ') }} €) @else
(utilise frais de notaire standard : {{ number_format($fraisNotaire, 2, ',', ' ') }} €) @endif
+ {{ number_format($totalFraisAvecTVA10, 2, ',', ' ') }} €
TOTAL GÉNÉRAL (avec frais) {{ number_format($totalGeneral, 2, ',', ' ') }} €
TOTAL AVEC TVA {{ $isTVA55 ? '5.5%' : '10% (LLI)' }}
Si annexes sans TVA {{ $isTVA55 ? '5.5%' : '10%' }}, utilise prix TTC • Si frais notaire sans TVA {{ $isTVA55 ? '5.5%' : '10%' }}, utilise frais standard
{{ number_format($totalAvecTVA, 2, ',', ' ') }} €
TOTAL AVEC TVA 10% (LLI)
Si annexes sans TVA 10%, utilise prix TTC • Si frais notaire sans TVA 10%, utilise frais standard
{{ number_format($totalAvecTVA10, 2, ',', ' ') }} €

Total des charges (non inclus) {{ number_format($totalCharges, 2, ',', ' ') }} €
@endif