+
+
+
Factures BAP
+
Factures non-abonnement (Abonnement = NON)
+
+
+
+
+
+
+
+
+
+
+
+ {/* Search */}
+
+
+
+ setSearchQuery(e.target.value)}
+ className="pl-10"
+ />
+
+
+
+ {/* Status Filters */}
+
+
+
+
+
+
+
+ {/* Table */}
+ {isLoading ? (
+ Chargement...
+ ) : filteredInvoices && filteredInvoices.length > 0 ? (
+
+
+
+
+
+
+
+ Fournisseur
+ N° Facture
+ Date
+ Montant
+ Service
+ Type achat
+ Ventilation
+ Abonnement
+ Score
+ Statut
+ Actions
+
+
+
+ {filteredInvoices.map((invoice) => {
+ return (
+
+
+ handleSelectOne(invoice.id, checked as boolean)}
+ />
+
+
+
+
+ {invoice.invoiceNumber || "-"}
+
+ {invoice.invoiceDate
+ ? new Date(invoice.invoiceDate).toLocaleDateString("fr-FR")
+ : "-"}
+
+
+ {invoice.totalAmount
+ ? `${parseFloat(invoice.totalAmount as string).toFixed(2)} €`
+ : "-"}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {getQualityBadge(invoice.qualityScore)}
+ {getExportStatusBadge(invoice.exportStatus || "not_exported")}
+
+
+
+
+
+
+
+
+ );
+ })}
+
+
+
+ ) : (
+
+
+
Aucune facture trouvée
+
+ {searchQuery ? "Essayez une autre recherche" : "Commencez par importer un fichier PDF"}
+
+
+ )}
+
+
+
+ {/* Info message */}
+ {filteredInvoices && filteredInvoices.some(inv => (inv.qualityScore || 0) < 100) && (
+
+
+ Note : Seules les factures avec un score de qualité de 100% peuvent être exportées.
+ Les factures avec un score inférieur sont grisées et ne peuvent pas être sélectionnées.
+
+
+ )}
+
+
+ {/* Delete Confirmation Dialog */}
+