Authorize Rule

Note: With the 5.0.5.0 release, an enhanced version of this rule, the Unauthorize Rule, was introduced. We recommend that you review the enhanced rule before configuring the Authorize Rule. See Unauthorize Rule.

Class Name

com.workbrain.app.ta.quickrules.Authorize

Overview

For efficiency, supervisors who review or edit the timesheets should only need to do so on an exception basis. Supervisors should view only those records where the application has determined that certain conditions have been met that require their intervention. An example of this is overtime.

Most organizations prefer to minimize the amount of overtime that is paid to employees and would prefer to not pay overtime without first having a supervisor examine the time records to validate that the employee is entitled to be paid overtime. With the appropriate authorization rules in place, the supervisor is required to review a minimal number of records, while still being able to monitor their employees' time effectively.

By default, all timesheets are authorized. The Authorize Rule lets you determine what conditions will unauthorize timesheets. These different conditions are the rule’s parameters. Each parameter has an associated reason that is displayed in the Message column of the timesheet.

Parameters

Parameter Description
Unauthorize Based on Time Code Hour Type Settings This parameter determines whether time code and hour type authorization settings are enforced on work detail records. When selected, the rule unauthorizes any work summary records that contain time codes or hour types that are configured with the Unauthorize check box selected.

See Payroll settings.

If Unauthorize Work Details is active, then this parameter is not available. See Parameters - Unauthorizing Details.

ReasonCode = TimeCodeHourTypeUnauthorize

Unauthorize Based on Premium Time Code Hour Type Settings Similar to the Unauthorize Based on Time Code Hour Type Settings parameter, this parameter determines whether time code and hour type authorization settings are enforced on work premium records.

If Unauthorize Work Details is active, then this parameter is not available. See Parameters - Unauthorizing Details.

ReasonCode = TimeCodeHourTypeUnauthorize

Use Clock Based Authorizations Turns on or off the clock-based auto-authorizations. (The Unauthorize If Clock Ons Not Equal Offs, Unauthorize Clock Count List, Unauthorize Last Clock Type Not in List, and Unauthorize Time Code Data List parameters are only effective if this parameter is turned on.) When turned on, the application can unauthorize records based on whether the employee forgot to punch in or out, etc.
Unauthorize If Clock Ons Not Equal Offs When selected, the rule unauthorizes records when the number of ON clock punches is not equal to the number of OFF clock punches. Specifically, the rule compares clock types 01 and 02.

ReasonCode = ClockOnsNotEqualToOffs

Unauthorize If Clocks Out Of Sequence When selected, the rule unauthorizes records when the clock punches are not in an appropriate order. For example, if the first clock punch is OFF, followed by an ON clock punch, the rule unauthorizes the record.

ReasonCode = ClockOutOfSequence.

Unauthorize Clock Count List This parameter specifies the number of clock punches on a day for which the rule checks. The rule unauthorizes any records with the specified number of clock punches.

Specify any whole, positive number, or a comma-separated list of numbers.

If you specify a list of numbers, the rule unauthorizes records with the number of clock punches equal to one of the numbers in the list.

You must specify a value greater than 0. Since clock counting checks are not performed unless there is at least one clock for the day, setting this parameter to 0 nullifies the rule.

ReasonCode = ClockCount

Unauthorize Last Clock Type Not In List This parameter specifies the clock types for which the rule checks. The rule unauthorizes any records if the last clock punch has a clock type equal to one of the specified clock types.

Specify any clock type, or a comma-separated list of clock types.

ReasonCode = LastClockType

Unauthorize If During Scheduled Time Codes List Will unauthorize the work summary if any work detail that falls within the day's scheduled time has a time code that is displayed in this list.

ReasonCode = DuringScheduledTimeCodesList

Unauthorize If During Unscheduled Time Codes List Will unauthorize the work summary if any work detail that falls within the day's unscheduled time has a time code that is displayed in this list.

ReasonCode = DuringUnscheduledTimeCodesList

Unauthorize If Edit After Authorization When a clock or another user edits the record, the existing authorization should be removed.

If Unauthorize Work Details is active, then this parameter will be displayed further down the screen. See Parameters - Unauthorizing Details.

ReasonCode = EditAfterAuthorization

Unauthorize Time Code Data List This field can have a comma-delimited list of these clock data attributes:
  • TCODE: Time code change
  • DKT: Docket change
  • DPT: Department change
  • JOB : Job change
  • PRJ: Project change

