@extends('layouts.exat') @section('title', "Demandes d'avance") @section('subtitle', $stats['total'].' demandes') @section('actions') Nouvelle demande @endsection @section('content')
{{-- Tuiles --}}
Total
{{ number_format($stats['total'], 0, ',', ' ') }}
En attente
{{ number_format($stats['en_attente'], 0, ',', ' ') }}
Validées
{{ number_format($stats['validees'], 0, ',', ' ') }}
Montant total
{{ number_format($stats['montant'], 0, ',', ' ') }}FCFA
{{-- Filtres --}}
@include('partials._filtre-date')
@if(request()->hasAny(['periode', 'date', 'date_debut', 'date_fin', 'semaine', 'mois', 'annee', 'statut', 'q'])) Réinitialiser @endif
{{-- Tableau --}}
@include('partials.th-tri', ['col' => 'reference', 'label' => 'Réf. Int / Ext']) @include('partials.th-tri', ['col' => 'date', 'label' => 'Date']) @include('partials.th-tri', ['col' => 'planteur', 'label' => 'Planteur']) @include('partials.th-tri', ['col' => 'objet', 'label' => 'Objet']) @include('partials.th-tri', ['col' => 'montant', 'label' => 'Montant', 'align' => 'right']) @include('partials.th-tri', ['col' => 'mois', 'label' => 'Mois', 'align' => 'center']) @include('partials.th-tri', ['col' => 'statut', 'label' => 'Statut']) @include('partials.th-tri', ['col' => 'createur', 'label' => 'Créée par']) @forelse($demandes as $d) @empty @endforelse
{{ $d->reference }}
@if($d->numero_pret)
{{ $d->numero_pret }}
@endif
{{ $d->created_at?->format('d/m/Y') }}
{{ $d->planteur->nom ?? '—' }}
{{ $d->planteur->code ?? '' }}
{{ $d->objet ?? '—' }} {{ number_format((float) $d->montant, 0, ',', ' ') }} {{ $d->duree_mois ?? '—' }} {{ $d->createur?->name ?? '—' }} @if($d->peutEtreModifieePar(auth()->user())) @endif @role('SUPERADMIN')
@csrf @method('DELETE')
@endrole

Aucune demande pour ces critères.

Créer une demande
@if($demandes->total() > 0)
@include('partials.pagination', ['paginator' => $demandes])
@endif
@endsection