Scripting Categories - Doing Monthly Contributions

Clarity Provides the ability that you can define scripted payroll categories. These categories can be used to managed or calculate the values of the units, rate, amount, gross or taxable fields for any of the categories.

 

Some examples or usages of Scripted categories are to manage/maintain a Monthly contribution. This is especially helpful when you have weekly or biweekly payrolls and you want the deduction to happen only once at the start of the month.

The following example does exactly this, it takes the default amount from the employees master paycard and then checks if the contribution has been made for that month, based on the Pay dates of the current paycard and the historical record.

 

If ANY amount has been done for the month the amount for this pay would be zero, if nothing is done the amount is the full amount.

monthlyAmount= MasterPaycard.DefaultAmount("402")
monthsAmount = PaycardHistory.MonthlyAmountPayDate("402",DatePart("m",Paycard.PayDate))
If monthsAmount > 0 Then Item.Amount = 0
Else Item.Amount = monthlyAmount
End If
monthlyAmount = MasterPaycard.DefaultAmount("402")
monthsAmount = PaycardHistory.MonthlyAmountPayDate("402",DatePart("m",Paycard.PayDate))

If monthsAmount > 0 Then
Item.Amount = 0
Else
Item.Amount = monthlyAmount
End If

 

This simple script can be expanded upon, it can be used to distribute the calculations over multiple pays per month. The amount can be set instead of loaded from the master paycard. The master paycard can be used to define an "overriding" value or even used for a "if greater than" condition check. partial amounts can also be done and added so that if the employee doesn't have enough gross income after taxes that it only deducts what it can or not at all.  Even monthly catch-ups can be handled here (ie: the employee missed Januarys payments so do it in February etc.)

 

Additional complex options included the ability to look at when the employee WORKED instead of when Paid, this can be done by using the job costing data. Therefore a payroll that ends and is paid in a given month may not have any worked hours in that month and therefore may not be due for the category in question, etc.

For more complex calculations a Paymate Support Technician can be scheduled to assist in it's implementation. This is billable time as proper investigation into how and any exceptions MUST be done before it is written.

 

Be the first to review this article