@extends('layouts.app') @php use App\Enums\OptionState; use App\Enums\PriceType; use App\Enums\SurfaceType; @endphp @section('content')

Fiche client

{{ $client->fullName() }}

Informations client
  • Nom : {{ $client->lastname ?? '-' }}
  • Prénom : {{ $client->firstname ?? '-' }}
  • Email : {{ $client->email ?? '-' }}
  • @if($client->phones && $client->phones->count() > 0)
  • Téléphone : {{ $client->phones->first()->name ?? $client->phone ?? '-' }}
  • @elseif($client->phone)
  • Téléphone : {{ $client->phone }}
  • @endif
    @if($client->address)
  • Adresse : {{ $client->address->line_1 ?? '' }} @if($client->address->line_2) {{ $client->address->line_2 }} @endif
  • @if($client->address->zip_code && $client->address->city)
  • Ville, CP : {{ $client->address->zip_code }} {{ $client->address->city }}
  • @endif @endif
  • Date de création du client : {{ $clientCreationDate->format('d/m/Y') }}
  • Statut du dernier dossier : @if($lastStatus) {{ $lastStatus->label() }} @else Aucun dossier @endif
@if($client->notes)
Commentaires :

{{ $client->notes }}

@endif
Dossiers actifs ({{ $dossiersActifs->count() }})
@if($dossiersActifs->count() > 0)
@foreach($dossiersActifs as $option) @php $lot = $option->product; $program = $lot ? $lot->program : null; $state = $option->state; // Fiscalité $fiscalites = $program ? $program->fiscalites->pluck('type')->map(fn($f) => $f->label())->toArray() : []; $fiscaliteLibelle = !empty($fiscalites) ? implode(', ', $fiscalites) : '-'; // Typologie $typologie = $lot && $lot->type ? $lot->type->label() : '-'; // Prix $prixTTC = $lot ? $lot->prices->where('type', 'prix_ttc')->first() : null; $prix = $prixTTC ? number_format($prixTTC->value, 0, ',', ' ') . ' €' : '-'; // Date de réservation $dateReservation = null; if ($state === OptionState::PROMESSE_VENTE_SIGNEE || $state === OptionState::ACTE_DEFINITIF_SIGNE) { $dateReservation = $option->updated_at; } @endphp @if($program) @endif @endforeach
Programme Lot Fiscalité associée Typologie Statut du dossier Date pose d'option Date de réservation Prix Action
@if($program->slug) {{ $program->name }} @else {{ $program->name }} @endif Lot n°{{ $lot->number ?? '-' }} {{ $fiscaliteLibelle }} {{ $typologie }} {{ $state->label() }} {{ $option->created_at->format('d/m/Y') }} {{ $dateReservation ? $dateReservation->format('d/m/Y') : '-' }} {{ $prix }} Voir
@else

Aucun dossier actif pour ce client

@endif
Historique des ventes ({{ $historiqueVentes->count() }})
@if($historiqueVentes->count() > 0)
@foreach($historiqueVentes as $option) @php $lot = $option->product; $program = $lot ? $lot->program : null; $state = $option->state; // Prix $prixTTC = $lot ? $lot->prices->where('type', 'prix_ttc')->first() : null; $prix = $prixTTC ? number_format($prixTTC->value, 0, ',', ' ') . ' €' : '-'; // Date d'archivage (dernière modification) $dateArchivage = $option->updated_at; @endphp @if($program) @endif @endforeach
Date d'archivage Programme Lot Statut Prix Action
{{ $dateArchivage->format('d/m/Y') }} @if($program->slug) {{ $program->name }} @else {{ $program->name }} @endif Lot n°{{ $lot->number ?? '-' }} {{ $state->label() }} {{ $prix }} Voir
@else

Aucun dossier archivé pour ce client

@endif
@push('scripts') @endpush @endsection