跳至主要內容
Administrator Guide
上次更新時間 :2023-06-23
Example: Calculate Location-Based Overtime

Example: Calculate Location-Based Overtime

In this example, nonresidents working in XYZ State, USA are eligible for XYZ State double time. Workers in XYZ State are paid double time after 12 hours of work in a day, whether they're residents of the state or not. This example shows you how to combine calculated fields and time calculations to accommodate this requirement.
  1. Access the
    Create Calculated Field
    task to create calculated fields that build on each other. You'll use the final calculated field in this step in the time block conditional calculation.
    1. Create a calculated field that returns a worker's default state.
      Field
      Value
      Field Name
      Worker's Default State for a Time Block
      Business Object
      Time Block
      Function
      Lookup Related Value
      Lookup Field
      Worker
      Return Value
      Primary Address - State/Province
    2. Create a calculated field that returns a worker's default state as of the time block date.
      Field
      Value
      Field Name
      Worker's Default State for a Time Block as of Time Block Date
      Business Object
      Time Block
      Function
      Lookup Value as of Date
      Source Field
      Worker's Default State for a Time Block
      Effective Date
      Calculated Date
    3. Create a calculated field that returns the state for the time block if a worker overrides the default state for the time block.
      Field
      Value
      Field Name
      Override State for a Time Block
      Business Object
      Time Block
      Function
      Lookup Related Value
      Lookup Field
      Location
      Return Value
      Primary Address - State/Province
    4. Create a calculated field that returns true if a worker's default location is in XYZ State or if a worker specifies the location for the time block as XYZ State.
      Field
      Value
      Field Name
      Time Block Worked in XYZ State
      Business Object
      Time Block
      Function
      True/False Condition
      Create the true/false condition:
      And/Or
      (
      Field
      Operator
      Comparison Type
      Comparison Value
      )
      And
      (
      Override State for a Time Block
      is blank
      And
      Worker's Default State for a Time Block as of Time Block Date
      equal to
      Value specified in this filter
      XYZ State
      )
      Or
      Override State for a Time Block
      equal to
      Value specified in this filter
      XYZ State
  2. Create a time block conditional calculation using the calculated field
    Time Block Worked in XYZ State
    that you defined in the previous step. This calculation tags all time blocks worked in XYZ State with an
    XYZ State
    calculation tag.
    1. Access the
      Create Time Calculation
      task.
    2. For the
      Calculation Type
      , select
      Time Block Conditional Calculation
      .
    3. Specify the
      Criteria
      :
      Field
      Value
      Time Block Conditions
      Time Block Worked in XYZ State
    4. Define the
      Results
      :
      Field
      Value
      Add Tags
      XYZ State
    5. On the
      Groups
      tab, specify time calculation groups so that all workers are eligible for this calculation, not just XYZ State residents.
    6. Access the
      Maintain Time Calculation Priorities
      task to assign this calculation a priority.
  3. Create an overtime calculation that calculates double time if a worker works more than 12 hours in a day, for both XYZ State residents and nonresidents who worked in XYZ State.
    1. Access the
      Create Time Calculation
      task.
    2. For the
      Calculation Type
      , select
      Standard Overtime Calculation
      .
    3. Specify the
      Criteria
      :
      Field
      Value
      Period
      Daily
      Replace Hours Greater than (value)
      12
      Time Calculation Tags
      XYZ State
    4. Define the
      Results
      :
      Field
      Value
      Add Tags
      Double Time
      Remove Tags
      Regular
    5. On the
      Groups
      tab, specify time calculation groups so that all workers are eligible for this calculation, not just XYZ State residents.
    6. Access the
      Maintain Time Calculation Priorities
      task to assign this calculation a priority so that it executes after the time block conditional calculation defined in Step 2.
When nonresidents work in XYZ State, they must specify which time blocks they worked in XYZ State so that Workday includes the time blocks in the double time calculations.