In this article in The Rules Series, we show how to configure the rules engine to combine conditions using Limit timesheets.
How Limit timesheets works
Overview
Limit timesheets allows you to combine a nested condition, and use a container (see https://support.roubler.com/hc/en-us/articles/4408467913113-How-to-Combine-conditions-Nested-conditions ) to limit the number of hours that are matched as a result of the condition.
Configuration options
Name | Description | Data Type | Example value |
---|---|---|---|
Limit hours | Determines the number of hours to limit each match to | Number | 4 |
Per | Determines how to limit the matches, either per day, per week, per timesheet, or per match | Single option | Day |
When | Nested condition that describes how to select matches before applying the limit | Conditions | (see example) |
Using per day using start of timesheet
and per week using start of timesheet
When using the per day using start of timesheet
and per week using start of timesheet
limit configuration, the start time of the timesheet (as opposed to the start time of the match) is used to determine whether matches exceed the daily or weekly threshold.
For example, using these options a match that started on Sunday morning, but is part of an overnight shift that started on a Saturday evening would count towards the daily limit for Saturday, as opposed to Sunday. A match recorded on Monday morning linked to a timesheet that started on Sunday evening would be linked to the previous week, if a new week started on Monday.
Using per day using start of group
and per week using start of group
When using the per day using start of group
and per week using start of group
limit configuration, the start time of the group (as opposed to the start time of the match) is used to determine whether matches exceed the daily or weekly threshold.
For example, using these options a match that started on Sunday morning, but is part of a group of timesheets, one on Saturday evening and a second timesheet on Sunday morning would count towards the daily limit for Saturday, as opposed to Sunday. This is because the first timesheet in the group started on Saturday, even though both the timesheet and the match are recorded on Sunday.
Similarly, using these options a match that started on Monday morning, but is part of a group of timesheets, one on Sunday evening and a second timesheet on Monday morning would count towards the weekly limit for the previous week (as opposed to the new week starting Monday). This is because the first timesheet in the group started on Sunday (the previous week), even though both the timesheet and the match are recorded on Monday (in a new calendar week).
An example:
In this example, we want to ensure that employees have an escalating scale of overtime. The first two hours of any overtime on any day will be paid at x1.5, the remainder on x2.0. In this example, all hours in excess of eight (8) hours in a day, or 38 hours in a week will be considered overtime. This example combines the following conditions and actions:
Identifying overtime
We are going to use the limits conditions to identify normal hours as being a maximum of 8 hours a day, up to 38 hours a week, provided the employee is working within their standard shift pattern
Paying overtime: we are going to pay overtime in two stages
use the limit condition to pay the first two hours of overtime on each day
use a combination of https://support.roubler.com/hc/en-us/articles/4408467842329-How-to-Configure-conditions-Timesheet-matches-an-above-rule and the categories to match the remaining overtime and pay that
all remaining hours will be paid as ordinary hours in this example
The employee works five shifts in the week, two of which will exceed eight (8) hours, and will work sufficient ordinary hours that the last two hours on Friday afternoon will exceed 38 hours in the week.
The condition for the ordinary hours looks complex, but it breaks down thus:
Any time worked outside of rostered hours is overtime
Any time worked in excess of 8 hours in a day is overtime
Any time worked in excess of 38 hours in a week is overtime
Overtime is paid:
x1.5 for the first 2 hours in any day
x2.0 thereafter
In our example, our employee is rostered for a 40 hour week as per their standard hours. They work a long shift in the middle of the week that qualifies for three hours overtime, two hours at 1.5 and an hour at 2.0. The final two hours of their last shift exceeds 38 hours in the week, so the employee also receives overtime for the last two hours of that shift.
Instructions
Create a Pay Rule and Pay Rule Version. (see: https://support.roubler.com/hc/en-us/articles/4408459205913-How-to-Create-a-new-Global-Pay-Rule , and https://support.roubler.com/hc/en-us/articles/4408459242009-How-to-Create-a-new-Global-Pay-Rule-Version for examples)
Navigate to edit the pay rule version, and expand the Rules
Configure a condition, select the Limit matches condition
Select the number of hours to limit matches to in the Limit hours field
Select how to limit matches in the Per field
Select the sub-condition to user in the When … condition field
Save your pay rule version.
Comments
0 comments
Please sign in to leave a comment.