feat(facture): Ajoute la gestion des factures et paiements (CRUD, export).

Cette commit ajoute la fonctionnalité de gestion des factures et des paiements,
incluant l'affichage, la recherche, l'export Excel et la pagination.
```
This commit is contained in:
Serreau Jovann
2026-01-29 13:05:08 +01:00
parent d0d2e73e78
commit 61af0fd0dc
9 changed files with 674 additions and 120 deletions

View File

@@ -129,14 +129,27 @@
<a download="AUDIT_{{ quote.num }}.pdf" href="{{ vich_uploader_asset(quote, 'devisAuditFile') }}" title="Télécharger le certificat d'audit" target="_blank" class="p-2 bg-purple-600/10 hover:bg-purple-600 text-purple-500 hover:text-white rounded-xl transition-all border border-purple-500/20 shadow-lg shadow-purple-600/5">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
</a>
<a data-turbo="false" href="{{ path('app_crm_contrats_create', {idDevis: quote.id}) }}"
title="Générer le contrat de location"
class="flex items-center gap-2 px-4 py-2 bg-blue-600/10 hover:bg-blue-600 text-blue-500 hover:text-white rounded-xl transition-all border border-blue-500/20 shadow-lg shadow-blue-600/5 font-bold text-xs uppercase tracking-widest">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />
</svg>
<span>Créer le contrat</span>
</a>
{% if quote.contrats is null %}
{# ÉTAT : AUCUN CONTRAT - BOUTON CRÉATION (BLEU) #}
<a data-turbo="false" href="{{ path('app_crm_contrats_create', {idDevis: quote.id}) }}"
title="Générer le contrat de location"
class="group flex items-center gap-2 px-5 py-2.5 bg-blue-600/10 hover:bg-blue-600 text-blue-500 hover:text-white rounded-xl transition-all duration-300 border border-blue-500/20 shadow-lg shadow-blue-600/5 font-bold text-[10px] uppercase tracking-widest">
<svg class="w-4 h-4 transition-transform group-hover:rotate-12" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />
</svg>
<span>Créer le contrat</span>
</a>
{% else %}
{# ÉTAT : CONTRAT EXISTANT - BOUTON ACCÈS (VERT) #}
<a data-turbo="false" href="{{ path('app_crm_contrats_view', {id: quote.contrats.id}) }}"
title="Accéder au contrat de location"
class="group flex items-center gap-2 px-5 py-2.5 bg-emerald-500/10 hover:bg-emerald-500 text-emerald-500 hover:text-white rounded-xl transition-all duration-300 border border-emerald-500/20 shadow-lg shadow-emerald-600/5 font-bold text-[10px] uppercase tracking-widest">
<svg class="w-4 h-4 transition-transform group-hover:scale-110" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0" />
</svg>
<span>Voir le contrat</span>
</a>
{% endif %}
{% else %}
{# PDF Brouillon #}
<a download="{{ quote.num }}.pdf" href="{{ vich_uploader_asset(quote,'devisDocuSealFile') }}" target="_blank" class="p-2 bg-slate-600/10 hover:bg-slate-600 text-slate-500 hover:text-white rounded-xl transition-all border border-slate-500/20">