@php $lotPrices = $lot->prices; $prixImmoTTC = $lotPrices->where('type', 'prix_immo_ttc')->first()?->value ?? 0; $loyerMensuelDispositifFiscal = $lotPrices->where('type', 'loyer_mensuel_dispositif_fiscal')->first()?->value ?? 0; // Vérifier si le programme a des lots avec TVA 5.5% $program = $lot->program; $hasTVA5 = $program->lots()->whereHas('prices', function($q) { $q->where('type', \App\Enums\PriceType::PRIX_TVA_5_5->value)->where('value', '>', 0); })->exists(); @endphp