Payroll: Accumulators

Shutterstock_551965846 (1).jpg

Introduction

In the previous chapter, we learned about the Payroll Scripts that allow diversification of payment calculation based on various conditions.

In this chapter, we will learn more about the Accumulators as a means of storing and re-using the calculated values.

Types of Accumulators

In APM there are 2 different types of accumulators: Temporary and Permanent

Permanent 

Temporary 

Accumulate the amounts within a certain dates range and pay them out to the employee or authority when the time is right.

e.g. Holiday Pay, Paid out Vacation, Accrued Bonus, etc.

They may also be used to get an overview of the yearly income in the payslip.

e.g. Basic Wages, Taxes, etc.

Accumulate the amounts, calculated in the current period only, or other values such as employer no/activity vessel/department/position code, etc., that can be then used for the calculation of other payments.

Temporary Accumulators

About

Temporary accumulators are used to store the calculated amounts or other values (employer no/activity vessel/department/position code etc.) and re-use them when needed. 

They transfer the values only within the current payroll period, not from period to period.

Here is an overview of all the temporary accumulators that we currently have in the system.

Accumulator Code

Purpose

W0-W30

Can only be used to transfer value within one payroll entry.
NOT from one entry to another entry.

W31-W99
W401- W499

Are used to transfer value between different payroll entries.
When the global option "Split Year to End Values by Employer", these W fields are based on Employer.

Setup and Configuration

Temporary accumulators are configured under the Payroll tab > Script Editor > Properties Pane.

The same is accessible from the Entry Code Maintenance > Calculation tab > Script Editor.

0f4dbec4-c08f-4024-8b2d-b347bf5d9962.gif

Under the Properties Pane, we can:

  1. Give a name to the temporary accumulator.

All the script packages share the same list of the temporary accumulators.

  1. View all the scripts where this accumulator is used.

 

Temporary: W0-W30

The temporary accumulators W0-W30 are used to transfer the values within one payroll entry.


Usage

Imagine that you have a formula in the script consisting of several elements.
e.g. three payscale rates combined: X1 + X2 + X3

And this formula should be re-used several times within the same script.

Then the script would most likely look like this:

However, what if it would be necessary to change the formula and remove/add some of the rates? 

With the above script, it would be necessary to apply the change to each line using this formula.

But doing so is rather time-consuming and may lead to human typos/errors.

Here’s where temporary accumulators W0-W30 come in handy. 

Temporary accumulators can be compared to empty fields that we can fill in with whatever data we need and later re-use it.

Let’s check how our previous example can be optimized with the help of a temporary accumulator.

Much better isn’t it? 

When using the accumulator we need to change the formula only in one place, and the rest will be updated automatically.

 

Temporary: W31-W99 and W401-W499

There may be cases when one entry code should be calculated based on the amount from some other transaction. e.g. the base amount for calculating the union fee or social security.

For this purpose, we have the temporary accumulators W31-W99 and W401-W499, that can accumulate and transfer values between different payroll entries.

When the global option "Split Year to End Values by Employer", these W fields are based on the Employer.


Usage

Imagine that we want to set up the Social Security (Employer part) entry that is calculated in the following way:

Basis * PayScale rate for social security (employer)

  • The PayScale rate for social security (employer) is stored in line 5 (X5).

  • The basis is the total amount from Basic Wages, Leave Pay, Compensation, Overtime, and other entries.

To make this condition work we first need to collect the basis amount. But how do we do that?

We can do it with the help of one temporary accumulator (W31-W99 and W401-W499).
In our example, we will use W39.

 

Step 1: Collecting the amount for the basis

In the script of each entry code calculating the basis we need to add a formula:

The formula should be placed at the very bottom of the script, after the line calculating the amount, since first we calculate the amount and only after adding it to the accumulator.

Step 2: Using the basis amount for the calculation of Social Security entry

After we added the conditions to all the entry codes calculating the basis, we can use this basis for the calculation of our Social Security (Employer part) entry by adding the following formula.

