Reference to variables from a previous Pay Slips
Reference to variables from a previous Pay Slips

Example:
We will create Earning Types from RD1 to RD9 and connect to past Pay Slips for an employee MOJCA POKRACULJA and Pay Slip 12-P00-000001 with:
- Pay Slip
- Interval
- Interval and Period
Variables that we are going to use:
- INV00 = gross
- DEL11 = net
- OSMND = basis of length of service bonus (MND)
Earning types that we are going to use:
- RDC - #PRZnesek# without MND
- RDP - #PRZnesek# with MND
- RD1 - #Del11-11-P00-000003#
- RD2 - #Del11--01#
- RD3 - #Del11--01O#
- RD4 - #Inv00-11-P00-000002#
- RD5 - #Inv00--02#
- RD6 - #Inv00--02O#
- RD7 - #OSMND-11-P00-000001#
- RD8 - #OSMND--03#
- RD9 - #OSMND--03O#
Pay Slip 11-P00-000001:

Pay Slip 11-P00-000002:

Pay Slip 11-P00-000003:

In Formula Builder in Variables | Program parameters we choose the variable Del11 (variable for net salary), that in the tab Parameters shows:
1. Filed Pay Slip and button Use in Formula

In the filed Pay Slip, we choose a previous Pay Slip, which in our case is 11-P00-000003, but for each Earning types, we will refer to different one. We press the button
, so that variable (Del11) and the number of Pay Slip are written in the window above for the Formula. Formula we can also check by pressing the button
, so that the variables are showed in the tab Test:

2. Checked and Filed Interval and button Use in Formula

In the filed Interval we select how many previous Pay Slips we want to use the data, which in our case is 01, but for each Earning types, we will refer to different one. We press the button
, so that variable (Del11) and the number of Interval is written in the window above for the Formula. Formula we can also check by pressing button
, so that the variables are showed in the tab Test:

3. Checked and Filed Interval and Period, button Use in Formula

In the filed Interval we select and put the checker for Period, that shows us how many previous periods we want to use the data, which in our case is 01, but for each Earning types, we will refer to different one. We press the button
, so that variable (Del11) and the number of Interval and the letter O is written in the window above for Formula. Formula we can also check by pressing the button
, so that the variables are showed in the tab Test:

We create a new Pay Slip 12-P00-000001, where we will calculate different Earning types from RD1 to RD9:

In the tab Pay Slip we can check, if the calculation of the variables from the previous Pay Slips were correct:
