Bug 782

Summary: The Hairdresser Booking Read show all the booking record instead of itself booking record
Product: CS3343 Salon Booking System Reporter: Ng Ming Chak <mingcng8-c>
Component: hairdresser.booking.ReadAssignee: Samuel <samuelip4-c>
Status: RESOLVED FIXED    
Severity: enhancement CC: mingcng8-c
Priority: ---    
Version: 2.0   
Hardware: PC   
OS: Mac OS   

Description Ng Ming Chak 2023-11-17 12:46:18 HKT
Description:
The Hairdresser Booking Read show all the booking record instead of itself booking record.

Step to Reproduce:
1. Hairdress login
2. Select “My booking”
3. The List show all the record.

Actual Result:
The list show all the record.

Expected Result:
The list should show the record for the hairdresser id only.
Comment 1 Ng Ming Chak 2023-11-17 12:48:15 HKT
The bug was caused by the incorrect SQL statement. It select all the record.

sql = "SELECT booking_id, booking_customer_id, C.user_name, booking_hairdresser_id, H.user_name, booking_date, booking_time, " +
            "booking_duration, booking_services, booking_subtotal, booking_discount, booking_grandtotal, booking_status " +  
            "FROM bookings B, users C, users H WHERE " + 
            "B.booking_customer_id = C.user_id AND " +
            "B.booking_hairdresser_id = H.user_id AND " + 
            "B.booking_date LIKE '" + selectedYear + "-" + selectedMonth + "%' AND ";



i add "B.booking_hairdresser_id = " + UserInfo.userID in the function read to fix the problem.