Is Overlapping Work Details Condition

com.workbrain.app.ta.conditions.IsOverlappingDetailsCondition

The Is Overlapping Work Details Condition checks for overlapping work details with the prior day and next day. If the current work summary date has overlapping work details with the prior date or the next date, then the condition returns true.

Consider this scenario:

  • An employee works an overnight shift from 7pm to 7am.
  • On Monday, the employee enters a work detail override on the timesheet from 7pm to 7am.
  • On Tuesday, the employee enters a second work detail override on the timesheet from 2am to 7am. Therefore, the employee is double paid from 2am to 7am.

To avoid this scenario, you can configure the condition to trigger the Error Rule when an overlapping work detail occurs across days.

Parameters In

Name Description
Compare Time Codes A comma-separated list of time codes that are considered (Time Codes Inclusive? parameter set to Yes) or excluded (Time Codes Inclusive? parameter set to No) when comparing overlapping details.

If this parameter is left blank, then all time codes are selected.

Time Codes Inclusive? When set to Yes, the time codes listed in the Compare Time Codes parameter are considered in the comparison. This is the default.

When set to No, the time codes that are not listed in the Compare Time Codes parameter are considered in the comparison.

Compare Hour Types A comma-separated list of hour types that are considered (Hour Types Inclusive? set to Yes) or excluded (Hour Types Inclusive? set to No) when comparing overlapping details.

If this parameter is left blank, then all hour types are selected.

Hour Types Inclusive? When set to Yes, the hour types listed in the Compare Hour Types parameter are considered in the comparison. This is the default.

When set to No, the hour types that are not listed in the Compare Hour Types parameter are considered in the comparison.

Example: Trigger the Error Rule for overlapping work details

In this example, the condition triggers the Error Rule if there is an overlapping work detail.

Is Overlapping Work Details Condition:

Parameter Value
Compare Time Codes WRK, VAC
Time Codes Inclusive? Yes
Compare Hour Types <blank>
Hour Types Inclusive? Yes

The condition evaluates to true if there is an overlapping work detail with the WRK or VAC time code on the prior day or next day. Otherwise, the condition evaluates to false.

Error Rule:

If the preceding condition evaluates to true, then this rule generates an error on the timesheet for the day being calculated.

Parameter Value
Error Message Overlapping work details are not allowed.
Stop Execution Selected

For example, assume an employee has these timesheet details:

Work Summary Date Work Detail Date Start Time End Time Time Code Hour Type
March 7 March 7 19:00 00:00 VAC REG
March 7 March 8 00:00 7:00 VAC REG
March 8 March 8 2:00 3:00 WRK REG

On March 7, the condition returns true because there is an overlapping work detail with the timesheet on March 8. On March 8, the condition returns true because there is an overlapping work detail with the timesheet on March 7. Therefore, an error is triggered on both days.