{{-- Le suivi légal d'un dossier clos (v1.11.0 §D5, maquette écran 5). Une seule racine : l'enveloppe du widget, hors de toute condition. --}} @php use App\Support\CadreLegal; use App\Support\Lecteur; use App\Support\SortieDocument; $resiliation = $this->resiliation(); @endphp @if ($resiliation) @php $limite = $resiliation->dateLimiteLegale(); $retard = $resiliation->retardLegal(); $compte = $resiliation->compteInformees(); $conservation = $resiliation->conservationJusquAu(); @endphp Obligations légales de fin de domiciliation Résilié au {{ $resiliation->date_effet?->format('d/m/Y') }} · {{ $resiliation->motif_label }} · art. 544-4, 9° : informer les administrations dans le mois de la cessation. @if ($retard > 0) Délai dépassé depuis le {{ $limite?->format('d/m/Y') }} @elseif ($resiliation->toutesNotificationsFaites()) Toutes les administrations informées @else Avant le {{ $limite?->format('d/m/Y') }} — {{ max(0, (int) now()->startOfDay()->diffInDays($limite, false)) }} jour(s) @endif {{-- v1.13.2 — une action rendue seule ne teste pas sa visibilité : on la teste ici. --}} @if ($this->modifierDateEffetAction()->isVisible()) {{ $this->modifierDateEffetAction }} @endif
@foreach ($resiliation->notifications->sortBy(fn ($n) => array_search($n->destinataire, CadreLegal::DESTINATAIRES)) as $notification)
{{ CadreLegal::destinataire($notification->destinataire)['libelle'] }}
@if ($notification->statut === 'envoyee') Envoyée le {{ $notification->envoyee_le?->format('d/m/Y') }} · {{ \App\Models\ResiliationNotification::modes()[$notification->mode] ?? '' }} @if ($notification->reference) · n° {{ $notification->reference }} @endif @if ($notification->preuve) · preuve jointe @endif @elseif (! $notification->concerne) Non concerné @elseif ($notification->lettre_a_refaire) Lettre à refaire (date d'effet ou RC corrigé) — elle le sera à l'ouverture @else Lettre prête @endif @if ($notification->destinataire === 'greffe' && blank($this->record->rc)) · RC non communiqué @endif
{{ match (true) { $notification->statut === 'envoyee' => 'Envoyée', ! $notification->concerne => 'Non concerné', default => 'À envoyer' } }} @if ($notification->destinataire === 'greffe' && blank($this->record->rc)) @if ($this->saisirRcAction()->isVisible()) {{ $this->saisirRcAction }} @endif @endif @if ($notification->concerne) Ouvrir {{ SortieDocument::LIBELLE }} @if ($notification->statut !== 'envoyee') {{ ($this->marquerEnvoyeeAction)(['notification' => $notification->id]) }} @endif @endif @if ($notification->destinataire === 'douane') {{ ($this->douaneAction)(['notification' => $notification->id, 'concernee' => $notification->concerne]) }} @elseif ($notification->statut === 'a_envoyer' && \App\Models\Resiliation::cleDuMotif($resiliation->motif) === \App\Models\Resiliation::ANNULATION_AVANT_SERVICE) {{ ($this->nonConcerneAction)(['notification' => $notification->id]) }} @endif
@endforeach
Documents remis au client
Lettre de résiliation · attestation de fin de domiciliation @if ($resiliation->contreseing) · à signer aussi par le domicilié @endif @if ($resiliation->documents_remis_le) · remis le {{ $resiliation->documents_remis_le->format('d/m/Y') }} @endif
@include('filament.documents.adresse-de-notification', ['client' => $this->record])
@php $documents = $this->documentsRemis($resiliation); @endphp @foreach ($documents as $document) {{-- Les trois sorties de chaque document (v1.11.0 §F1). --}} {{ $document->type_label }} Ouvrir {{ SortieDocument::LIBELLE }} {{ ($this->envoyerDocumentAction)(['document' => $document->id]) }} @endforeach @if (! $resiliation->attestation) Attestation de fin @endif @if (count($documents) > 0) @include('filament.documents.tout-partager', ['documents' => collect($documents), 'titre' => 'Résiliation · '.$this->record->raison_sociale]) {{ $this->toutEnvoyerAction }} @endif {{ $this->documentsRemisAction }} {{-- v1.13.1 — la case du domicilié sur l'acte et l'attestation ; jamais pour un impayé (v1.13.2). --}} @if ($this->signatureDomicilieAction()->isVisible()) {{ $this->signatureDomicilieAction }} @endif
Conservation du dossier
Pièces d'identification gardées dix ans (loi 43-05, art. 7 ; art. 544-4, 4°) — protégées de l'effacement définitif.
Jusqu'au {{ $conservation?->format('d/m/Y') }}
{{ $compte['informees'] }}/{{ $compte['concernees'] }} administration(s) informée(s). Le manquement au 9° expose à une amende de 10 000 à 20 000 DH (art. 544-11) et rend le domiciliataire solidaire des impôts du domicilié (art. 544-4) : mieux vaut informer en retard que jamais.
@endif