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

LA LISTE DES COMMANDES CLIENTS

@csrf
@foreach($commandes as $c) @endforeach

Total Commande : {{ number_format($ct, 0, '', ' ') }} Commande Validé : {{ number_format($cv, 0, '', ' ') }} Commande En cours : {{ number_format($ce, 0, '', ' ') }} Commande Rejeté : {{ number_format($cr, 0, '', ' ') }} EMC Libre : {{ number_format($cl, 0, '', ' ') }}

Total Montant : {{ number_format($totaux, 0, '', ' ') }} FCFA Montant Validé: {{ number_format($totaux_valide, 0, '', ' ') }} FCFA Montant En cours : {{ number_format($totaux_encours, 0, '', ' ') }} FCFA Montant Rejeté : {{ number_format($totaux_rejete, 0, '', ' ') }} FCFA Montant EMC Libre : {{ number_format($totaux_libre, 0, '', ' ') }} FCFA

Commande Expédié : {{ number_format($oui_exp, 0, '', ' ') }} Commande En cours d'expédition : {{ number_format($encours_exp, 0, '', ' ') }} Commande Non Expédié: {{ number_format($non_exp, 0, '', ' ') }}

Réf. Date Date Validation Client Commande Montant Agence Avis Statut Action
{{ $c->ref ?? ''}} {{ Carbon\Carbon::parse($c->date_commande)->format('d/m/Y') ?? ''}} {{ $c->date_validation_banque ? Carbon\Carbon::parse($c->date_validation_banque)->format('d/m/Y') : '' }} {{ $c->nom ?? '' }} @if($c->commandedet) @foreach($c->commandedet as $p) {{ $p->label ?? App\Product::find($p->fk_product)->label ?? '' . ' => '. $p->qty ?? ''}} @endforeach @endif {{ number_format($c->total_ttc, 0, ' ', ' ') ?? '' }} {{ $c->agence ?? ''}} @if($c->avis_banque == 1) En Cours @elseif($c->avis_banque == 2) Validé @elseif($c->avis_banque == 3) Rejeté @elseif($c->avis_banque == 5) EMC-LIBRE @endif @if($c->fk_statut == 1) Non Expédiée @elseif($c->fk_statut == 2) En Cours @elseif($c->fk_statut == 3) Expédié @elseif($c->fk_statut == 4) Cloturé @endif @can('commande_supprimer')
@endcan
{{ $commandes->links('pagination::bootstrap-4') }}
@endsection