If any of the clocks (whether they come from readers, ETM, or overrides) contain one of the clock data tokens in the string, the day will be unauthorized.

For example, assume Unauthorize Time Code Data List = TCODE, JOB and clocks for an employee have these values:

10:30 ON JOB=XXXX

Cgr

12:00 OFF

13:00 ON

PRJ=YYY

18:00 OFF

The day will be unauthorized because the 10:30 clock contains JOB data.

ReasonCode = ClockDataString

Unauthorize Time Code Minute String Will unauthorize the work summary if the expression, based on time codes and minutes, evaluates to TRUE.

Syntax is as follows, where logicalOperator is either | for OR or & for AND:

timecode1 operator1 
mins1 [logicalOperator1 
timecode2 operator2 
mins2 ...]

For example, BRK<10|MEAL>30 will unauthorize if the day contains a BRK code that is less than 10 minutes or a MEAL code that is more than 30 minutes.

WRK,TRN>600 will unauthorize if the day contains the sum of WRK and TRN codes that total more than 600 minutes.

ReasonCode = TimeCodeMinuteString

Unauthorizing Balances When Below Minimum If any of the balances in a given list goes below the related minimum value, the record is unauthorized.

ReasonCode = BalanceBelowMinimum

Unauthorizing Balances When Above Maximum If any of the balances in a given list goes above the related maximum value, the record is unauthorized.

ReasonCode = BalanceAboveMaximum

Parameters - Unauthorizing Details

If the /system/approval_settings/USE_WORK_DETAIL_APPROVAL registry parameter is set to true, the application unauthorizes specific rules (Work Summary unauthorization) automatically. In that case, you must also specify these parameters in addition to the preceding parameters.

Parameter Description
Unauthorize Based On Time Code Settings Selecting this check box will unauthorize work details that reference a time code with TCODE_UNAUTHORIZE = 'Y'.
Unauthorize Based On Hour Type Settings Selecting this check box will unauthorize work details that reference an hour type with HTYPE_UNAUTHORIZE = 'Y'.
Unauthorize Based On Department Settings Selecting this check box will unauthorize work details that reference a department with DEPT_UNAUTH = 'Y'.
Unauthorize Based On Project Settings Selecting this check box will unauthorize work details that reference a project with PROJ_UNAUTH = 'Y'.
Unauthorize Based On Job Settings Selecting this check box will unauthorize work details that reference a job with JOB_UNAUTH = 'Y'.
Unauthorize Based On Docket Settings Selecting this check box will unauthorize work details that reference a docket with DOCK_UNAUTH = 'Y'.
Unauthorize If Edit After Authorization If selected, when edits are made to the record either manually or with a clock entry, the application will remove the existing authorization. When unauthorizing post-edits, the application will use these criteria:
  • Each detail will be considered separately.
  • Details that are already unauthorized will be ignored.
  • Only overrides that overlap the detail will be considered. An override overlaps a detail if the specified time range of the override overlaps the range of the detail.
    • If the override start and end times are specified, then the override overlaps the detail if the detail ends strictly after the start time or if the detail starts strictly before the end time.
    • If only the override start time is specified, then the override overlaps the detail if the detail ends strictly after the start time.
    • If only the override end time is specified, then the override overlaps the detail if the detail starts strictly before the end time.
    • If neither override times are specified, then the override overlaps the detail.
  • If the overlapping override is a CANCEL or CANCELLED override, then the application will unauthorize the detail if all of these conditions are true:
    • The override was created before the authorization date of the detail.
    • The override was cancelled after the authorization date of the detail.
    • The override was not cancelled by the user who authorized the detail.
  • If the overlapping override is any other type of override, then the application will unauthorize the detail if all of these conditions are true:
    • The override was created after the authorization date of the detail.
    • The override was not created by the user who authorized the detail.
    • The override is not an authorizing override.
  • If a detail is unauthorized and the Apply To Premiums parameter is turned on (check box is selected), then all of the associated premium records also become unauthorized.
Apply To Premiums If selected, the unauthorizations, controlled by the work detail level authorization settings, apply to work premiums as well as work details.
Maintain Full User Approvals If selected, the application saves the user that authorized any work details, and when they authorized the details that are created or deleted during the process of recalculation. In addition, any work details that are outside of the specified time frame inherit the authorization date of the most recent user who approved the current work details.