@extends('layouts.app') @section('content') @include('programmes.searchbar', ['fiscalites' => \App\Enums\Fiscalite::selectableCases()])
{{-- Images carousel (mobile) --}}
{{-- Informations du programme (mobile + desktop) --}}

{{ ucwords(strtolower($program->name)) }}

@foreach($program->marketingTags->filter(fn($t) => $t->type && $t->type->value !== \App\Enums\MarketingTagType::NON_DEFINI->value) as $tag) @endforeach

{{ ucwords(strtolower($program->city)) }}

{{ $fiscaliteLibelle }} @if($hasTva5) / TVA 5,5% @endif @if($hasLli) / LLI @endif

À partir de
{{ !empty($prix) ? number_format(min($prix), 0, ',', ' ') : '0' }} € {{ $isHT ? 'HT' : 'TTC' }} @if(!empty($types)) Du {{ reset($types) }} au {{ end($types) }} @endif

    @if($quoteTravaux)
  • Quote/travaux : {{ $quoteTravaux }} %
  • @endif @if(isset($commission) && $commission)
  • @php $commissionValue = $commission->value_ttc ?? $commission->value_ht ?? 0; // Déterminer si HT : si value_ttc n'existe pas mais value_ht existe $isHT = empty($commission->value_ttc) && !empty($commission->value_ht); @endphp
    Commission : {{ number_format($commissionValue, 2, ',', ' ') }} %@if($isHT) HT@endif
  • @endif
@if($program->showDefaultOpeComsActiveByOrder()->count() > 0)
    @foreach ($program->showDefaultOpeComsActiveByOrder()->get() as $opeComProgram) @if($opeComProgram->type && $opeComProgram->type->value !== \App\Enums\OpeCom::NON_DEFINI->value) @php $opeComProgramTypeValue = $opeComProgram->type?->value; $shouldHideOpeComProgram = in_array($opeComProgramTypeValue, ['boost_de_commission', 'cadeau', 'cashback'], true); @endphp
  • {{ $opeComProgram->type->label() }}
  • @else
  • {{ $opeComProgram->name }}
  • @endif @endforeach @foreach ($program->showProductsOpeComsActiveByOrder()->get() as $opeComProduct) @if($opeComProduct->type && $opeComProduct->type->value !== \App\Enums\OpeCom::NON_DEFINI->value) @php $opeComProductTypeValue = $opeComProduct->type?->value; $shouldHideOpeComProduct = in_array($opeComProductTypeValue, ['boost_de_commission', 'cadeau', 'cashback'], true); @endphp
  • {{ $opeComProduct->type->label() }}
  • @else
  • {{ $opeComProduct->name }}
  • @endif @endforeach
