SELECT
  AP.AttendanceDate,
  AP.AppointmentID,
  CB.BranchName,
  C.AppointmentType,
  U1.FullName AS Consultant,
  AP.TimeSpent,
  AP.TimeTravelled,
  (AP.TimeSpent + AP.TimeTravelled) AS TimeTotal
FROM
  tbAppointments AS AP
    LEFT JOIN tbAppointmentTypes C ON (C.AttendanceTypeID = AP.AttendanceTypeID)
    LEFT JOIN taClientBranchProducts AS BP ON (BP.ClientBranchProductID = AP.ClientBranchProductID)
    LEFT JOIN taClientProducts AS CP ON (CP.ClientProductID = BP.ClientProductID)
    LEFT JOIN taClientBranches AS CB ON (CB.ClientBranchID = BP.ClientBranchID)
    LEFT JOIN taUsers U1 ON (U1.UserID = AP.ConsultantID)
WHERE
  (AP.AppointmentStage LIKE 'Auth%')
  @pFromTo
  @pProductID
  @pBranchID
  @pConsultantID
  @pClientID