Time and Labor
Summary:
We have an OTL Fast Formula that is used by a Time Calculation Rule with the Summation Level set to Detail to calculate Overtime (OT). The formula works as expected for scenarios where all reported time entries fall within the same day.
However, the logic fails in overnight scenarios. In our design, an overnight shift is identified when there is a change in calendar day and the gap between the last entry of the previous day and the first entry of the current day meets the overnight criteria.
The formula was originally developed with the assumption that Oracle would pass the time-entry records in chronological order. Based on that assumption, the logic compares the current record with the previous record to determine continuity and calculate OT correctly.