@php /** @var \App\Models\Invoice $invoice */ /** @var array{name: string, legal_name: string, address: ?string, city: ?string, country: ?string, phone: ?string, email: ?string, website: ?string, tax_id: ?string, registration: ?string} $company */ /** @var ?string $validatorSignatureDataUri */ $money = static fn ($value): string => \App\Support\MoneyFormatter::format((float) $value, $company['currency'] ?? null); $lines = $invoice->lines; $location = collect([$company['city'], $company['country']])->filter()->implode(', '); $customer = $invoice->customer; @endphp Facture {{ $invoice->code }}
@include('pdf.partials.company-identity', ['company' => $company, 'showName' => true])

Facture

{{ $invoice->code }}

Date : {{ $invoice->issue_date?->format('d/m/Y') }}
Échéance : {{ $invoice->due_date?->format('d/m/Y') }}
Client
{{ $customer->name }}
@if ($customer->contact_name)
{{ $customer->contact_name }}
@endif @if ($customer->address)
{{ $customer->address }}
@endif @if ($customer->email)
{{ $customer->email }}
@endif @if ($customer->phone)
{{ $customer->phone }}
@endif
@foreach ($lines as $index => $line) @endforeach
# Désignation Qté PU HT Rem. TVA Total TTC
{{ $index + 1 }} @if ($line->product) {{ $line->product->code }} — @endif {{ $line->description }} {{ number_format((float) $line->quantity, 0, ',', ' ') }} {{ $money($line->unit_price) }} {{ number_format((float) $line->discount_rate, 0) }}% {{ number_format((float) $line->tax_rate, 0) }}% {{ $money($line->line_total) }}
@if ((float) $invoice->discount_amount > 0) @endif @if ((float) $invoice->amount_paid > 0) @endif
Sous-total HT{{ $money($invoice->subtotal + $invoice->discount_amount) }}
Remise globale- {{ $money($invoice->discount_amount) }}
Total HT{{ $money($invoice->subtotal) }}
TVA{{ $money($invoice->tax_amount) }}
Total TTC{{ $money($invoice->total_amount) }}
Déjà payé{{ $money($invoice->amount_paid) }}
Reste dû{{ $money($invoice->balanceDue()) }}
@if ($invoice->notes)

Notes : {{ $invoice->notes }}

@endif
Émetteur
{{ $invoice->validator?->name ?? '……………………' }} · {{ $invoice->validated_at?->format('d/m/Y') ?? '………' }} @if ($validatorSignatureDataUri) Signature @else
Signature
@endif