Let's see if I understand what is happening. Here is the timesheet for a user:
Normal-In 9:05 AM
Normal-Out 11:00 AM
Normal-In 1:00 PM
Normal-Out 5:00 PM
The user is scheduled to begin work at 9:00am, has a grace period of 15 minutes and a watch window of 8 hours.
When TimeTrex goes to determine In-Late exceptions, it looks at each individual in-punch separately. First, it sees a 9:05am in-punch, and determines that it is part of the 9:00am schedule. It falls within the grace period, and so does not create an exception. It then see's the 1:00pm in-punch, and determines that it falls within the watch window for the 9:00am schedule. It also calculates that it is more than 15 minutes from 9:00am, and so marks an exception.
Would it be possible to change the logic of the program so that TimeTrex first looks at the schedule and the exception rules, and then uses the data to see if a valid in-punch exists. For example, it looks at the schedule and sees that the user should begin work at 9:00am, and that the exception policy has a watch window of 5 hours. It then selects all In-Punches within that 5 hour window, ordering by the time of the punches in ascending order. It looks at the first/earliest record and determines if it is within the 15 minute grace period, and marks an exception based only on that record.
-Ben