@endif
{{-- Images carousel (desktop) --}}
{{-- Contenu détaillé du programme --}}
{{-- Le programme (argumentaires dans l'ordre défini en BO) --}}
@php use App\Enums\ArgumentaireType; @endphp @foreach($program->argumentaires as $argumentaire) @if($argumentaire->text && $argumentaire->type && $argumentaire->type !== ArgumentaireType::NON_DEFINI)

{{ $argumentaire->type === ArgumentaireType::ACCROCHE ? 'Le programme' : $argumentaire->type->label() }}

{!! $argumentaire->text !!}

@endif @endforeach @php $garantiesAffichables = $program->garanties->filter(fn($g) => $g->type && $g->type->value !== \App\Enums\GarantieType::NON_DEFINI->value); @endphp @if($garantiesAffichables->count() > 0)

Garanties

    @foreach($garantiesAffichables as $garantie)
  • {{ $garantie->type->label() }}
  • @endforeach
@endif
{{-- Équipements et services --}} @if($program->prestations->count() > 0)

Équipement et services

@foreach($program->prestations as $prestation) @php $libelle_service = str_replace(['é', 'è', 'ê'], 'e', strtolower($prestation->type->label())); $libelle_service = str_replace(' ', '_', $libelle_service); @endphp
{{ $prestation->type->label() }}
@endforeach
@if(!empty($operations_commerciales) || (isset($currentApplication) && $currentApplication->hasFeature(\App\Enums\FeatureSlug::CITYSCAN->value)))

@endif @endif {{-- Opérations commerciales --}} @php $defaultOpeComs = $program->showDefaultOpeComsActiveByOrder()->get(); $productsOpeComs = $program->showProductsOpeComsActiveByOrder()->get(); @endphp @if($defaultOpeComs->count() > 0 || $productsOpeComs->count() > 0)

Et en plus...

    @foreach($defaultOpeComs as $opeCom) @php $label = $opeCom->type && $opeCom->type->value !== \App\Enums\OpeCom::NON_DEFINI->value ? $opeCom->type->label() : ($opeCom->name ?? 'Offre'); $typeValue = $opeCom->type?->value; $isCashback = $typeValue === \App\Enums\OpeCom::CASHBACK->value; $shouldHide = in_array($typeValue, ['boost_de_commission', 'cadeau', 'cashback'], true); $dateStart = $opeCom->dates?->firstWhere('type', 'date_start'); $dateEnd = $opeCom->dates?->firstWhere('type', 'date_end'); $dateStartLabel = $dateStart?->value ? date('d/m/Y', strtotime($dateStart->value)) : null; $dateEndLabel = $dateEnd?->value ? date('d/m/Y', strtotime($dateEnd->value)) : null; $limitePrix = $opeCom->prices?->last()?->value ?? null; $ratio = $opeCom->ratio ? (float) $opeCom->ratio : null; $ratioLabel = $ratio === null ? null : (fmod($ratio, 1.0) === 0.0 ? (string) (int) $ratio : rtrim(rtrim(number_format($ratio, 2, ',', ' '), '0'), ',')); @endphp
  • {{ $label }} : @if($opeCom->text)
    {!! $opeCom->text !!}@endif @if($ratioLabel)
    Récupérer jusqu'à {{ $ratioLabel }}% de la valeur du bien @if($limitePrix) avec une valeur limite de {{ number_format($limitePrix, 0, ',', ' ') }} € @endif @elseif($limitePrix)
    Limite de prix : {{ number_format($limitePrix, 0, ',', ' ') }} € @endif @if($dateStartLabel || $dateEndLabel)
    @if($dateStartLabel && $dateEndLabel) Du {{ $dateStartLabel }} au {{ $dateEndLabel }} @elseif($dateStartLabel) À partir du {{ $dateStartLabel }} @else Jusqu'au {{ $dateEndLabel }} @endif @endif
  • @endforeach @foreach($productsOpeComs as $opeCom) @php $label = $opeCom->type && $opeCom->type->value !== \App\Enums\OpeCom::NON_DEFINI->value ? $opeCom->type->label() : ($opeCom->name ?? 'Offre'); $typeValue = $opeCom->type?->value; $isCashback = $typeValue === \App\Enums\OpeCom::CASHBACK->value; $shouldHide = in_array($typeValue, ['boost_de_commission', 'cadeau', 'cashback'], true); $dateStart = $opeCom->dates?->firstWhere('type', 'date_start'); $dateEnd = $opeCom->dates?->firstWhere('type', 'date_end'); $dateStartLabel = $dateStart?->value ? date('d/m/Y', strtotime($dateStart->value)) : null; $dateEndLabel = $dateEnd?->value ? date('d/m/Y', strtotime($dateEnd->value)) : null; $limitePrix = $opeCom->prices?->last()?->value ?? null; $ratio = $opeCom->ratio ? (float) $opeCom->ratio : null; $ratioLabel = $ratio === null ? null : (fmod($ratio, 1.0) === 0.0 ? (string) (int) $ratio : rtrim(rtrim(number_format($ratio, 2, ',', ' '), '0'), ',')); @endphp
  • {{ $label }} : @if($opeCom->text)
    {!! $opeCom->text !!}@endif
    Cette offre s'applique uniquement à certains lots @if($ratioLabel)
    Récupérer jusqu'à {{ $ratioLabel }}% de la valeur du bien @if($limitePrix) avec une valeur limite de {{ number_format($limitePrix, 0, ',', ' ') }} € @endif @elseif($limitePrix)
    Limite de prix : {{ number_format($limitePrix, 0, ',', ' ') }} € @endif @if($dateStartLabel || $dateEndLabel)
    @if($dateStartLabel && $dateEndLabel) Du {{ $dateStartLabel }} au {{ $dateEndLabel }} @elseif($dateStartLabel) À partir du {{ $dateStartLabel }} @else Jusqu'au {{ $dateEndLabel }} @endif @endif
  • @endforeach
@endif {{-- Carte interactive CityScan --}} @if(isset($currentApplication) && $currentApplication->hasFeature(\App\Enums\FeatureSlug::CITYSCAN->value) && !empty($program->cityscan_enabled)) @php $address = $program->addresses->first(); $latitude = $address?->latitude; $longitude = $address?->longitude; @endphp @if(!is_null($latitude) && !is_null($longitude) && is_numeric($latitude) && is_numeric($longitude))

Carte interactive CityScan

  • Analysez et évaluez l'environnement du bien avant de le proposer à vos clients.
  • Informez vous sur la qualité de vie, l'environnement culturel et social du lieu.
  • Appuyez vous sur une étude de marché localisée pour apporter la solution la plus adaptée.
  • Générez un rapport complet de l'analyse.
@push('scripts') @endpush @endif @endif
{{-- Sidebar --}}
{{-- Focus fiscalité --}} @php $mainFiscalite = $program->fiscalites->first(); @endphp @if($mainFiscalite && !in_array($mainFiscalite->type->value, ['residence_principale', 'denormandie', 'lmnp_neuf', 'lmnp_ancien']))

Focus sur la fiscalité

Ce programme est éligible au {{ $mainFiscalite->type->label() }}. Téléchargez notre fiche pédagogique pouvant être transmise à votre client.


Fiche fiscalité Télécharger

@endif {{-- Documents --}} @auth @if($program->documents->count() > 0)

Documents

    @foreach($program->documents as $document)
  • {{ $document->type_enum?->label() ?? 'Document' }} @php // Tous les documents passent par S3 avec déchiffrement $downloadUrl = route('programmes.document.download', [ 'document' => $document->token ]); @endphp Télécharger
  • @endforeach
@endif @endauth
{{-- Bouton mobile --}}
@endsection