In this article in The Rules Series, we show how to configure the rules engine to use the Between certain times condition.
How the Between certain times condition works
Overview
The Between certain times condition matches the portion of timesheets that falls in a given time window on any given day.
Only the portion of time that falls in the window is matched in this condition.
Configuration options
Name | Description | Data Type | Example value |
---|---|---|---|
Start time | Start time of the time window | Time | 10:00 pm |
End time | End time of the time window | Time | 23:59 pm |
Match type | This specifies how to match whether the shift falls on the day(s) of the week. | One option | Portion |
Match types
Match type | Description |
---|---|
Portion (default) | The portion match type will match the portion of the shift that falls between the given time range. An overnight shift or timesheet will only match the portion of the shift that falls between the given time range, the remainder of the shift will not be matched. |
Starts on | The starts on match type will match the shift that starts between the given time range. An overnight shift or timesheet will match the entire shift or timesheet if it starts between the given time range in the week, regardless of when the shift ended. |
Ends on | The ends on match type will match the shift that ends between the given time range. An overnight shift or timesheet will match the entire shift or timesheet if it ends between the given time range in the week, regardless of when the shift started. |
Majority | The majority match type will match the shift where the majority of time falls between the given time range. An overnight shift or timesheet will match the entire shift or timesheet if the majority of time in the shift falls between the given time range, regardless of when the shift started or ended. |
Some examples
Portion
In this example, we have special pay conditions for shifts between 10:00pm and midnight.
The employee works shifts on:
Commencing 8:30pm and concluding 2:00am
Commencing 10:30pm and concluding 2:00am
Commencing 8:30pm and concluding at 11:00pm
In this case the employee is paid:
Commencing 8:30pm and concluding 2:00am
Ordinary hours between 8:30pm and 10:00pm
Ordinary hours + night shift between 10:00pm and midnight
Ordinary hours between midnight and 2:00am
Commencing 10:30pm and concluding 2:00am
Ordinary hours + night shift between 10:30pm and midnight
Ordinary hours between midnight and 2:00am
Commencing 8:30pm and concluding at 11:00pm
Ordinary hours between 8:30pm and 10:00pm
Ordinary hours + night shift between 10:00pm and 11:00pm
Starts on
In this example, we have special pay conditions for shifts that start between 10:00pm and midnight.
The employee works shifts on:
Commencing 8:30pm and concluding 2:00am
Commencing 10:30pm and concluding 2:00am
Commencing 8:30pm and concluding at 11:00pm
In this case the employee is paid:
Commencing 8:30pm and concluding 2:00am
Ordinary hours between 8:30pm and 2:00am
Commencing 10:30pm and concluding 2:00am
Ordinary hours + night shift between 10:30pm and 2:00am
Commencing 8:30pm and concluding at 11:30pm
Ordinary hours between 8:30pm and 11:00pm
Ends on
In this example, we have special pay conditions for shifts that ends between 10:00pm and midnight.
The employee works shifts on:
Commencing 8:30pm and concluding 2:00am
Commencing 10:30pm and concluding 2:00am
Commencing 8:30pm and concluding at 11:00pm
In this case the employee is paid:
Commencing 8:30pm and concluding 2:00am
Ordinary hours between 8:30pm and 2:00am
Commencing 10:30pm and concluding 2:00am
Ordinary hours between 10:30pm and 2:00am
Commencing 8:30pm and concluding at 11:30pm
Ordinary hours + night shift hours between 8:30pm and 11:00pm
Majority
In this example, we have special pay conditions for shifts where the majority of hours is between 10:00pm and midnight.
The employee works shifts on:
Commencing 8:30pm and concluding 2:00am
Commencing 10:00pm and concluding 2:00am
Commencing 9:30pm and concluding at 11:00pm
In this case the employee is paid:
Commencing 8:30pm and concluding 2:00am
Ordinary hours between 8:30pm and 2:00am
Commencing 10:00pm and concluding 2:00am
Ordinary hours + night shift hours between 10:00pm and 2:00am
Commencing 9:30pm and concluding at 11:00pm
Ordinary hours + night shift hours between 9:30pm and 11:00pm
Instructions
Create a Pay Rule and Pay Rule Version. (see: How to: Create a new Global Pay Rule, and How to: Create a new Global Pay Rule Version for examples)
Navigate to edit the pay rule version, and expand the Rules
In the conditions section, select Between certain times
Configure the start time for this condition
Configure the end time for this condition
Configure the Match type for this condition
Configure the action you want to take for this condition.
Save your pay rule version.
Comments
0 comments
Please sign in to leave a comment.