That’s it. Our Social Security (Employer part) entry code is up and running successfully.

Calculation priority

Please be careful. When transferring the amount from one entry to another the order of calculation is highly important. The transaction codes that make up the base amounts (or quantities) for the other transaction codes must be calculated first.

In our example, Basic Wages, Leave Pay, Compensation, and Overtime entries should all be calculated before the Social Security (Employer part).

The calculation priority is set under the Entry Code Details > Calculation tab.
The entry codes with the lowest priority are calculated first. The entry codes with the greatest priority are calculated last.

How to view temporary accumulator values

The temporary accumulators are re-calculated and saved every time a calculation takes place.

After the calculation, you can access the internal accumulators by going to the Payroll > Accumulators tab and clicking Temporary Accumulators in the Manage Menu.

In the new versions, the same is accessible under the Payroll > Entries tab.

Permanent Accumulators

About

In addition to the temporary accumulators that store values only within the current pay period, there are also permanent accumulators that accumulate and transfer values from period to period.

The purpose of the permanent accumulators is to collect the amounts within a certain date range and pay them out to the employee or authority when the time is right. (e.g. Holiday Pay, Paid out Vacation, Accrued Bonus). They may also be used to get an overview of the yearly income in the payslip.

Setup and configuration

Permanent accumulators are set up and configured under the Payroll > Entry Codes Maintenance > Accumulators.

In total, there are 100 permanent accumulators available in APM.

Some of them are reserved by the system and should not be used, others can be freely used for calculation purposes.

Definition

Under the Accumulators tab, it is possible to give a generic name to the permanent accumulator.

Text – the accumulator’s name.

Alternative Text – the alternative name of the accumulator (e.g. in another language).

Reset Period – outdated, not used.

Amount? Is used in Payslip By Vessel to determine if the Acc will be displayed on the Accumulators section or not.

In Pay. Curr. When it is ON, the permanent accumulator value will be stored in the payment currency. When OFF the value is in calculation currency.

 

 

 

Setup per entry code

Under the Entry Code Properties > Accumulators tab, we define the amounts to be included in the permanent accumulators for the selected entry.

Usually, we collect the values from the Calculated Amounts 1-11 (L61-L71)

Calculated amount 1 (L61) is the most frequently used one among them since only this amount is included in the total Net Wages.

To collect the amount, you need to add a formula of the following pattern under the Value for the selected accumulator: @field_code (e.g. @L61 or @L62, etc.)

How to use and preview permanent accumulators

Imagine that you want to get an overview of the person’s earnings within this year (Basic Wages etc.)

To do so, you would need to check all the Payslips that this person had during this year and sum up the total value.

This already seems difficult when it is only one person. But what if we take hundreds of them? This would seem like an overwhelming and unrealistic task.

Especially for such purposes, we have permanent accumulators that can accumulate and transfer values from period to period. Let's check together how to set it up.

Step 1

First, we need to give a name to our accumulator under the Entry Code Maintenance > Accumulators folder. Let’s call it Basic Wages.

Step 2

Then we need to set the amount to be included in this accumulator under the Entry Code Properties > Accumulator’s tab.

We will use @L61 (where L61 is the Calculated Amount 1).

Each month the value in this accumulator will be increased by the amount from the Basic Wage entry.

Step 3

All we need to do next is calculate the payroll for the crew and check if our value was added to the Accumulator.

Permanent Accumulators on Payslips

Standard Payslip

Ten first permanent accumulators are always displayed in the standard Payslip.

If you don't need the accumulator to be reflected in the Payslip, then set it after line 10.

Customized Payslip

When creating a customized Payslip report we can avoid the logic to display only the first 10 accumulators, instead, we can configure it to pick up only the accumulators selected under the Organization Properties > Reports > Payslip > Show Accumulator drop-down.

This feature also works with the standard payslip report "Laser layout by Employer".