TimeWorksPlus Knowledge Base

Accrue Down Scripts

Last Updated: Apr 07, 2016 02:29PM MDT

Withdraw from Multiple Accrual Categories if there is not Enough Available Balance

If a policy contains multiple accrual categories (or buckets) and the client allows for employees to use a second category (like Vacation) if they run out of a different category (like SIck), the AccrueDown script can be written to automatically deduct from the Vacation bucket if the employee has no available balance in their Sick bucket.

For example if employees accrued Sick and Vacation and the employee uses up all their accrued Sick and per policy they must use their Vacation, we can have the system do this automatically by adjusting the way the accrue down script works.

if(reportingdate.date >= "2014-01-02" and category = "Sick"){
   $shortfall = accruedown("Sick", hours, 0);
   $shortfall = accruedown("Vacation", $shortfall, 0);
   unpay($shortfall);
}


Broken down this means:
If it is the start or greater of your accruals policy, in this case 1/2/2014 and the category is "Sick":

if(reportingdate.date >= "2014-01-02" and category = "Sick"){

If they use accrued "Sick" hours accrue down the hours till it hits 0 (zero):

$shortfall = accruedown("Sick", hours, 0);

If it does hit 0 (zero) then start accruing down "Vacation" hours till it hits 0 (zero):

$shortfall = accruedown("Vacation", $shortfall, 0);

If "Vacation" hits 0 (zero) allow them to take time off as "unpaid" time off:

unpay($shortfall);
}

Allowing Employees to Carry a Negative Accrual Balance

Some employers allow employees to go into the negative with their accrued time. To allow for this you would enter in the negative number with quotations around it in your accrue down script. For example:

$shortfall = accruedown(category, hours, "-40");

The above allows an employee to go into the negative by 40 hours for a referenced accrue able category.

Here is another example of a completed script including the above "$shortfall" line:

if(reportingdate.date >= "2014-08-03" and category = "Vacation"){
  $shortfall = accruedown(category, hours, "-40");
  unpay($shortfall);


This states that if the current date is 8/30/2014 or greater allow "Vacation" to accrue down (when they take time off) to a negative 40 hours balance. After this all time will be unpaid.
  • Get More in Support Center

    Swipeclock partners can submit cases to technical support and view additional articles in Support Center.

    Your accountant login to TimeWorksPlus is required to access Support Center.
75a03bdcd095922b9b9f549098e014fe@swipeclock.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete