Time clock systems by TimeIPS
Call Now! 316-264-1600
Information
Sales
Support
Knowledge Base Search:  
Main Menu
· Home

· Table of Contents
· Article Index

· Downloads
· New Features
· FAQ
· News
· Web Links

  
TimeIPS Knowledge Base

Table of Contents: Article IndexPrintable Version

Applies to versions: 2.5, 3.0, 3.1, 3.2



Advanced Modifications and Accruals using Expressions



Accruals and Modifications can be configured to calculate with an expression for special rules not covered by the built-in settings and options.

Accruals

The accrual expression should return the amount of the accrual in hours.

The following variables are available to the expression when calculating the accrual amount:

  • usersID - The ID of the user benefit accruals are being calculated for
  • benefitTypeID - The ID of the benefit type being calculated
  • begTimestamp - The timestamp of the beginning of the accrual range
  • endTimestamp - The timestamp of the end of the accrual range
  • workedhours - The number of hours worked between the start and end of the accrual. Includes benefits/holidays that count toward accruals
  • accrualStartDate - The timestamp of the most recent (prior to the end of the accrual range) benefit start date set under the employee's pay history. 
  • accrualAnniversary - The timestamp of the anniversary of the most recent (prior to the end of the accrual range) benefit start date set under the employee's pay history.
  • intervalCode - The interval type, i.e. one of the following: week, month, year, semimonth, quarter, never, day
  • intervalCount - The number of interval. Usually 1, but for accruals that happen periodically, the number of the period.  i.e. For accruals every two weeks: 2. For accruals every 10 days: 10. For accruals every 4 months: 4, etc.

Example 1:

An accrual policy grants 50 hours a year on Jan 1st each year.  And, for employees who where hired between Jan and June, an additional 8 hours is granted on Jul 1st.

  • This is a special rule because the amount accrued on Jul 1st is different than on Jan 1st and depends on the hire date of the employee.
  • To accommodate this, accruals would be set to run twice a year
  • The accrual amount would be set to Expression
  • The expression would be
    =if(utcdate("m",[begTimestamp])=1,50, /* this gives 50 hours if it is the Jan accrual */
    if(substr(employeeInfo([usersID], 'payrollSyncStartDate'),6,2)<7,8,0)) /* this looks at the month of the start date and, if it's less than 7 (Jan->Jun) then give 8 hours, otherwise none */

Example 2:

An accrual policy grants employees .025 hour of vacation per hour worked (i.e. 1 hour for 40 hours), but the total amount for the calendar year, starting Jan 1st, is limited to 32 hours earned (no limit on how much is available).

  • This is a special rule because the amount accrued has an earnings limit for the year.
  • To accommodate this, accruals could be set to run every day, week, month, etc.
  • The accrual amount would be set to Expression:
  • ==hourlimit=32
    ==rate=.025
    ==earned=[workedhours]*[rate]
    ==startofyear=strtoutctime(utcdate("Y",[endTimestamp])."-01-01 12:00:00 AM")
    ==maxearned=[hourlimit]-(getBenefitAccrued([usersID], [startofyear], [endTimestamp], 'vacation')/3600)
    =if([earned]>[maxearned],[maxearned],[earned])

Example 3:

An accrual policy grants employees 16 hours of vacation per month worked, but limited to 80 hours per year every year from their hire date anniversary.

  • This is a special rule because the amount accrued has an earnings limit for the year, and the year is different for each employee.
  • To accommodate this, accruals could be set to run every month with an expression:
  • ==hourlimit=80
    ==rate=16
    ==alreadyAccruedThisYear=(getBenefitAccrued([usersID], [accrualAnniversary], [endTimestamp], 'vacation')/3600)
    =if([workedhours]>0 && [alreadyAccruedThisYear]<[hourlimit],[rate],0)

Modifications

The following variables are available to the expression when calculating the modification amount:

  • usersID - The ID of the user benefit accruals are being calculated for
  • benefitTypeID - The ID of the benefit type being calculated
  • begTimestamp - The timestamp of the beginning of the accrual range
  • endTimestamp - The timestamp of the end of the accrual range
  • workedhours - The number of hours worked between the start and end of the accrual. Includes benefits/holidays that count toward accruals


©2004-2023 TimeIPS, Inc. All Rights Reserved - TimeIPS and the TimeIPS logo are registered trademarks of TimeIPS, Inc.
"Intelligent Personnel System" "Run your Business. We'll watch the clock." are trademarks of TimeIPS, Inc.
TimeIPS is protected by one or more patents. Patent No. US 7,114.684 B2.