@leads = Lead.select{ |l| ic = false if isCruise and isIntl then ic = (l.trip_type == Lead::CRUISE) or l.international else if isCruise and not isIntl then ic = (l.trip_type == Lead::CRUISE) and not l.international else if not isCruise and isIntl then ic = l.international and not (l.trip_type == Lead::CRUISE) else ic = ( not l.international and not (l.trip_type == Lead::CRUISE) ) end l.assignment_date < end_time and l.assignment_date > start_time and l.user_id == params[:user] and ic }