Update delivery information based on matched invoice or bill of lading

Adjusted the auto-fill logic in `BLReconciliation.tsx` to populate `invoiceReference`, `invoiceAmount`, and `dueDate` if they exist in the `result`. Also modified `server/routes.ts` to correctly parse `dueDate` as a Date object.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 25b35a21-13c0-4deb-8f7d-88d73b7e8d28
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/Tx7N1IN
This commit is contained in:
michaelschal committed 2025-11-03 17:19:33 +00:00
1 parent 1bf457be78
commit 228977ae2b
3 files changed
+34 -12

No files matched your search

+4 -1
View File
@@ -1407,10 +1407,13 @@ export async function registerRoutes(app: Express): Promise<Server> {
transformedData.invoiceAmount = transformedData.invoiceAmount.toString();
}
// Convert validatedAt to Date object (schema expects Date for timestamp fields)
// Convert timestamp fields to Date objects (schema expects Date for timestamp fields)
if (transformedData.validatedAt && typeof transformedData.validatedAt === 'string') {
transformedData.validatedAt = new Date(transformedData.validatedAt);
}
if (transformedData.dueDate && typeof transformedData.dueDate === 'string') {
transformedData.dueDate = new Date(transformedData.dueDate);
}
const data = insertDeliverySchema.partial().parse(transformedData);