Checkpoint: Ajout du champ Abonnement (OUI/NON) aux factures avec détection automatique par mots-clés et édition directe dans la liste

This commit is contained in:
Manus
2026-02-11 09:54:17 -05:00
parent 14c50fc8fd
commit 4535cd6bdf
13 changed files with 2277 additions and 2 deletions

View File

@@ -92,6 +92,9 @@ export const invoices = mysqlTable("invoices", {
// Extracted text from PDF
extractedText: text("extractedText"), // Full text extracted from the invoice PDF
// Subscription flag
isSubscription: int("isSubscription").default(0).notNull(), // 0 = NON, 1 = OUI
// SFTP Export tracking
exportedAt: timestamp("exportedAt"),
exportMode: mysqlEnum("exportMode", ["manual", "automatic"]),
@@ -122,6 +125,7 @@ export const userSettings = mysqlTable("userSettings", {
orderNumberKeywords: text("orderNumberKeywords"), // Ex: "Cde client, Référence commande, PO Number"
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"
// SFTP Configuration
sftpHost: varchar("sftpHost", { length: 255 }),
sftpPort: int("sftpPort").default(22),