@extends('layouts.client') @php $page_title = 'Mon espace'; @endphp @section('meta-title', 'Mes commandes') @section('meta-keywords', '') @section('meta-description', '') @section('content')
@if ($commandes->count() > 0)
@foreach ($commandes as $cmd) @endforeach
{!! lang('N° de commande') !!} {!! lang('Date') !!} {!! lang('Statut') !!} {!! lang('Montant') !!} {!! lang('Facture') !!} Détail
{{-- {{ $cmd->paiement->achat->reference ?? $cmd->reference}} --}} {{ $cmd->reference }} {{ \Carbon\Carbon::parse($cmd->updated_at)->format('d-m-Y') }} @php $status = $cmd->expiree ? 'Devis expiré' : $cmd->status; if ($cmd->total == 0 && !isset($cmd->paiement)) { $status = 'En attente'; } @endphp {{ $status }} @if ( $cmd->status == 'Devis reçu' || $cmd->status == 'Commande validée' || $cmd->status == 'Expédiée' || $cmd->status == 'Payé') {{ $cmd->total ?? $cmd->total == 0 ? $cmd->total . ' €' : '--' }} @else -- @endif @if ($cmd->paiement->achat->facture->id ?? 0) Facture {{ $cmd->paiement->achat->facture->numero }} @else - @endif
@else

{!! lang("Vous n'avez pas de commandes en cours.") !!}

@endif
@endsection @section('script') @endsection