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

@@ -0,0 +1 @@
ALTER TABLE `invoices` ADD `isSubscription` int DEFAULT 0 NOT NULL;

View File

@@ -0,0 +1 @@
ALTER TABLE `userSettings` ADD `subscriptionKeywords` text;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -43,6 +43,20 @@
"when": 1770819973462,
"tag": "0005_small_roxanne_simpson",
"breakpoints": true
},
{
"idx": 6,
"version": "5",
"when": 1770821197778,
"tag": "0006_fresh_bromley",
"breakpoints": true
},
{
"idx": 7,
"version": "5",
"when": 1770821233743,
"tag": "0007_faulty_titanium_man",
"breakpoints": true
}
]
}

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),