Update sales records to include address and identification details

Correctly map `typeIdentite` to `documentType` and `numeroIdentite` to `documentNumber` in sales storage, and add the `adresse` field to the PostgreSQL schema for comprehensive record-keeping.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a388004f-01c5-42b1-b1d1-f18daf8bdd0c
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/a388004f-01c5-42b1-b1d1-f18daf8bdd0c/rtjaOGR
This commit is contained in:
michaelschal committed 2025-08-06 11:18:45 +00:00
1 parent 40c7975bbc
commit b9ae743ffb
2 files changed
+12 -2

No files matched your search

+5 -2
View File
@@ -494,8 +494,11 @@ class MemStorage implements IStorage {
timestamp: new Date(),
lieuNaissance: sale.lieuNaissance || null,
autoriteDelivrance: sale.autoriteDelivrance || null,
documentType: sale.documentType || null,
documentNumber: sale.documentNumber || null,
// Map typeIdentite to documentType field for historical reasons
documentType: sale.typeIdentite || null,
// Map numeroIdentite to documentNumber field
documentNumber: sale.numeroIdentite || null,
// Ensure adresse is properly mapped
adresse: sale.adresse || null,
photoRecto: sale.photoRecto || null,
photoVerso: sale.photoVerso || null,