Add debugging information to track down missing sales ticket photos

Adds console logs to inspect request body and identify missing photoTicket data during sales creation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: dec54137-d5a2-4406-8ad4-5f2f9fb110bf
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/4099a3be-c3a6-4039-915b-a1ce8a3727fa.jpg
This commit is contained in:
michaelschal committed 2025-07-11 18:58:14 +00:00
1 parent f9e44b06bb
commit 58d24e0cfb
1 file changed
+8 -1
+8 -1
View File
@@ -243,7 +243,14 @@ export async function registerRoutes(app: Express): Promise<Server> {
targetStoreId = user.storeId;
}
// Photo mapping debug (can be removed in production)
// Debug logging - temporary
console.log('=== SALE CREATION DEBUG ===');
console.log('Request body keys:', Object.keys(req.body));
console.log('photoRecto present:', !!req.body.photoRecto);
console.log('photoVerso present:', !!req.body.photoVerso);
console.log('photoTicket present:', !!req.body.photoTicket);
console.log('photoTicket length:', req.body.photoTicket?.length);
console.log('modePaiement:', req.body.modePaiement);
// Map frontend camelCase to database snake_case for photos
const mappedBody = {