* actual_IN, actual_OUT -- actual punched times. * sched_IN, sched_OUT -- scheduled IN/OUT times. * effective_IN, effective_OUT -- effective IN/OUT for computation * IN_round -- maximum number of minutes for which an early IN punch * will still count as if it was punched on-time. * IN_Grace -- maximum number of minutes allowed for punching IN late * but still have it count as punched on-time. * OUT_grace -- maximum number of minutes allowed for punching OUT early * but still have it count as punched on-time. * OUT_round -- maximum number of minutes for which a late OUT punch * will still count as if it was on-time. IF BETWEEN(actual_IN, (sched_IN-IN_round), (sched_IN+IN_grace)) THEN effective_IN = sched_IN ELSE effective_IN = actual_IN ENDIF IF BETWEEN(actual_out, (sched_OUT-OUT_grace), (sched_OUT+OUT_round)) THEN effective_OUT = sched_OUT ELSE effective_OUT = actual_OUT ENDIF