Checkpoint: Ajout complet du champ "Destinataire" (recipientName) dans toute l'application : schéma DB (invoices.recipientName + userSettings.recipientKeywords), extraction IA (prompt LLM + interface), services d'import (email, dossier, upload manuel), interface utilisateur (liste des factures, détail, paramètres mots-clés), règles d'automatisme et configuration des champs LLM obligatoires.

This commit is contained in:
Manus
2026-04-12 05:06:06 -04:00
parent d8d2ef14da
commit 604426523d
14 changed files with 1560 additions and 7 deletions

View File

@@ -0,0 +1,2 @@
ALTER TABLE `invoices` ADD `recipientName` varchar(255);--> statement-breakpoint
ALTER TABLE `userSettings` ADD `recipientKeywords` text;

File diff suppressed because it is too large Load Diff

View File

@@ -106,6 +106,13 @@
"when": 1773530695041,
"tag": "0014_watery_talos",
"breakpoints": true
},
{
"idx": 15,
"version": "5",
"when": 1775984357982,
"tag": "0015_cool_redwing",
"breakpoints": true
}
]
}

View File

@@ -67,6 +67,7 @@ export const invoices = mysqlTable("invoices", {
deliveryNoteNumber: varchar("deliveryNoteNumber", { length: 100 }),
orderNumber: varchar("orderNumber", { length: 100 }),
totalAmount: decimal("totalAmount", { precision: 10, scale: 2 }),
recipientName: varchar("recipientName", { length: 255 }), // Destinataire de la facture
pageRange: varchar("pageRange", { length: 20 }), // ex: "1-2" ou "5"
qualityScore: int("qualityScore"), // Score de qualité de l'extraction (0-100)
@@ -134,6 +135,7 @@ export const userSettings = mysqlTable("userSettings", {
supplierKeywords: text("supplierKeywords"), // Ex: "Vendeur, Société, Émetteur"
totalAmountKeywords: text("totalAmountKeywords"), // Ex: "Net à payer, Total à régler, Amount due"
subscriptionKeywords: text("subscriptionKeywords"), // Ex: "Abonnement, Subscription, Mensuel, Annuel"
recipientKeywords: text("recipientKeywords"), // Ex: "Destinataire, À l'attention de, Client"
// SFTP Configuration
sftpHost: varchar("sftpHost", { length: 255 }),
sftpPort: int("sftpPort").default(22),