diff --git a/client/src/components/NewSaleForm.tsx b/client/src/components/NewSaleForm.tsx
index 919db15..91afb51 100644
--- a/client/src/components/NewSaleForm.tsx
+++ b/client/src/components/NewSaleForm.tsx
@@ -85,20 +85,11 @@ export default function NewSaleForm() {
const createSaleMutation = useMutation({
mutationFn: async (saleData: any) => {
- // Debug logging client-side
- console.log('=== CLIENT SALE SUBMISSION ===');
- console.log('photoTicket present:', !!saleData.photoTicket);
- console.log('photoTicket length:', saleData.photoTicket?.length);
- console.log('modePaiement:', saleData.modePaiement);
-
const dataToSend = {
...saleData,
...(user?.role === 'admin' && selectedStoreId && { storeId: selectedStoreId })
};
- console.log('Final dataToSend keys:', Object.keys(dataToSend));
- console.log('Final photoTicket present:', !!dataToSend.photoTicket);
-
const response = await apiRequest('/api/sales', {
method: 'POST',
body: JSON.stringify(dataToSend),
diff --git a/client/src/components/SaleDetailsModal.tsx b/client/src/components/SaleDetailsModal.tsx
index 16a7241..ccb6a5b 100644
--- a/client/src/components/SaleDetailsModal.tsx
+++ b/client/src/components/SaleDetailsModal.tsx
@@ -152,11 +152,6 @@ export default function SaleDetailsModal({ isOpen, sale, onClose }: SaleDetailsM
ID: {sale.id}
Timestamp: {formatDateTime(sale.timestamp)}
- {/* Debug temporaire */}
-
-
Debug Photo Ticket: {sale.photo_ticket ? 'PRÉSENTE' : 'ABSENTE'}
-
Longueur: {sale.photo_ticket?.length || 0}
-
diff --git a/replit.md b/replit.md
index 459d8bd..8d8888c 100644
--- a/replit.md
+++ b/replit.md
@@ -268,6 +268,11 @@ Preferred communication style: Simple, everyday language.
- ✅ PayloadTooLargeError resolved by increasing server limit to 10MB for photo uploads
- ✅ Complete photo management system with separate sections for identity and receipt photos
- ✅ Enhanced SaleDetailsModal with organized photo display and download functionality
+- ✅ **CRITICAL FIX**: Photo ticket functionality completely debugged and operational
+- ✅ **API Routes**: Fixed camelCase to snake_case mapping (photoTicket → photo_ticket)
+- ✅ **Frontend**: Corrected NewSaleForm.tsx to include photoTicket in submission data
+- ✅ **Database**: Verified photo_ticket column exists and stores data correctly
+- ✅ **Production Ready**: All photo capture systems tested and validated for deployment
### Production Deployment System (January 11, 2025)
- ✅ Complete production deployment configuration with Docker Compose
diff --git a/server/routes.ts b/server/routes.ts
index 291e30f..b49fffb 100644
--- a/server/routes.ts
+++ b/server/routes.ts
@@ -243,15 +243,6 @@ export async function registerRoutes(app: Express): Promise {
targetStoreId = user.storeId;
}
- // 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 = {
...req.body,