@extends('layouts.client') @section('title', 'Facture ' . $invoice->invoice_number) @push('styles') @endpush @section('content')
{{-- Hero --}}
Mes factures

Facture {{ $invoice->invoice_number }}

Détail de votre facture

{{-- Header facture --}}

FACTURE

{{ $invoice->invoice_number }}

@php $st = $invoice->status ?? 'issued'; $stLabel = match($st) { 'paid'=>'✓ PAYÉE','refunded'=>'↩ REMBOURSÉE', default=>'EN ATTENTE' }; $stClass = match($st) { 'paid'=>'tp-invs-status-paid','refunded'=>'tp-invs-status-refunded', default=>'tp-invs-status-issued' }; @endphp {{ $stLabel }}

Émise le {{ $invoice->issued_at?->format('d/m/Y') }}

{{-- Parties --}}

Vendeur

{{ $invoice->seller_name }}

@if($invoice->seller_address)

{{ $invoice->seller_address }}

@endif @if($invoice->seller_siret)

SIRET : {{ $invoice->seller_siret }}

@endif @if($invoice->seller_vat_number)

TVA : {{ $invoice->seller_vat_number }}

@endif

Facturé à

{{ $invoice->billing_name }}

{{ $invoice->billing_email }}

@if($invoice->billing_phone)

{{ $invoice->billing_phone }}

@endif @if($invoice->billing_address)

{{ $invoice->billing_address }} @if($invoice->billing_postal_code || $invoice->billing_city)
{{ $invoice->billing_postal_code }} {{ $invoice->billing_city }}@endif

@endif
{{-- Description --}} @if($invoice->description)

Description

{{ $invoice->description }}

@endif {{-- Lignes --}} @if($invoice->line_items && is_array($invoice->line_items)) @foreach($invoice->line_items as $item) @endforeach @else @endif
Description Qté Prix unit. Total

{{ $item['description'] ?? 'Article' }}

@if(isset($item['details']))

{{ $item['details'] }}

@endif @if(isset($item['original_price']))

🏷️ -{{ number_format($item['discount'] ?? 0, 0) }}% {{ number_format($item['original_price'], 2, ',', ' ') }} €

@endif
{{ $item['quantity'] ?? 1 }}{{ isset($item['unit']) ? ' '.$item['unit'] : '' }} {{ number_format($item['unit_price'] ?? 0, 2, ',', ' ') }} € {{ number_format($item['total'] ?? 0, 2, ',', ' ') }} €

{{ $invoice->description }}

1 {{ number_format($invoice->subtotal, 2, ',', ' ') }} € {{ number_format($invoice->subtotal, 2, ',', ' ') }} €
{{-- Totaux --}}
Sous-total HT {{ number_format($invoice->subtotal, 2, ',', ' ') }} €
@if($invoice->tax_amount > 0)
TVA ({{ number_format($invoice->tax_rate, 0) }}%) {{ number_format($invoice->tax_amount, 2, ',', ' ') }} €
@endif @if($invoice->discount_amount > 0)
Remise -{{ number_format($invoice->discount_amount, 2, ',', ' ') }} €
@endif
Total TTC {{ number_format($invoice->total, 2, ',', ' ') }} €
{{-- Paiement --}} @if($invoice->status === 'paid')

Facture acquittée

Payée le {{ $invoice->paid_at?->format('d/m/Y à H:i') }} @if($invoice->payment_method) via {{ ucfirst($invoice->payment_method) }}@endif

@endif {{-- Notes --}} @if($invoice->notes)

Notes

{{ $invoice->notes }}

@endif @if($invoice->terms)

{{ $invoice->terms }}

@endif
{{-- Footer --}}
@endsection