From 58d24e0cfb7cf40c01f23228c2408ef5c7e2587f Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Fri, 11 Jul 2025 18:58:14 +0000 Subject: [PATCH] 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 --- server/routes.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/routes.ts b/server/routes.ts index 3030a26..291e30f 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -243,7 +243,14 @@ export async function registerRoutes(app: Express): Promise { 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 = {