Fix delivery validation issue by correctly formatting date for PostgreSQL

Corrected the `deliveredDate` to use a `Date` object directly instead of `toISOString()` when validating deliveries, resolving a `TypeError` in Drizzle ORM and restoring production functionality.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 7c468936-2a88-4686-ac0a-84921a45222d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/7c468936-2a88-4686-ac0a-84921a45222d/ce6DSX9
This commit is contained in:
michaelschal committed 2025-08-13 14:53:55 +00:00
1 parent c9cb1ad23e
commit 4a8bdc5cf0
4 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -610,7 +610,7 @@ export class DatabaseStorage implements IStorage {
async validateDelivery(id: number, blData?: { blNumber: string; blAmount: number }): Promise<void> {
const updateData: any = {
status: 'delivered',
deliveredDate: new Date().toISOString(),
deliveredDate: new Date(),
updatedAt: new Date(),
};