@extends('layouts.app') @section('content')

Détails du Client

Modifier Nouvel Abonnement
@if(session('success')) @endif

Informations personnelles

Nom complet
{{ $client->prenom }} {{ $client->nom }}
Contact
{{ $client->contact }} @if($client->contact_2)
{{ $client->contact_2 }} @endif
Adresse
{{ $client->adresse }}
Agent assigné
{{ $client->agent->name }}

Historique des abonnements

@if($client->abonnements->count() > 0)
@foreach($client->abonnements as $abonnement) @php $totalPaye = $abonnement->paiements->sum('montant'); $resteAPayer = max(0, $abonnement->prix - $totalPaye); @endphp @endforeach
Type Prix Payé Début Fin Statut Actions
{{ $abonnement->type_abonnement }} mois
{{ number_format($abonnement->prix, 0, ',', ' ') }} FCFA
{{ number_format($totalPaye, 0, ',', ' ') }}FCFA @if($resteAPayer > 0) ({{ number_format($resteAPayer, 0, ',', ' ') }} rest.) @endif
{{ $abonnement->date_debut->format('d/m/Y') }} {{ $abonnement->date_fin->format('d/m/Y') }} @if($abonnement->statut == 'Actif') Actif @elseif($abonnement->statut == 'En attente') En attente @elseif($abonnement->statut == 'Expiré') Expiré @else {{ $abonnement->statut }} @endif @if($resteAPayer > 0) Payer @endif Détails
@else

Aucun abonnement enregistré pour ce client.

@endif
@endsection