@php $lotPrices = $lot->prices; $montantBien = (int) ($lot->getPrixLotTTC() - $lot->getTotalTravaux()); $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