{{-- ============================= --}} {{-- INFORMATIONS VENTE --}} {{-- ============================= --}}
Informations Vente
{{-- Bouton Imprimer --}}

Référence :
{{ $sale->reference }}

Date :
{{ Carbon\Carbon::parse($sale->date)->format('d/m/Y') }}

Vendeur :
{{ $sale->user->name ?? '-' }}

Statut :
@if($sale->amountSale->remaining_amount == 0) Payé @elseif($sale->amountSale->payments_amount == 0) Non payé @else Partiel @endif

{{-- ============================= --}} {{-- INFORMATIONS CLIENT --}} {{-- ============================= --}}
Informations Client

Nom :
{{ $sale->client->fullname ?? '-' }}

Téléphone :
{{ $sale->client->contact ?? '-' }} / {{ $sale->client->phone ?? '-' }}

Adresse :
{{ $sale->client->address ?? '-' }} / {{ $sale->client->city ?? '-' }} / {{ $sale->client->country ?? '-' }}

Adresse :
{{ $sale->client->address ?? '-' }}

{{-- ============================= --}} {{-- INFORMATIONS PAIEMENT --}} {{-- ============================= --}}
Informations Paiement
{{-- Bouton Paiement --}}

Montant Total :
{{ number_format($sale->amountSale->amount ?? 0,0,',',' ') }} GNF

Total Payé :
{{ number_format($sale->amountSale->payments_amount ?? 0,0,',',' ') }} GNF

Reste à payer :
{{ number_format($sale->amountSale->remaining_amount ?? 0,0,',',' ') }} GNF

{{-- ============================= --}} {{-- TABLEAU PRODUITS VENDUS --}} {{-- ============================= --}}
Produits vendus
{{ $sale->items->count() }} produit(s)
@forelse($sale->items as $index => $item) @empty @endforelse {{-- TOTAL GLOBAL --}} @if($sale->items->count() > 0) @endif
# Produit Quantité Prix Unitaire Total
{{ $index + 1 }} {{ $item->product->name ?? '-' }} {{ $item->quantity }} {{ number_format($item->price,0,',',' ') }} GNF {{ number_format( ($item->quantity * $item->price) - ($item->discount ?? 0), 0, ',', ' ' ) }} GNF
Aucun produit trouvé
TOTAL GÉNÉRAL : {{ number_format( $sale->items->sum(function($item){ return ($item->quantity * $item->price) - ($item->discount ?? 0); }), 0, ',', ' ' ) }} GNF
{{-- ============================= --}} {{-- TABLEAU DES PAIEMENTS --}} {{-- ============================= --}}
Historique des Paiements
{{ $sale->paiements->count() }} paiement(s)
@forelse($sale->paiements as $index => $payment) @empty @endforelse {{-- TOTAL PAYÉ --}} @if($sale->paiements->count() > 0) @endif
# Date Référence Mode de paiement Montant Note Actions
{{ $index + 1 }} {{ \Carbon\Carbon::parse($payment->date)->format('d/m/Y') }} {{ $payment->reference }} {{ $payment->mode_paiement }} {{ number_format($payment->payment,0,',',' ') }} GNF {{ $payment->note ?? '-' }}
Aucun paiement enregistré
TOTAL PAYÉ : {{ number_format( $sale->paiements->sum('payment'), 0, ',', ' ' ) }} GNF