Improve financial records processing and add production debugging tools

Update schema for financial records to allow optional fields and introduce a SQL script for detailed production debugging of financial data and related entities.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/2Jd7tYp
This commit is contained in:
michaelschal committed 2025-09-08 14:49:09 +00:00
1 parent 73b85f2598
commit c45bda21c5
2 files changed
+79 -2

No files matched your search

+2 -2
View File
@@ -267,8 +267,8 @@ export const avoirs = pgTable("avoirs", {
id: serial("id").primaryKey(),
supplierId: integer("supplier_id").notNull(), // Fournisseur
groupId: integer("group_id").notNull(), // Magasin/groupe associé - OBLIGATOIRE pour filtrage
invoiceReference: varchar("invoice_reference", { length: 255 }).notNull(), // Référence facture
amount: decimal("amount", { precision: 10, scale: 2 }).notNull(), // Montant
invoiceReference: varchar("invoice_reference", { length: 255 }), // Référence facture (OPTIONNEL)
amount: decimal("amount", { precision: 10, scale: 2 }), // Montant (OPTIONNEL)
comment: text("comment"), // Commentaire (optionnel)
commercialProcessed: boolean("commercial_processed").default(false), // Avoir fait par commercial
status: varchar("status", { length: 50 }).notNull().default("En attente de demande"), // En attente de demande, Demandé, Reçu