Files
LogiFlow/attached_assets/Pasted--PRODUCTION-getDelivery-427-found-associated-order-256-with-status-delivered-Up-1762190961659_1762190961659.txt
T
michaelschal 257932686f Improve date handling for delivery due dates
Correctly normalize and convert delivery due dates to Date objects for database storage, resolving a TypeError.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 4d4c67ad-e680-477f-bb7e-e952e806558e
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:31:02 +00:00

201 lines
4.1 KiB
Plaintext

✅ PRODUCTION: getDelivery #427 found associated order #256 with status: delivered
🔄 Updating delivery: { id: 427, data: { invoiceReference: '197771' }, user: 'admin_local' }
🔍 [INVOICE] Début vérification facture: { invoiceReference: '197771', groupId: 1, forceRefresh: true }
🔄 [INVOICE] Refresh forcé, ignorant le cache
🔧 Configuration groupe: {
groupName: 'Frouard',
hasNocodbConfig: true,
hasTableName: true,
hasWebhook: true
}
🔍 Vérification NocoDB en production...
🔧 Configuration NocoDB active récupérée: {
id: 1,
name: 'Nocodb',
baseUrl: 'https://nocodb.ffnancy.fr',
projectId: 'pcg4uw79ukvycxc',
apiToken: 'z4BAwLo6dgoN_E7PKJSHN7PA7kdBePtKOYcsDlwQ',
description: '',
isActive: true,
createdBy: 'admin_local',
createdAt: 2025-07-22T11:12:54.971Z,
updatedAt: 2025-07-25T23:07:17.197Z
}
🔧 Configuration NocoDB trouvée: {
configName: 'Nocodb',
baseUrl: 'https://nocodb.ffnancy.fr',
projectId: 'pcg4uw79ukvycxc',
hasToken: true
}
🔧 Utilisation table ID: {
groupTable: 'CommandeF',
configuredId: 'mrr733dfb8wtt9b',
resolvedId: 'mrr733dfb8wtt9b'
}
🔍 Recherche NocoDB: { tableId: 'mrr733dfb8wtt9b', column: 'RefFacture' }
💾 [CACHE] Tentative sauvegarde: {
invoiceReference: '197771',
groupId: 1,
cacheKey: '1_197771',
exists: true,
isReconciled: false,
cacheType: 'temporaire 6h (trouvé)',
expiresAt: '2025-11-03T23:28:12.943Z'
}
Error updating delivery: TypeError: value.toISOString is not a function
at PgTimestamp.mapToDriverValue (file:///app/node_modules/drizzle-orm/pg-core/columns/timestamp.js:34:18)
at file:///app/node_modules/drizzle-orm/sql/sql.js:131:73
at Array.map (<anonymous>)
at SQL.buildQueryFromSourceParams (file:///app/node_modules/drizzle-orm/sql/sql.js:73:32)
at file:///app/node_modules/drizzle-orm/sql/sql.js:95:21
at Array.map (<anonymous>)
at SQL.buildQueryFromSourceParams (file:///app/node_modules/drizzle-orm/sql/sql.js:73:32)
at file:///app/node_modules/drizzle-orm/sql/sql.js:95:21
at Array.map (<anonymous>)
at SQL.buildQueryFromSourceParams (file:///app/node_modules/drizzle-orm/sql/sql.js:73:32)
✅ [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)
PUT /api/deliveries/427 500 in 339ms
🔍 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:28:12.963Z'
}
✅ [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: TypeError: value.toISOString is not a function
at PgTimestamp.mapToDriverValue (file:///app/node_modules/drizzle-orm/pg-core/columns/timestamp.js:34:18)
at file:///app/node_modules/drizzle-orm/sql/sql.js:131:73
at Array.map (<anonymous>)
at SQL.buildQueryFromSourceParams (file:///app/node_modules/drizzle-orm/sql/sql.js:73:32)
at file:///app/node_modules/drizzle-orm/sql/sql.js:95:21
at Array.map (<anonymous>)
at SQL.buildQueryFromSourceParams (file:///app/node_modules/drizzle-orm/sql/sql.js:73:32)
at file:///app/node_modules/drizzle-orm/sql/sql.js:95:21
at Array.map (<anonymous>)
at SQL.buildQueryFromSourceParams (file:///app/node_modules/drizzle-orm/sql/sql.js:73:32)
PUT /api/deliveries/427 500 in 50ms
HEAD /api/health 200 in 1ms
HEAD /api/health 200 in 1ms