{{ $company ? $company->name : 'Mon Entreprise' }}
@if($company && $company->address){{ $company->address }}@else Ville @endif
@if($company && $company->phone){{ $company->phone }}@else Téléphone @endif
Facture N°: {{ $invoice->number }}
Date facture: {{ $invoice->date->format('d/m/Y') }}

{{ $invoice->type === 'sale' ? 'Facturé à:' : 'Facturé par:' }}
{{ $invoice->client ? $invoice->client->name : $invoice->supplier->name }}
{{ $invoice->client ? $invoice->client->address : $invoice->supplier->address }}
@if($invoice->client) @if($invoice->client->ice)ICE: {{ $invoice->client->ice }}
@endif @if($invoice->client->phone)Tél: {{ $invoice->client->phone }}
@endif @if($invoice->client->email)Email: {{ $invoice->client->email }}@endif @else @if($invoice->supplier->ice)ICE: {{ $invoice->supplier->ice }}
@endif @if($invoice->supplier->phone)Tél: {{ $invoice->supplier->phone }}
@endif @if($invoice->supplier->email)Email: {{ $invoice->supplier->email }}@endif @endif

@foreach($invoice->items as $item) @endforeach
Produit/Service Description Qté Prix unitaire TVA Total HT Total TTC
{{ $item->product_name }} {{ $item->description }} {{ $item->quantity }} {{ $item->unit }} {{ number_format($item->unit_price, 2) }} MAD {{ $item->vat_rate }}% {{ number_format($item->total_ht, 2) }} MAD {{ number_format($item->total_ttc, 2) }} MAD
Sous-total HT: {{ number_format($invoice->subtotal_ht, 2) }} MAD
TVA: {{ number_format($invoice->total_vat, 2) }} MAD
Total TTC: {{ number_format($invoice->total_ttc, 2) }} MAD
@if($invoice->paid_amount > 0)
Montant payé: {{ number_format($invoice->paid_amount, 2) }} MAD
Reste à payer: {{ number_format($invoice->remaining_amount, 2) }} MAD
@endif
ARRÊTÉE LA PRÉSENTE FACTURE À LA SOMME DE :
{{ \App\Helpers\NumberToWords::convert($invoice->total_ttc) }}
@if($invoice->notes || $invoice->terms)
@if($invoice->notes)

Notes:

{{ $invoice->notes }}

@endif @if($invoice->terms)

Conditions:

{{ $invoice->terms }}

@endif
@endif @if($company && $company->footer_template) @endif