Files
LogiFlow/attached_assets/Pasted-ns-errorMessage-null-invoiceReference-981644-supplierName-Poly-1762190589763_1762190589763.txt
T
michaelschal e328993329 Update delivery reconciliation to correctly handle invoice data and fix date field
Correctly applies invoice reference, amount, and due date to delivery updates. Modifies the `dueDate` field in the schema to `timestamp` and resolves the "column 'due_date' does not exist" error in PostgreSQL.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: a35a1a31-82b0-453f-aa10-f67eb24aaae3
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/Tx7N1IN
2025-11-03 17:24:23 +00:00

204 lines
3.4 KiB
Plaintext

ns
errorMessage: null,
invoiceReference: '981644',
supplierName: 'Polyflame',
fromCache: true,
permanent: false
}
POST /api/deliveries/343/verify-invoice 200 in 256ms
🔍 Recherche NocoDB: { tableId: 'mrr733dfb8wtt9b', column: 'Numero_BL' }
🔍 Recherche NocoDB: { tableId: 'mrr733dfb8wtt9b', column: 'Numero_BL' }
💾 [CACHE] Tentative sauvegarde: {
invoiceReference: '197771',
groupId: 1,
cacheKey: '1_197771',
exists: true,
isReconciled: false,
cacheType: 'temporaire 6h (trouvé)',
expiresAt: '2025-11-03T23:21:35.673Z'
}
💾 [CACHE] Tentative sauvegarde: {
invoiceReference: '197771',
groupId: 1,
cacheKey: '1_197771',
exists: true,
isReconciled: false,
cacheType: 'temporaire 6h (trouvé)',
expiresAt: '2025-11-03T23:21:35.675Z'
}
✅ [CACHE] Résultat sauvé en cache: {

id: 31803,
invoiceReference: '197771',
groupId: 1,
exists: true,
isReconciled: false,
cacheType: 'temporaire 6h (trouvé)',
cacheKey: '1_197771'
}
📅 Date d'échéance récupérée et normalisée: 2025-11-29 (original: 2025-11-29)
✅ [CACHE] Résultat sauvé en cache: {

id: 31803,
invoiceReference: '197771',
groupId: 1,
exists: true,
isReconciled: false,
cacheType: 'temporaire 6h (trouvé)',
cacheKey: '1_197771'
}
📅 Date d'échéance récupérée et normalisée: 2025-11-29 (original: 2025-11-29)
Error updating delivery: error: column "due_date" does not exist
at /app/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///app/node_modules/drizzle-orm/node-postgres/session.js:83:22
at async DatabaseStorage.updateDelivery (file:///app/dist/index.js:2142:28)
at async file:///app/dist/index.js:14714:31 {
length: 174,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: 'Perhaps you meant to reference the column "deliveries.dueDate".',
position: '310',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3665',
routine: 'errorMissingColumn'
}
PUT /api/deliveries/427 500 in 307ms
Error updating delivery: error: column "due_date" does not exist
at /app/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///app/node_modules/drizzle-orm/node-postgres/session.js:83:22
at async DatabaseStorage.updateDelivery (file:///app/dist/index.js:2142:28)
at async file:///app/dist/index.js:14714:31 {
length: 174,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: 'Perhaps you meant to reference the column "deliveries.dueDate".',
position: '310',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3665',
routine: 'errorMissingColumn'
}
PUT /api/deliveries/427 500 in 330ms
HEAD /api/health 200 in 1ms
HEAD /api/health 200 in 1ms
HEAD /api/health 200 in 1ms