@extends('layouts.provider') @section('title', 'Détail de la facture') @section('page-title', 'Finances > Détail de la facture') @section('content')
{{ format_currency($invoice->remaining_amount) }} TND impayés depuis {{ $invoice->days_overdue }} jours
Échéance dépassée : {{ $invoice->due_date->format('d/m/y') }}
{{ format_currency($invoice->remaining_amount) }} TND à échéance dans {{ now()->startOfDay()->diffInDays($invoice->due_date, false) }} jour{{ now()->startOfDay()->diffInDays($invoice->due_date, false) > 1 ? 's' : '' }}
Échéance : {{ $invoice->due_date->format('d/m/y') }}
{{ format_currency($invoice->remaining_amount) }} TND à encaisser
{{ $invoice->paid_amount > 0 ? 'Partiellement payée' : 'Facture non payée' }}{{ $invoice->due_date ? ' - Échéance : ' . $invoice->due_date->format('d/m/y') : '' }}
{{ $invoice->notes }}
@endifNet à payer
{{ format_currency($invoice->net_amount) }} {{ $invoice->currency }}
Payé
{{ format_currency($invoice->paid_amount) }} {{ $invoice->currency }}
Reste
{{ format_currency($invoice->remaining_amount) }} {{ $invoice->currency }}
{{ $invoice->cancelledInvoice->invoice_number }}
Annulée le {{ $invoice->payment_date->format('d/m/Y') }}
{{ format_currency($invoice->cancelledInvoice->net_amount) }} {{ $invoice->cancelledInvoice->currency }}
Aucune facture annulée liée
@endif{{ $invoice->creditNote->invoice_number }}
Créé le {{ $invoice->creditNote->payment_date->format('d/m/Y') }}
{{ format_currency($invoice->creditNote->net_amount) }} {{ $invoice->creditNote->currency }}
Aucune facture d'avoir liée
@endifFinalisez la facture pour pouvoir enregistrer des paiements.
Aucun paiement
Matricule fiscal : {{ auth()->user()->provider->tax_id }}
@endif @if(auth()->user()->provider->address){{ auth()->user()->provider->address }}
@endif @if(auth()->user()->provider->city || auth()->user()->provider->country){{ auth()->user()->provider->city }}{{ auth()->user()->provider->city && auth()->user()->provider->country ? ', ' : '' }}{{ auth()->user()->provider->country }}
@endif{{ $invoice->client->full_name }}
@if($invoice->client->is_vat_subject && $invoice->client->matricule_fiscal)Matricule fiscal : {{ $invoice->client->matricule_fiscal }}
@endif @if($invoice->client->phone)Tél : {{ $invoice->client->phone }}
@endif @if($invoice->client->email)Email : {{ $invoice->client->email }}
@endif @if($invoice->client->address)Adresse : {{ $invoice->client->address }}
@endifN° Facture : {{ $invoice->invoice_number ?? $invoice->reference }}
Date : {{ $invoice->payment_date->format('d/m/Y') }}
@if($invoice->due_date)Échéance : {{ $invoice->due_date->format('d/m/Y') }}
@endif| Description | Quantité | HT ({{ $invoice->currency }}) | % TVA | TVA ({{ $invoice->currency }}) | Montant TTC ({{ $invoice->currency }}) |
|---|---|---|---|---|---|
|
@if($item->appointment_id)
{{ $item->description }}
{{ $item->service_date->format('d/m/Y') }}
{{ $item->service_time }}
@else
{{ $item->description }}
{{ $item->service_date->format('d/m/Y') }}
@if($item->service_time)
{{ $item->service_time }}
@endif
@endif
|
{{ $item->quantity }} | {{ format_currency($item->unit_price) }} | {{ number_format($item->vat_rate, 0) }}% | {{ format_currency($item->vat_amount) }} | {{ format_currency($item->total_ttc) }} |
|
{{ $appointment->service->name ?? 'Service' }}
{{ $appointment->start_time->format('d/m/Y') }}
{{ $appointment->start_time->format('H:i') }} - {{ $appointment->end_time ? $appointment->end_time->format('H:i') : $appointment->start_time->addHour()->format('H:i') }}
|
@php $duration = $appointment->end_time ? $appointment->start_time->diffInMinutes($appointment->end_time) : 60; $hours = floor($duration / 60); $minutes = $duration % 60; @endphp {{ $hours }}h{{ $minutes > 0 ? str_pad($minutes, 2, '0', STR_PAD_LEFT) : '' }} | @php // price_at_booking est le prix HT $priceHT = $appointment->price_at_booking; $vatAmount = $appointment->vat_rate > 0 ? ($priceHT * $appointment->vat_rate / 100) : 0; $priceTTC = round($priceHT + $vatAmount, 2); @endphp{{ format_currency($priceHT) }} | {{ number_format($appointment->vat_rate, 0) }}% | {{ format_currency($vatAmount) }} | {{ format_currency($priceTTC) }} |
| Prestation de service | - | {{ format_currency($invoice->amount) }} | 0% | 0,00 | {{ format_currency($invoice->amount) }} |
| Taux | Base HT | Montant TVA |
|---|---|---|
| {{ number_format($rate, 0) }}% | {{ format_currency($data['base']) }} | {{ format_currency($data['amount']) }} |
| Total | {{ format_currency($totalHT) }} | {{ format_currency($totalVAT) }} |
| Total HT | {{ format_currency($totalHT) }} |
| Total TVA | {{ format_currency($totalVAT) }} |
| {{ $tax->label_snapshot ?? ucfirst(str_replace('_', ' ', $tax->name_snapshot)) }} @if($tax->type_snapshot === 'percent')({{ number_format($tax->value_snapshot, 2) }}%)@endif | {{ $tax->sign_snapshot }}{{ format_currency($tax->amount_snapshot) }} |
| Total TTC | {{ format_currency($invoice->total_ttc) }} |
| {{ $tax->label_snapshot ?? ucfirst(str_replace('_', ' ', $tax->name_snapshot)) }} @if($tax->type_snapshot === 'percent')({{ number_format($tax->value_snapshot, 2) }}%)@endif | {{ $tax->sign_snapshot }}{{ format_currency($tax->amount_snapshot) }} |
| {{ $tax->label_snapshot ?? ucfirst(str_replace('_', ' ', $tax->name_snapshot)) }} @if($tax->type_snapshot === 'percent')({{ number_format($tax->value_snapshot, 2) }}%)@endif | {{ $tax->sign_snapshot === '-' ? '-' : '' }}{{ format_currency($tax->amount_snapshot) }} |
| NET À PAYER | {{ format_currency($invoice->net_amount) }} |
Arrête la présente facture à la somme de :
{{ \App\Helpers\NumberToWordsHelper::convert($invoice->net_amount) }}
Banque : {{ auth()->user()->provider->defaultBankAccount->name }}@if(auth()->user()->provider->defaultBankAccount->reference) · Référence : {{ auth()->user()->provider->defaultBankAccount->reference }}@endif
Facture générée le {{ now()->format('d/m/Y à H:i') }}
{{ config('app.name') }} - Tous droits réservés