Home      Ask a Question      My Stuff      Help   
  
TimeWorks Plus: Basic Accrual Script
Basic AccrueUpScript

if (reportingdate.date >= "2012-01-01") {     //this is how far back you want the accruals to start
     if (reportingdate.date = dateserial(reportingdate.year,1,1)) {     //this makes it accrue once a year
         if (employee.yearsofservice >= 5) {
             accrueup("PTO", 120, 120, "", dateserial(reportingdate.year,12,31));     //this accrues up 120 hours, with a limit of 120 hours that expires on 12/31 every year
         } else if (employee.yearsofservice >= 2) {
             accrueup("PTO", 80, 80, "", dateserial(reportingdate.year,12,31));
         } else if (employee.yearsofservice >= 0) {
             accrueup("PTO", 40, 40, "", dateserial(reportingdate.year,12,31));
         }
     }
}

Basic Carry Over Script:

if(reportingdate.date = dateserial(reportingdate.year,12,31) and getbalance("Vacation") > 40){
$subtract = getbalance("Vacation") - 40;
accruedown("Vacation", $subtract);
}

Basic AccrueUpScript using only the accrual factor:

if (reportingdate.date >= "2012-01-01") {     //this is how far back you want the accruals to start
    if(employee.home3 = "Accrue"){ //this gets only the employees that have the word Accrue in their home 3 field
          if (reportingdate.date == reportingdate.payperiodend) {     //this makes it accrue at the end of the pay period
              accrueup("PTO", employee.accrualfactor, (employee.accrualfactor * 26)); //accrues up the amount in the accrual factor field of employee setup with a limit of that factor times 26
          }
    }
}


Basic AccrueDownScript

if (category = "PTO" and reportingdate.date >= "2012-01-01") { //this makes sure its the right bucket
     $shortfall = AccrueDown(category, hours, 0); //this accrues down the hours, with a limit of 0
unpay($shortfall);
}
ID
780
Category
<Unassigned>
Date Created
11/15/2012 9:07:23 AM
Date Updated
3/17/2016 4:10:00 PM
Back to Search Results