In this article in The Rules Series, we show how to configure the rules engine to use the On specific days condition.
How the On specific days condition works
Overview
The On specific days condition matches the portion of timesheets that fall on given day(s) of the week.
The way in which we match the time depends on the Match type configuration.
Configuration options
Name | Description | Data Type | Example value |
---|---|---|---|
Days of week | This specifies the day(s) of the week that match the timesheets. Any day in this list will match the portion of each timesheet that falls on the selected day(s). | One or more options | Monday |
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 on the given day(s) of the week. An overnight shift or timesheet will only match the portion of the shift that falls on the day(s) of the week, the remainder of the shift will not be matched. |
Starts on | The starts on match type will match the shift that starts on the given day(s) of the week. An overnight shift or timesheet will match the entire shift or timesheet if it starts on one of the given day(s) in the week, regardless of when the shift ended. |
Ends on | The ends on match type will match the shift that ends on the given day(s) of the week. An overnight shift or timesheet will match the entire shift or timesheet if it ends on one of the given day(s) in the week, regardless of when the shift started. |
Majority | The majority match type will match the shift that ends on the given day(s) of the week. An overnight shift or timesheet will match the entire shift or timesheet if the majority of time in the shift is on one of the given day(s) in the week, regardless of when the shift started or ended. |
Some examples
Start of shift
In this example, the rule matches time for Saturday hours when the shift starts on a Saturday, and Sunday hours when the shift starts on a Sunday.
Our employee works night shifts starting on Friday, Saturday, and Sunday, and continue into the next day.
The employee is paid:
ordinary hours only for the shift commencing on a Friday
ordinary hours + Saturday hours for the shift commencing on a Saturday
(for the whole shift, including the time worked on Sunday morning)
ordinary hours + Sunday hours for the shift commencing on a Sunday
(for the whole shift, including the time worked on Monday morning)
End of shift
In this example, the rule matches time for Saturday hours when the shift ends on a Saturday, and Sunday hours when the shift ends on a Sunday.
Our employee works night shifts starting on Friday, Saturday, and Sunday, and continue into the next day.
The employee is paid:
ordinary hours + Saturday hours for the shift commencing on a Friday
(for the whole shift, including the time worked on Friday evening)
ordinary hours + Sunday hours for the shift commencing on a Saturday
(for the whole shift, including the time worked on Saturday evening)
ordinary hours only for the shift commencing on a Sunday
(because the shift finishes on a Monday)
Majority of shift
In this example, the rule matches time for Saturday hours when the majority of the shift falls on a Saturday, and Sunday hours when the majority of shift falls on a Sunday.
Our employee works night shifts starting on Friday, Saturday, and Sunday, and continue into the next day.
The employee is paid:
ordinary hours only for the shift commencing on a Friday
(the majority of shift hours are on Friday night)
ordinary hours + Saturday hours for the shift commencing on a Saturday
(the majority of shift hours are on Saturday night)
ordinary hours + Sunday hours for the shift commencing on a Sunday
(the majority of shift hours are on Sunday night)
Portion of shift
In this example, the rule matches time for Saturday hours for the portion of the shift falls on a Saturday, and Sunday hours for the portion of the shift that falls on a Sunday.
Our employee works night shifts starting on Friday, Saturday, and Sunday, and continue into the next day.
The employee is paid:
ordinary hours for the portion of the shift falling on Friday, and Saturday hours for the portion of the shift that falls on Saturday morning
ordinary hours + Saturday hours for the portion of the shift falling on Saturday evening, and Sunday hours for the portion of the shift that falls on Sunday morning
ordinary hours + Sunday hours for the portion of the shift falling on Sunday evening, and ordinary hours for the portion of the shift that falls on Monday morning
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 On specific days
Configure the Days of the week for this condition.
Configure the Match type
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.