Formulas

This record enables the formulas maintenance that are used in the Calculation Scripts.

Formula is a group of expressions containing functions, file fields, mnemonics, constants and calls from other formulas.

This record enables the assembly of specific calculations to meed collective agreements and other particularities of the company or category.

The result of a formula will always be stored in a mnemonic previously registered in the Mnemonics Register.

Formulas listed in this record are classified according to their caption, which define if the formula is created by the user or if it is a System formula.

TOTVS submits formulas to all clients that allow to calculate a Payroll with no need to create other formulas, once they meet to the effective law of each country and, this way, it cannot be edited, it is called System formulas.

With the need to alter system formulas for any reason, TOTVS makes changes and sends them to update data base.

Important:

When opening the routine, the system checks the need to update or group some system formula. If there is any, the updating process starts.
After the checking, a list with all existing formulas in the system (system and user) is displayed.
The system formulas are only for viewing. When trying to access or delete them, a warning message is displayed and only the formula for query returns.

To include formulas in this record, you must know several necessary stages and concepts in the development and creation of formulas.

Procedures

To add user formulas:

1. In Formulas, select the option Add.

To edit user formulas, find the formula to be edited and select the option Edit.

2. The system displays the screen to register formula data divided into two folders:
Definitions
Assembly
3. Complete data according to fieldhelp instructions.
4. Check information and confirm it.

Definitions folder

In this folder, data that define and identify a formula must be entered, giving it a name. The main fields are:

Code: Enter the code identifying the formula, using letters and/or numbers.
Description: Enter the formula description, its main functionality. The more objective the description, the easier the understanding and location.
Return: Select a result for the formula, generally mnemonic. This information is optional.
Formula Note: Describe additional information, as formula details, suggestion of examples etc.

Assembly folder

In this folder you must effectively build the formula structure. The formula structure is displayed in two distinct areas:

a) The area on the left, highlights the items added in the formula structure, for view.

In this area each row is identified, according to formula items, as follows:

- Formula description – will always be the first item, according to entered on the Definitions Folder, it can also be used as a message item (explain note).
- Condition item.
- Connection item (repetition).
- Execution item.

 

So, as items receive maintenance, this structure is also updated and modified, enabling the following resources:

- Include a message on the formula [F12].
- Include a Condition on the formula [F5].
- Include a Connection [F7].
- Include an Exception [F6].
Edit formula [F8] – allows to edit an item already existent.
Search – allows to search items on the structure, entering the query sequence.
Copy – allows to copy a specific item of the structure. When copying an item, its sub-items will also be copied. When an item is copied, its subtitle is changed to .

 

To cancel this option, only through the pop-up window is possible to Cancel Copy, option Copy -> Unmark.

Paste – allows to past a copied or cut item.
Available also on the pop-up window, options Paste Copy and Paste Cut.
Cut – allows to cut a specific item of the structure. When cutting an item, its sub-items will also be cut. When an item is cut, its subtitle is changed to .

 

To cancel this option, only through the pop-up window is possible to Cancel Cut, option Cut -> Unmark.

Delete the formula current sequence - allows to delete a specific item of the structure. When cutting an item, its sub-items will also be deleted.

 

Such resources can be activated through the pop-up window, displayed by right-clicking the highlighted area of the formula, when positioned.

The structure items are displayed in the concatenated, following the method these items were added.

When adding an item (condition, connection, execution), the system asks the level it must be created, if:

New item – the system creates a new item on the same level of the item in which is placed.
Sub-item – the system creates a new item in the level below the item in which it is placed.

 

For both, the item addition is below the item in which it is placed, after the sub-items.

 

b) On the right, a description of each item of the formula is displayed. Due to these formula areas that items receive maintenance, considering structure definitions.

Completion of fields according to the formula item type:

Message items ():
o Description: enter the message description that will be displayed on the formula.
o Result: in this case the result must be equal to the message description.

 

Condition items ():
o Description: enter the condition description that will be displayed on the formula.
o 1st Expression: enter the condition that must be met to perform an execution.

 

Execution items ():
o Description: enter the execution description that will be on the formula.
o Result: define what will be executed by the formula, in this case it can be included a user function or a function that exists on the standard product.

 

Connection Items ():
o Description: enter the condition description that will be displayed by repetition.
o 1st Expression: enter the condition that will be executed while its content is true.

 

For completion of the field Operator 3, the following options are available:

.END.: When the condition, execution or connection end on the formula item that is being added/edited. In this case, a new item on the same level of the item recently added cannot be included, only in a sub-item in case of condition of connection.
.CNT.: When some other condition or execution is performed after the formula item that is being added/edited.

 

Important:

For a better view of the formula is suggested that the completion of field Description:

Is equal to field Result, when the formula item is Message or Execution.
Is equal to field 1st Expression, when the formula item is Condition or Connection.

To confirm the edit/addition of each formula item, you need to select the option located on the upper right side of the screen.

To cancel the edit/addition of each formula item, you need to select the option located on the upper right side of the screen.

Pop-up Options

Pop-up options displayed correspond to the available resources, being:

1 – = Add a Condition on formula [F5].

3 – = Add an Execution [F6].

3 – = Add a Connection [F7].

4 – Edit Formula [F8]

5 – Search

6 – Cut/Mark

7 – Copy/Mark

8 – Paste Copy/Paste Cut

9 – Delete

10 – Copy/Unmark

11 – Cut/Unmark

Formula Examples

a) Formulas only with execution items:

b) Formulas with execution items and condition items:

 

c) Formulas with execution items, condition items and connection items (repetition):

 

Specific Knowledge

1. Specific Formulas

Length of Service Bonus

Formula S_INICADTS: Data for calculation of ATS – Length of Service Bonus are initialized according to employee Union.
Formula S_CALCADTS: Responsible for the calculation of all Length of Service Bonuses the employee has for Vacation and Year End Bonus, saving them in a single payroll item. This formula is run in Vacation and Year End Bonus scripts.
Formula S_CALCADTV: Responsible for the calculation of all Length of Service Bonuses the employee has on salary plus payroll items set with S for Length of Service Bonus in Payroll Items Register calculated in aPd{}, saving them in a single payroll item. This formula is run in Vacation and Year End Bonus scripts.
Formula S_CALCANU: Responsible for the calculation of the One-Year Bonus in the Payroll, Advance and Termination. In the advance, the bonus value is calculated in own formula, but its payment is performed with the Advance as it is today. Remember the calculation is performed if mnemonic lSomaInc is set as .T. (the system standard is .F.).
Formula S_CALCBIE: Responsible for the calculation of bonus by Two-Year Period. In the advance, the bonus value is calculated in own formula, but its payment is performed with the Advance as it is today. Remember the calculation is performed if mnemonic lSomaInc is set as .T. (the system standard is .F.).
Formula S_CALTRIE: Responsible for the calculation of bonus by Three-Year Period. In the advance, the bonus value is calculated in own formula, but its payment is performed with the Advance as it is today. Remember the calculation is performed if mnemonic lSomaInc is set as .T. (the system standard is .F.
Formula S_CALCANUV: Responsible for the calculation of the Two-Year Period on salary plus calculated payroll items in aPd{}, in the advance script that is S for Bonus. Serv. Tp.
Formula S_CALTRIEV: Responsible for the calculation of the Three-Year Period on salary plus calculated payroll items in aPd{}, in the advance script that is S for Length Serv. Bonus
Formula S_CALCANUV: Responsible for the calculation of the Four-Year Period on salary plus calculated payroll items in aPd{}, in the advance script that is S for Length Serv. Bonus
Formula S_CALTRIEV: Responsible for the calculation of the Five-Year Period on salary plus calculated payroll items in aPd{}, in the advance script that is S for Length Serv. Bonus

 

Position of Trust

Formula S_CALACONF: Responsible for the calculation of bonus due to Position of Trust.
Formula S_CALADTRF: Responsible for the calculation of bonus by Transfer.

 

Hazardousness Calculation

Formula S_CALCPERI: Responsible for the calculation Hazardousness bonus.
Formula S_CALCPERV: Responsible for the calculation of Hazardousness bonus on Payroll items.

 

Insalubrity Calculation

Formula S_VAL_BINS: Insalubrity Calculation Basis.
Formula S_CAINSMI: Responsible for the calculation of the Minimum Insalubrity.
Formula S_CAINSME: Responsible for the calculation of the Average Insalubrity.
Formula S_CAINSMA: Responsible for the calculation of Maximum Insalubrity.
Formula S_CAINSAL: Responsible for the calculation of the Insalubrity. This formula must be executed for insalubrity calculation where a single payroll item is used for record, and there is no difference among minimum, average and maximum, as Year End Bonus and Vacation.
Formula S_CAINSALV: Responsible for the calculation of Insalubrity on salary plus payroll items set as S for insalubrity for all calculation routes. Its run is always performed after payroll items value.

 

Automatic calculation of Meal Allowance/Food Voucher

Formula S_CRGAUTOM: Responsible for load of single registers.

 

2. Multiple Relationships

Define with multiple relationships the employees or freelances with two or more labor contracts. The activity branches of main users of this concept are education entities and radio stations.

The formula for calculation of multiple relationships S_MULTIV() is available in all calculation routes, however it needs to be enabled so that the calculation is performed on routes, according to the user needs.

 

Operators for usage in Formulas

There are different operators that can be used in Model 2, which will be mentioned here:

Operator

Description

DIAS_HAB_PROG

Working days of a payroll items date range that is in use;

DIAS_HABILES

Working days of a determined date range;

DIVIDE

Division math operation;

LABEL

It is used for the creation of a label;

EXPONENT

It elevates the creation of a determined number.

FILTRO_ACUM

Accrual Filter;

FILTRO_MOVLI

Period Transaction Filter;

GET_MONEDA

Searches the currency convector factor;

GRABA

Saves inf. in the Tables. SRA,SRK,RG4,RCP,RG1,SRD e SRF;

HASTA_IGUAL

Performs the comparison until the field value is = à;

HASTA_MAYOR

Performs the comparison until the field value is = a;

HASTA_MAYORIGUAL

Performs the comparison until the field value is >= a 2aE;

HASTA_MENOR

Performs the comparison until the field value is < a;

HASTA_MENORIGUAL

Performs the comparison until the field value is >= a 2aE;

HORAS_HABILES

Working hours of a determined date range;

IE_TOTAL_CON

Totalizes the Payroll Item Value of the employees that is calculated based on the indicated criterion;

IE_TOTAL_EMP

Totalizes the Employee Number that is in accordance with the indicated Criterion;

IMPORTE_EMPRESA

It sums in values the accrual table payroll items;

IMPORTE_TOTAL

It sums the values the accrual table payroll items;

LEE_DEP

Returns the dependants records;

LEE_TRAY

Returns the work history Records in a date range;

MONTH

Returns a determined date month;

MUEVE

Attributes a values for a determined variable;

MULTIPLICA

Multiplication math operation;

PAGA_DIA_DER

Returns the number of payable entitled days;

PRIMER_REG_DEP

Reads the first record of dependants;

PRIMER_REG_TRAY

Reads the first record of work history;

REDONDEA

Rounds up the decimal houses;

RESIDUE

Residue of a division operation;

RESTA

Subtraction math operation;

SALTA

Places the cursor of the calculation script proc, to the sequence;

SI_DIFERENTE

Checks whether two values are different;

SI_IGUAL

Compares two values;

SI_MAYOR

Compares whether the first value content is greater than s;

SI_MENOR

Compares whether the first value content is smaller than s;

SIG_DEP

Advances until the dependant next record;

SIG_TRAY

Advances until the work history next record;

STRTOVAL

Converts a string in value;

SUMA

Addition math operation;

SUMA_DIAS

Sums the incidence days of the same payroll item to the Records;

SUMA_IMPHIS

Sums the values of the calculated payroll items in the indicated process;

SUMA_IMPORTES

Sums all values of the calculated payroll item;

SUMA_MOVLI

Sums of the generated Payroll Items in the month transactions;

SUMA_UNIDADES

Sums all units of the calculated payroll item;

SUMA_UNIHIS

Sums the units of the calculated payroll items in the indicated process;

TIPO_DIA

Returns the type of date entered - S-Worked, C-Clear;

TRACE_OFF

Disable the debug process in the formulas;

TRACE_ON

Activates the debug process in the formulas;

TRUNCATE

Truncates the indicated value;

ULTIMO_REG_DEP

Reads the last record of dependants;

ULTIMO_REG_TRAY

Reads the last record of work history;

UNIDADES_EMPRESA

It sums in units the accrual table payroll items;

UNIDADES_TOTAL

It sums the units the accrual table payroll items;

VALTOSTR

Converts the value in string.

Arithmetic Operators

OPERAND 1

OPERATOR

OPERAND 2

RESULT

F, N

SUM

N

F, N

Operator SUM has to ways to operate. Sum of numbers and dates. For the second case, the days can be summed up to a date, resulting a date.

Operand 1

Operator

Operand 2

Result

SALDIA

SUM        

COMMISSION

NAUX_01

F, N

RESTA

F, N

N

Operator SUBTRACTION manipulates the decrease of numbers and dates. For the second case, the dates subtraction is in the number of days between the two dates.

Operand 1

Operator

Operand 2

Result

AÑOFINPER

SUBTRACTION        

10000

NAUX_01

N

MULTIPLICA

N

N

Operator MULTIPLY can only be used with numbers.

Operand 1

Operator

Operand 2

Result

SALDIA

MULTIPLICA

DIASPERIOD

NAUX_01

N

DIVIDE

N

N

Operator DIVISION can only be used with numbers. If there is a division with 0, in the calculation log, there will be a mistake.

Operand 1

Operator

Operand 2

Result

SALDIA

DIVIDE

8

SALHORA

{decimals}

TRUNCATE

N

N

Operator TRUNCATE has to ways to operate. If the decimals are not placed in the OPERAND1, the decimals truncate. If the decimals are placed in the OPERAND1, the number of decimals indicated are truncated.

Example:

Operand 1

Operator

Operand 2

Result

Evaluación

1

TRUNCATE

125.475617

Result

= 125.40

2

TRUNCATE

125.475617

Result

= 125.47

0

TRUNCATE

125.475617

Result

= 125.00

 

TRUNCATE

125.475617

Result

= 125.00

N

RESIDUE

N

N

Operator RESIDUE performs the full division and reports the residue of this division.

Example:

Normal Division: 5/2 = 2.5        Full Division: 5/2 = 2 RESIDUE 1.

Operand 1

Operator

Operand 2

Result

PERIOD

RESIDUE

2

NAUX_01

{decimals}

ROUNDING

N

N

Operator ROUNDING, when the decimals are not placed, it rounds two decimals up, according to the currency procedure (to hundredth, 1 and 2 decrease to 0; 3 and 4 increase to 5; 6 and 7 decrease to 5; 8 and 9 increase to 0). If the decimals are placed in OPERAND1, it arithmetically rounds up (if it is smaller than 5, it decreases; if it is higher than 5, it increases).

Example:

Operand 1

Operator

Operand 2

Result

Evaluación

2

ROUNDING

125.475617

Result

= 125.48

 

ROUNDING

125.475617

Result

= 125.45

N

EXPONENT

N

N

Operator EXPONENT elevates the number to the indicated power .

Operand 1

Operator

Operand 2

Result

Evaluación

5

EXPONENT

3

NAUX_01

=125

Flow Control

OPERAND 1

OPERATOR

OPERAND 2

RESULT

LABEL

LABEL

 

 

This operator only indicates the row in which the brand or label used by the operators is SI_MAYOR, SI_MENOR, SI_DIFERENTE, SI_IGUAL e SALTA.

N, F, C, L

SI_IGUAL

N, F, C, L

LABEL

N, F

SI_MAYOR

N, F

LABEL

N, F

SI_MENOR

N, F

LABEL

N, F, C, L

SI_DIFERENTE

N, F, C, L

LABEL

These four operators are used to compare two values. If the result is positive, so it skips to the formula row in which the label indicated in the Result is. It can skip above or below.

Generally, when conditionals (IF or SI for Excel, for example), the following actions are placed after the condition. In GPE MODELO II, place the actions, in positive case and the the condition. Below the condition, the contrary actions.

For example: If the employee has the seniority date, take this information into account in order to determine the seniority. Otherwise, check whether there is a readmission date and take this date to determine the seniority; otherwise, take the hiring date.

Operand 1

Operator

Operand 2

Result

 

MUEVE

FCHARECON

DAUX_01

FCHARECON

SI_DIFERENTE

VACIO

CONTINUA_1

 

MUEVE

FCHAREING

DAUX_01

FCHAREING

SI_DIFERENTE

VACIO

CONTINUA_1

 

MUEVE

FECHAING

DAUX_01

CONTINUA_1

LABEL

 

 

FCHFINPER

RESTA

DAUX_01

NAUX_02

NAUX_02

DIVIDE

365

ANTIGÜEDAD

 

SALTA

 

Label

This operator is an unconditional skip. That is, it automatically pass to the formula row in which the label indicated in Results is.

For instance, if the increase type is equal to 1 and the daily salary is smaller than the minimum and different than zero, the minimum salary must be moved for daily salary. If the type of raise is equal to 2, so the daily salary must be multiplied by the general %.

Operand 1

Operator

Operand 2

Result

TIPOAUM

SI_DIFERENTE

1.

CONTINUA_1

SALDIA

SI_IGUAL

0

CONTINUA_2

SALDIA

SI_MAYOR

SALMIN

CONTINUA_2

 

MUEVE

SALMIN

SALDIA

 

SALTA

 

CONTINUA_2

CONTINUA_1

LABEL

 

 

INCRE_GRAL

SHARE        100

NAUX_01

 

NAUX_01

SUM        1

NAUX_01

 

SALDIA

MULTIPLICA

NAUX_01

SALDIA

CONTINUA_2

LABEL

 

 

Data Movement

OPERAND 1

OPERATOR

OPERAND 2

RESULT

C

STRTOVAL

N

N

Converts the data indicated in the operand 1 character type in numeric. Character type data, or string, can be a file type mnemonic, reserved or a constant. To identify the decimals, use dot (12.5). If there is comma character (,), as decimal separator, this is not considered.  In operand 2, the number of decimals to return is indicated. If n number is indicated in this field, a full number is returned.

Operand 1

Operator

Operand 2

Result

Evaluación

12.

STRTOVAL

 

NAUX_30

12

12.45.

STRTOVAL

 

NAUX_31

12

12.45.

STRTOVAL

1

NAUX_32

12.4

12.45.

STRTOVAL

2

NAUX_33

12.45

12.45.

STRTOVAL

3

NAUX_34

12.45

N

VALTOSTR

N

C

Converts data indicated in operand 1 numeric type (file type, reserved or constant) in a character or string. The dot is used (.) as a separator in the decimals. In operand 2, the size of the character that is returned must be indicated, considering the decimal dot in a characters account.  For example: 12.45 is size 5. If it is not indicated, or the indicated size is smaller, the exact value converted in string is returned. If the sizer is bigger, it is filled out by using zeros on the left.

Operand 1

Operator

Operand 2

Result

Evaluación

12

VALTOSTR

 

CAUX_01

12.

12

VALTOSTR

4

CAUX_02

0012.

12.45

VALTOSTR

 

CAUX_03

12.45.

12.45

VALTOSTR

6

CAUX_04

012.45.

F

GET_MONEDA

Número Moneda

N

It returns the rate value corresponding to determined date and requested currency. In the Financials, the currencies are identified with numbers that are defined to each customer. For example: 1 for local currency, 2 for dollars.

Example 1: If March 1st, 2012 has parity of 39.12, Pesos from Dominican Republic x Dollars, and this currency 3. And the employee salary is 1000 USD. To obtain salary in Pesos.

Operand 1

Operator

Operand 2

Result

Evaluación

3/21/2012

GET_MONEDA

3

NAUX_01

39.12

EMPSALARIO

MULTIPLICA

NAUX_01

SALPESOS

39,120.00

Example 2:

If a bonus of 500 USD is granted to the employee, calculated with end date of the Period, you get the bonus in Pesos.

Operand 1

Operator

Operand 2

Result

Evaluación

PERFECFIN

GET_MONEDA

3

NAUX_01

39.12

INCIMPINC

MULTIPLICA

NAUX_01

IMPORTE

19,560.0

 

YEAR

F

N

Returns a determined date year:

Operand 1

Operator

Operand 2

Result

Evaluación

 

YEAR

5/25/2007

NAUX_01

2007

 

MONTH

F

N

Returns a determined date month:

Operand 1

Operator

Operand 2

Result

Evaluación

 

MONTH

5/25/2007

NAUX_01

5

 

DIA

F

N

Returns a determined date day:

Operand 1

Operator

Operand 2

Result

Evaluación

 

DIA

5/25/2007

NAUX_01

25

 

DIA_SEMANA

F

N

Returns the week day a determined date considering 1=Sunday and 7=Saturday

Operand 1

Operator

Operand 2

Result

Evaluación

 

DIA_SEMANA

5/25/2007

NAUX_01

6

 

MUEVE

N, F, C, L

N, F, C, L

Operator MUEVE allocates the content of the data in mnemonic where the result is found.

 

CONVIERTE_FECHA

Date {YYYYMMDD}

F

It is used to arrange dates. For example, to obtain birth date, take the mnemonic year of the start date of the period and the month and day of the hiring date. To obtain the date in format yyyymmdd, multiply year by 10000 + month * 100 + day. To apply the CONVIERTE_FECHA, there will be a date type mnemonic that can be kept, compared, summed or subtracted as date.

Example: Pay 12 days of vacation premium for all the employees, if birth date is between start and end date of the period. If Period is 01/01/2009 to 01/15/2009 and the hiring date is 01/05/2004

Operand 1

Operator

Operand 2

Result

Evaluación

 

YEAR

FECFINPER

NAUX_01

2009

 

MONTH

FECHAING

NAUX_02

1

NAUX_01

MULTIPLICA

10000

NAUX_01

20090000

NAUX_02

MULTIPLICA

100

NAUX_02

100

NAUX_01

SUMA

NAUX_02

NAUX_03

20090100

 

DIA

FECHING

NAUX_04

5

NAUX_03

SUMA

NAUX_04

NAUX_03

20090105

 

CONVIERTE_FECHA

NAUX_03

BIRTHDAY

1/5/2009

BIFTHDAY

SI_MENOR

FECHINIPER

FINAL

 

BIRTHDAY

SI_MAYOR

FECHFINPER

FINAL

 

12

MULTIPLICA

FACTPRIMVA

UNITS

 

UNITS

MULTIPLICA

SALDIA

IMPORTE

 

 

MUEVE

IMPORTE

PRIMAVAC

 

FINAL

LABEL

 

 

 

Start day

SUMA_DIAS

End day

N

There are three ways to capture the incidences: Incidences per Employee, Incidences per Payroll Item and Extra Time. This last way, generally, occupies the extra time, that is the reason of its denomination, and it enables capturing the incidences day by day, considering a record per week.

Data are captured from day 1 to 7, that corresponds to the week days, day 1 is the first day of the week for the company. Irrespective of the capture per each day in the time field, the total captured is accrued in the 7 days.

With this operator, the incidences of each day or a range of days are read. It is occupied not to perform the calculation of each day, repeating the same seven times. Therefore, a cycle together with the operator SI_MENOR can be used.

For example: Determine the double or triple extra times that can be integrated, saved or exempt, considering until 3 hours x integrated days and until 3 days per week. Until 9 double and the remained ones tripled. Exemption of 50% until 5 SMG per week, the remaining ones saved. For this, each week is captured in one incidence record per day.

Operand 1

Operator

Operand 2

Result

UNIINC

SI_IGUAL

0

FINAL

# DETERMINAR LAS HORAS INTEGRABLES

Y NOINTEGRABLES

# NAUX_01 = CONTADOR DE DÍAS DE LA SEMANA

 

MUEVE

0

NAUX_01

# NAUX_02 =  CONTADOR DE VECES X SEMANA

 

MUEVE

0

NAUX_02

CICLO

LABEL

 

 

NAUX_01

SUMA

1

NAUX_01

# NAUX_03 = HORAS NO INTEGRABLES

 

MUEVE

0

NAUX_03

# NAUX_04 = HORAS INTEGRA  

BLES

 

 

MUEVE

0

NAUX_04

# OBTIENE LAS HORAS EXTRAS DE CADA UNO DE LOS DÍAS

NAUX_01

SUMA_DIAS

NAUX_01

NAUX_05

NAUX_05

SI_IGUAL

0

CONTINUA_1

NAUX_02

SUMA

1

NAUX_02

# DETERMINA SI YA TIENE MAS DE 3 DÍAS EN LA SEMANA

NAUX_02

SI_MAYOR

3

CONTINUA_1

# DETERMINA SI SON MAS DE 3 HORAS POR DÍA

 

MUEVE

NAUX_05

NAUX_03

NAUX_03

SI_MENOR

3

CONTINUA_1

 

MUEVE

3

NAUX_03

CONTINUA_1

LABEL

 

 

NAUX_05

RESTA

NAUX_03

NAUX_04

NAUX_03

SUMA

NAUX_19

NAUX_19

NAUX_04

SUMA

NAUX_20

NAUX_20

NAUX_01

SI_MENOR

7

CICLO

NAUX_19

SUMA

HRS_NOINTE

HRS_NOINTE

NAUX_20

SUMA

HRS_INTE

HRS_INTE

# DETERMINA LAS HORAS DOBLES Y TRIPLES

 

MUEVE

UNIINC

NAUX_17

NAUX_17

SI_MENOR

9

CONTINUA_3

 

MUEVE

9

NAUX_17

UNIINC

RESTA

NAUX_17

NAUX_18

CONTINUA_3

LABEL

 

 

HRS_DOBLES

SUMA

NAUX_17

HRS_DOBLES

HRS_TRIPLE

SUMA

NAUX_18

HRS_TRIPLE

# DETERMINA EL IMPORTE HRS DOBLESYTRIP

SALDIA

DIVIDE

8

NAUX_06

NAUX_17

MULTIPLICA

NAUX_06

NAUX_07

NAUX_07

MULTIPLICA

2

NAUX_07

NAUX_07

SUMA

IMP_HRSDOB

IMP_HRSDOB

NAUX_18

MULTIPLICA

NAUX_06

NAUX_08

NAUX_08

MULTIPLICA

3

NAUX_08

NAUX_08

SUMA

IMP_HRSTRI

IMP_HRSTRI

# DETERMINA EL IMPORTE GRAVADO Y EXENTO

NAUX_07

MULTIPLICA

0.5

NAUX_09

NAUX_09

SI_MENOR

TOPE_TEXT

CONTINUA_4

 

MUEVE

TOPE_TEXT

NAUX_09

CONTINUA_4

LABEL

 

 

NAUX_07

RESTA

NAUX_09

NAUX_10

TEXTGRAVA

SUMA

NAUX_10

TEXTGRAVA

NAUX_08

SUMA

TEXTGRAVA

TEXTGRAVA

TEXTEXENTO

SUMA

NAUX_09

TEXTEXENTO

# DETERMINA EL IMPORTE INTEGRA BLE  

 

MUEVE

NAUX_20

NAUX_11

UNIINC

SI_MENOR

9

CONTINUA_5

9

RESTA

NAUX_19

NAUX_11

NAUX_20

RESTA

NAUX_11

NAUX_12

CONTINUA_5

LABEL

 

 

NAUX_11

MULTIPLICA

NAUX_06

NAUX_13

NAUX_13

MULTIPLICA

2

NAUX_13

NAUX_12

MULTIPLICA

NAUX_06

NAUX_14

NAUX_14

MULTIPLICA

3

NAUX_14

NAUX_13

SUMA

NAUX_14

NAUX_15

NAUX_15

SUMA

IMP_INTEG

IMP_INTEG

NAUX_19

MULTIPLICA

NAUX_06

NAUX_16

NAUX_16

MULTIPLICA

2

NAUX_16

NAUX_16

SUMA

IMP_NOINTE

IMP_NOINTE

FINAL

LABEL

 

 

<Value to Filter>

 

<BLANK>

FILTRO_MOVLI

<Field SRV>

<budget list>

<BLANK>

 

Operator FILTRO_MOVLI aims at performing a pre filter by using, as reference, the payroll items catalog fields. It will work together with the operator SUMA_MOVLI, where the table Payroll Transactions (SRC) is filter per payroll items (RC_PD).

Use of operator FILTRO_MOVLI with SUMA_MOVLI only works if there are payroll values previously calculated in the Payroll Transactions (SRC). Several FILTRO_MOVLI can be added and they will connect to an AND.

If the SUMA_MOVLI does not have data in the first or second expression, it means filter indicated in FILTRO_MOVLI must be considered.

Example 01: only with a filter in FILTRO_MOVLI

Operand 1

Operator

Operand 2

Result

1.

FILTRO_MOVLI

CONISR

 

 

SUMA_MOVLI

 

NAUX_01

Example 02: only with a filter in SUMA_MOVLI

Operand 1

Operator

Operand 2

Result

1.

SUMA_MOVLI

CONISR

NAUX_01

Example 03: only with a filter in SUMA_MOVLI and taking value “1” or “S” as standard

Operand 1

Operator

Operand 2

Result

 

SUMA_MOVLI

CONISR

NAUX_01

Example 04: only a filter in FILTRO_MOVLI and searching several values

Operand 1

Operator

Operand 2

Result

1.3.

FILTRO_MOVLI

CONISR

 

 

SUMA_MOVLI

 

NAUX_01

Example 05: search different values of the same field.

Operand 1

Operator

Operand 2

Result

3.

FILTRO_MOVLI

RV_TIPOCOD

 

 

SUMA_MOVLI

 

NAUX_01

1.

FILTRO_MOVLI

RV_TIPOCOD

 

 

SUMA_MOVLI

 

NAUX_02

 

Content

SUMA_MOVLI

SRV Mnemonic or

BASE_PENSIÓN or

Payroll Items List

N

Allows, via formula, the calculation (addition/subtraction) of budget values already calculated on Monthly Movements (SRC), according to the list of budgets selected. It also allows the calculation for beneficiaries according to definition of the BASE_PENSION operator.

By default, values (RC_VALOR) will be obtained from the entered budget list; however, if you need to obtain the total of H=Hours or D=Days, you must indicate the reserved mnemonic TP_SUMA_MOVLI.

The position for the table of beneficiaries must be carried out with operator SUMA_MOVLI and reserved Mnemonic BASE_PENSION, identified in the second expression of formula used.

For this operator to be used together with BASE_PENSION, you need: field Read Ben = Yes (RM_LEEBEN) in the Process Payroll Items (SRM).
In the Beneficiary routine, if an employee has several alimonies, the different payroll item must be captured for each record.
During calculation, the alimony base is obtained, depending on the payroll item that is being calculated and the payroll items list indicated in the field Payroll Items Base for the Alimony.

Operand 1

Operator

Operand 2

Result

Content

SUMA_MOVLI

BASE_PENSION operand

NAUX_01

It is also possible to use the SUMA_MOVLI operator with a Mnemonic that identifies an incidence field from table SRV, for instance, RV_PENSAO. Therefore, all payroll items with the value of this field equal to Yes, to affect:

Operand 1

Operator

Operand 2

Result

 

SUMA_MOVLI

Mnemonic

NAUX_01

Another possibility is to directly use values in the formula's expression. They must be registered payment codes in table SRV, in the Code field (RV_COD).

Example:

Operand 1

Operator

Operand 2

Result

SUMA_MOVLI

001,002,003.

NAUX_01

Sums the payroll items values calculated to this moment, according to the selected payroll items list. Follows the payroll item type, that is, if it is Collections or Collection Base, it will be summed up; if it is Deduction or Deduction Base, it will be subtracted.

Example 1: Mnemonic CONISR is associated to the table SRV=Payroll Items and the field RV_IR=ISR

“2”        SUMA_MOVLI        CONISR        NAUX_01

Example 2: Mnemonic CONSDO is associated to the table SRV=Payroll Items and the field RV_INCORP

In case you want to obtain the incorporated days to the salary, to determine the days to be paid.

 

MUEVE

D

TP_SUMA_MOVLI

1.

SUMA_MOVLI

CONSDO

NAUX_01

 

ie_total_con

<criterion>

N

 

IE_TOTAL_EMP

<criterion>

N

These operators are used together with an alphanumeric table called Criterion, that has a key and a description. A criterion is attributed to each employee.

IE_TOTAL_CON retrieves the sum of values of the month that is processed (RCH_MES, RCH_ANO), the payroll item that is calculated and all employees that follow the indicated <criterion> .

IE_TOTAL_EMP retrieves the Total of Employees that, in the month that is processed (RCH_MES, RCH_ANO), had value in the payroll item that is calculated, and meet the indicated <criterion> .

Example: Sum the monthly state basis of the month, of all employees with criterion 004. From this base, 8 minimum salaries are subtracted, considering factor 30.5. From this result, divide between the original basis to obtain a factor. The State Tax is obtained by summing up the month state tax base of the employee and by multiplying by the factor (State Tax Calculation Script of Querétar, Mexico).

# OBTIENE ACUM

DEL MES

DEL TRABAJADOR

 

PERMESPER

IMPORTE_EMPRESA

PERMESPER

NAUX_01

# OBTIENE

SAL MIN

 
 

 

SEARCH

TABLA_S006

 

ELEMENTO_01

HASTA_IGUAL

EMPZONECO

 

 

MUEVE

ELEMENTO_02

SALMIN

# OBTIENE ACUM

DEL MES DE TODOS

LOS TRABAJADORER

WITH CRITERION “0004”

EMPCRIACUM

SI_DIFERENTE

004.

CONT_04

 

IE_TOTAL_CON

\"004\"

BASEISNQRO

CONT_04

LABEL

 
 

SALMIN

MULTIPLICA

8

NAUX_03

NAUX_03

MULTIPLICA

30.5

NAUX_03

BASEISNQRO

RESTA

NAUX_03

NAUX_04

NAUX_04

DIVIDE

BASEISNQRO

FACISNQRO

NAUX_01

MULTIPLICA

FACISNQRO

BASEIMPEST

CONT_04

LABEL

 
 

 

Accrual History

OPERAND 1

OPERATOR

OPERAND 2

RESULT

 

BUSCA_ANO_EMPRES

YEAR

 

The accrual history in Model 2 has start and end year, that is the reason why you must indicate the accrual year searched, when the operators IMPORTE_EMPRESA and UNIDADES_EMPRESA are occupied.

If it is indicated with operator BUSCA_ANO_EMPRES, both start and end year must be attributed to this operator. If this operator is not occupied, the current year accrual will return, both start and end year.

If the years are different, when an accrual starts in a different month than January, you must indicate it in the reserved mnemonic ANO_INI_ACU and ANO_FIM_ACU.

 

BUSCA_PROCESO

Process

 

When the SUMA_UNIDADES or SUMA_IMPORTES are used as standard, it is searched in the process the employee is allocated. If the extraction of other processes accrual is required, with BUSCA_PROCESO, the process accrual employee and indicated payroll item are loaded, as the scope of this operator is for the formula that is being evaluated. The process is a character field.

Operand 1

Operator

Operand 2

Result

 

BUSCA_PROCESO

01

 

C

 

<VACIO>

FILTRO_ACUM

<campo SRV>

<lista conceptos>

<VACIO>

 

Operator FILTRO_ACUM aims at performing a pre-filter of Accruals (RG7), using as parameter the payroll item field (RG7_PD), and will send this filter to the next operator of Accruals.

An important thing is that the operators: SUMA_UNIDADES, SUMA_IMPORTES, UNIDADESA_EMPRESA, IMPORTE_EMPRESA, UNIDADES_TOTAL, IMPORTE_TOTAL can work without the need to use the payroll filter.

In Payroll Items Catalog per Process (SRM) must be associated to payroll item (RM_VERBA) with a formula (RM_CODFOR); however, if the operator FILTRO_ACUM is used, the payroll item (RM_VERBA) is not taken into account, as the operator FILTRO_ACUM, performs the pre filter of the payroll items indicated in itself.

If the condition of the filter used in FILTRO_ACUM does not exist, the operator return is Zero (0).

If you need to clean the content of FILTRO_ACUM, use 1st and 2nd expression of the formula without data (empty).

The FILTRO_ACUM can be used several times in a formula, and each one is added to the previous one, giving it AND treatment (as long as a filter without the 1st and 2nd expression is not added, as it cleans all filters). In each new formula, the FILTRO_ACUM is clean.

Operand 1

Operator

Operand 2

Result

2.

FILTRO ACUM

CONISR

 

2.

FILTRO_ACUM

CONCCSS

 

PERMESPER

IMPORTE_EMPRESA

PERMESPER

IMPORTE

<tipo>

BUSCA_SUCURSAL

Sucursales

 

When you use UNIDADES_EMPRESA or IMPORTE_EMPRESA as standard, the accrual of the branch in which the employee is allocated is read. If the extraction of other branches accrual is required, with BUSCA_SUCUSAL, the accrual of the branches and the payroll item indicted are loaded. The scope of this operator is for ALL the formulas of the payroll items per process from the formula it occupies, as it is recommendable to add in the first defined formula. To indicate the branches, capture them separately using comma (,) and this branch must be in the sigamat.

If the Corporative Management is used, in the first expression, add:
1. To indicate that all branches of the same company must be filtered, based on the access of the Personnel Management Module or in the content used in the second expression of this operator.
2. To indicate that all branches of the same Company and Business Unit must be filtered or in the content used in the second expression of this operator.

Leave this first expression blank to clear the branches filter.

Considering the following configuration of Company Management and the employee belonging to branch=D MG 01.

Company

Business unit

Branch

D

MG

D MG 01

D

MG

D MG 02

D

RJ

D RJ 01

D

RJ

D RJ 02

M

PR

M PR 01

M

PR

M PR 02

M

SP

M SP 01

M

SP

M SP 02

A

AM

A AM 01

A

AM

A AM 02

A

RO

A RO 01

A

RO

A RO 02

 

Example 1: Formula to get companyD accruals:

Company

Business unit

Branch

 
 
 

D

MG

D MG 01

D

MG

D MG 02

D

RJ

D RJ 01

D

RJ

D RJ 02

Operand 1

Operator

Operand 2

Result

1.

BUSCA_SUCURSAL

 
 

01.

UNIDADES_EMPRESA

01.

NAUX_01

Example 2: Formula to get company D and M accruals.

Company

Business unit

Branch

 
 
 

D

MG

D MG 01

D

MG

D MG 02

D

RJ

D RJ 01

D

RJ

D RJ 02

M

PR

M PR 01

M

PR

M PR 02

M

SP

M SP 01

M

SP

M SP 02

Operand 1

Operator

Operand 2

Result

1.

BUSCA_SUCURSAL

 

D MG 01,M PR 01

01.

UNIDADES_EMPRESA

01.

NAUX_01

Example 3: Formula to get the accruals of the company D and Business Unit MG:

Company

Business unit

Branch

 
 
 

D

MG

D MG 01

D

MG

D MG 02

Operand 1

Operator

Operand 2

Result

2.

BUSCA_SUCURSAL

 
 

01.

UNIDADES_EMPRESA

01.

NAUX_01

Start month

SUMA_IMPORTES

month end

N

Start month

SUMA_UNIDADES

month end

N

These two operators (SUMA_UNIDADES and SUMA_IMPORTES) read the accruals of the employee from the start month until the end month of the process in the employee master or the one indicated in BUSCA_PROCESO. The months are character type size 2. To indicate the start and end year, you must allocate it in mnemonics ANO_INI_ACU and ANO_FIN_ACU or, if the year is the same for both, operator BUSCA_ANO_EMPRES can be occupied.

Start month

UNIDADES_EMPRESA

Month end

N

Start month

IMPORTE_EMPRESA

Month end

N

These two operators (UNIDADES_EMPRESA and IMPORTES_EMPRESA) read the accruals of the employee from start to end month of all processes belonging to the company in which the process that is being run is allocated. The months are character type size 2. To indicated the start and end year, you must allocate it in the mnemonics ANO_INI_ACU and ANO_FIN_ACU or, if the year is the same for both, operator BUSCA_ANO_EMPRES can be occupied.

This operator considers whether the customer is occupying the Company Management. From version 11, branch field (FILIAL) is divided in 3 parts: Company, Business Unit and Branch. The customer can occupy these three fields, two of just one field. A possible definition is that the Company is one Company and the business unit and branches are logical divisions. Other definition is that the Company is occupied as Company Group and the Business Units as the companies and branches, a logical division. Finally, the branches can be occupied as companies.

Start month

UNIDADES_TOTAL

Month end

N

Start month

IMPORTE_TOTAL

Month end

N

These two operators (UNIDADES_EMPRESA and IMPORTES_EMPRESA) read the accruals of the employee from start to end month of all processes belonging to the company in which the process that is being run is allocated. The months are character type size 2. To indicate start and end date, you must allocate them in the mnemonics ANO_INI_ACU e ANO_FIN_ACU.

Example: a customer has three processes: 01 Employ, 02 Unionized and 03 Fees. Processes 01 and 02 belong to branches 01, 02; 03 to branch 04. In some cases, when moved from the personnel to payroll, the payroll items of the payroll that have not been performed in their corresponding processes are paid or discounted. Therefore, in the annual statement of revenue and salaries, the accruals of the four branches must be consider for all employees. The formula the accruals of the recordable payroll items read can be as follows:

Operand 1

Operator

Operand 2

Result

# OBTAIN ACCRUALS FROM COMPANY 1

 

BUSCA_SUCURSAL

01,02,03,04

 

 

YEAR

FECINIPER

ANO_INI_ACU

 

YEAR

FECINIPER

ANO_FIN_ACU

01.

IMPORTE_EMPRESA

12.

IMPORTE

IMPORTE

SUMA

TOTAL_PERCEPCION

TOTAL_PERCEPCION

IMPORTE

SUMA

TOTAL_GRAVABLE

TOTAL_GRAVABLE

Histórico de Movimentos

OPERAND 1

OPERATOR

OPERAND 2

RESULT

Initial Period

SUMA_IMPHIS

Final Period

N

Initial Period

SUMA_UNIHIS

Final Period

N

These two operators (SUMA_IMPHIS and SUMA_UNIHIS) read the transaction history that are between the periods - initial and final- indicated to this employee and payroll item of a determined type of payroll (or calculation script).

The payroll item considers the payroll item that is calculated.
The initial period is indicated in the operand 1.
The initial payment is previously moved to the reserved mnemonic SUMA_NPGINI. If the value is not indicated, a value in blank is assumed and then, the accrual is NOT read.
The initial period is indicated in the operand 2. The final pay is indicated in the reserved mnemonic SUMA_NPGFIM. If the value is not indicated, a value in blank is assumed and then, the accrual is NOT read.
The payroll type must be indicated in the reserved mnemonic SUMA_TIPO_NOM. When it is not indicated, all payroll types are considered.

Obtaining the monthly average commission, only regarding the paid commissions in the payroll. You must sum the N previous periods values, indicated in Periods.  It implies the reading of previous year Periods and current year Periods to which is indicated in the Period and the Period and initial payment to the added are paid as advance payment.

Operand 1

Operator

Operand 2

Result

 

MUEVE

PAGVALES

SUMA_NPGINI

 

MUEVE

PAID

SUMA_NPGFIM

 

MUEVE

01.

SUMA_TIPO_NOM

PERVALES

SUMA_IMPHIS

Period

NAUX_05

PERVALES

SUMA_UNIHIS

Period

NAUX_06

NAUX_05

DIVIDE

NAUX_06

COM_PROM

DIASVAC

MULTIPLICA

COM_PROM

NAUX_01

NAUX_01

SUMA

IMPORTE

IMPORTE

TOTPER

SUMA

IMPORTE

TOTPER

PERGRAV

SUMA

IMPORTE

PERGRAV

FINAL

LABEL

 
 

Numeric Table

OPERAND 1

OPERATOR

OPERAND 2

RESULT

 

SEARCH

TABLA_XXXX

 

This operator searches the numeric table indicated in the operand 2. OBSERVATION: it is not placed in any record. Operand 2 must be comprised by the word TABLA_ plus the type (U if is user, S, if it is System) and the 4-digit table key.

ELEMENTO_01 to ELEMENTO_99

HASTA_IGUAL

N, C, F

 

ELEMENTO_01 to ELEMENTO_99

HASTA_MAYOR

N

 

ELEMENTO_01 to ELEMENTO_99

HASTA_MENOR

N

 

ELEMENTO_01 to ELEMENTO_99

HASTA_MAYORIGUAL

N

 

ELEMENTO_01 to ELEMENTO_99

HASTA_MENORIGUAL

N

 

Searches the table (previously called with operator SEARCH) until the indicated element in operand 1 is equal to, greater than, equal to or greater then, smaller than, equal to or smaller than the mnemonic indicated in operand 1. If it is not found, the record returns with zeros. If it is not found, it returns the record with zeros. To use the operators HASTA_MENOR and HASTA_MENORIGUAL the table must be captured in a descending manner. That is, higher values come in the first records and lower in the last.

the records must be captured in order, as, in the alphanumeric tables, different types of tables can be defined with different data types and sizes, you cannot organize an index.

 

For example: Get the tax according to article 113 of LISR.

Operand 1

Operator

Operand 2

Result

PERGRAVMES

SI_IGUAL

0

FIN

 

SEARCH

TABLA_01

 

ELEMENTO_02

HASTA_MAYOR

PERGRAVMES

 

PERGRAVMES

RESTA

ELEMENTO_01

NAUX_01

NAUX_01

MULTIPLICA

ELEMENTO_04

NAUX_01

NAUX_01

SUMA

ELEMENTO_03

NAUX_01

 

SEARCH

TABLA_03

 

ELEMENTO_02

HASTA_MAYOR

PERGRAVMES

 

NAUX_01

RESTA

ELEMENTO_03

IMPORTE

IMPORTE

SI_MAYOR

0

CONTINUA

 

MUEVE

IMPORTE

CREDITO

 

MUEVE

0

IMPORTE

CONTINUA

LABEL

 
 

IMPORTE

SUMA

TOTDED

TOTDED

FIN

LABEL

 
 

Database Update

OPERAND 1

OPERATOR

OPERAND 2

RESULT

 

SAVE

table

 

During payroll calculation, this operator purpose is to save the values in the following tables In order to perform it, process the payroll item, check whether it is correct and then, process the payroll again with option Save enabled. Only new values before the operand Save must be moved to the mnemonic associated to the corresponding field tables.

Tables that are edited and added during calculation are:

Employee Master (SRA): Data can be edited.
Incidences (RGB): Records can be added.
Loans (SRK): Records can be added. Example: for the withholding of several payments of taxes against.
Accrual History (RG7): Edits the record existent or perform the addition, if the record is not based on the key: Year, Branch, Registration, Payroll Item and Process
Work History (RCP): If there is no transaction for this Branch, Employee, Transaction Type and Date, the record is added, otherwise, it is edited.
Salary History (SR3 Detail and SR7 Header): If there is no transaction for this Branch, Employee and Date, the record is added, otherwise, it is edited. Both for SR7 and SR3.
Entitled Days (SRF): If there is no transaction for this Branch, Employee Payroll Item, and Start Date, the record is added, otherwise, it is edited.

Career Trajectory

OPERAND 1

OPERATOR

OPERAND 2

RESULT

Start Date

LEE_TRAY

End date

{transaction type}

In the 4.1 version of the calculation, the functionality that enables you to read the work history transactions has been implemented.

With this operator, the records that exist in the employee work history are returned: from a transaction before the start date until the indicated end date.
The transactions types are separated by commas. If the transaction types are not indicated, all of them are returned. You can use the asterisk to indicate all. The transaction types are: 01) High for company, 02) Low from the company 03) High in the new employer record, 04) Low in the previous employer record, 05) Salary Change, 06) Readmission, 20) Company write-off date when the presentation of the write-off document is later than 5 days, in transaction 02, there is the write-off date according to IMSS and the transaction 20 with write-off for the company.
The most recent record of this date range and transaction type is available, so the mnemonic of file type associated to the work history is read.
If the start date is not indicated, the start date of the run period is used.
If the end date is not indicated, the end date of the run period is used.
Is the start or end date is specified, you must use format dd/mm/yyyy.
OperatorLEE_TRAY the start of a cycle. This is completed until the SIG_TRAY is found.
The order of the loaded records is based on the transaction date in a decreasing order.
You can access any field of the history table through mnemonics of file type.
Ιϕ τηερε ισ νοτ ρεχορδ ιν τηισ δατε ρανγε, τηε λαστ τρανσαχτιον ισ λοαδ ιρρεσπεχτιϖε οϕ τηε τψπε οϕ τρανσαχτιον.
If there is any case in which the employee did not have any work history record, the formula flow skips until the following instruction of the SIG_TRAY.
Besides having work history records available, there is a reserved mnemonic called DIAS_TRAY_SIG that has the transactions effective days.

For example: The transactions from March, 15th to April 30th of an employee that has the following transactions are read:

01/March/2013

150.00         salary change per variability

25/March/2013

170.00        salary change per position change

01/April/2013

170.00         salary change per variability

For the first transaction, 10 days are returned in the DIAS_TRAY_SIG that refers to the days from March, 15th (start date of the desired range) until March, 24th (the previous day to the following transaction).

For the second transaction, 7 days are returned in the DIAS_TRAY_SIG that refers to the days from March, 15th until March, 31st (the previous day to the following transaction).

For the third transaction, 30 days are returned in the DIAS_TRAY_SIG that refers to the days from April, 1st until March, 31st (end date of the desired range).

 

SIG_TRAY

{GEN_MOV}

 

With this operator, the following record from the ones selected by the operator LEE_TRAY is read.

If the reserved mnemonic GEN_MOV is add to OPERANDO2 before the following record is returned, add a record in payroll transactions with what is in the reserved mnemonic UNITS and IMPORT and start them with zero. If there is no indication of the need to generate a transaction, it will not start with zeros UNITS and IMPORT and only one transaction is generated, if, when concluding a cycle, it brings some UNITS and IMPORT.
When finding this operator, if there are more work history records, it skips to the line right below to LEE_TRAY and it runs the formula again, until there are no records left.

 

PRIMER_REG_TRAY

 

 

With this operator, the first record of work history loads the memory in the selected range.

 

ULTIMO_REG_TRAY

 

 

With this operator, the last record of work history loads the memory in the selected range.

Example: In a company, the negotiation of the following collective agreement generally delays (over a month). As, during this negotiation period, position changes have been performed, and the employee master has the current and previous salary, the retroactive payment must be performed after the reading of the work history records.

It is necessary to perform the retroactive raise from January 1st, 2003 to August 15th, 2003, keeping the corresponding salaries to each position separately.

Operand 1

Operator

Operand 2

Result

PORAUM

DIVIDE

100

NAUX_01

1/1/2013

LE_TRAJ

8/15/2013

 

SALDIATRAY

MULTIPLICA

NAUX_01

NAUX_02

NAUX_02

MULTIPLICA

DIAS_TRAY_SIG

IMPORT

 

MUEVE

DIAS_TRAY_SIG

UNITS

IMPORT

SUMA

TOTPER

TOTPER

IMPORT

SUMA

PERGRAV

PERGRAV

 

SIG_TRAY

GEN_MOV

 

Alimony Beneficiary

OPERAND 1

OPERATOR

OPERAND 2

RESULT

 

LEE_DEP

{Type Dep}

 

With this operator, the records of the employee dependents of the indicated type are brought, from a transaction before the start date to the end date indicated.

The transactions types separated by commas are placed. If transaction types are not indicated, all of them are retrieved. You can use the asterisk to indicate all. The transactions types are: 01) High for company, 02) Low from the company 03) High in the new employer record, 04) Low in the previous employer record, 05) Salary change, 06) Readmission, 20) Company write-off date when the presentation of the write-off document is later than 5 days, in transaction 02, there is the write-off date according to IMSS and the transaction 20 with write-off for the company.
The most recent record of this date range and transaction type is available, so the mnemonic of file type associated to the work history is read.
If the start date is not indicated, the start date of the run period is used.
If the end date is not indicated, the end date of the run period is used.
If the start and end date is specified, the format must be dd/mm/yyyy.
Operator LEE_TRAY indicates the start of a cycle. This is complemented until SIG_TRAY is found.
The order of the loaded records is based on the transaction date in a decreasing order.
You can access any field of the trajectory table through mnemonics of file type.
If there is not record in this date range, the last transaction is load irrespective of the type of transaction.
If there is any case in which the employee did not have any work history record, the formula flow skips until the following instruction of the SIG_TRAY.
Besides having career trajectories records available, there is a reserved mnemonic called DIAS_TRAY_SIG that has the transactions effective days.

For example: The transactions from March, 15th to April 30th of an employee that has the following transactions are read:

01/March/2013

150.00         salary change per variability

25/March/2013

170.00        salary change per position change

01/April/2013

170.00         salary change per variability

For the first transaction, 10 days are returned in the DIAS_TRAY_SIG that refers to the days from March, 15th (start date of the desired range) until March, 24th (the previous day to the following transaction).

For the second transaction, 7 days are returned in the DIAS_TRAY_SIG that refers to the days from March, 15th until March, 31st (the previous day to the following transaction).

For the third transaction, 30 days are returned in the DIAS_TRAY_SIG that refers to the days from April, 1st until March, 31st (end date of the desired range).

 

SIG_DEP

 

 

With this operator, the following record from the ones selected by the operator LEE_DEP is to be read.

When finding this operator, if there are more pending records, it skips until the next sequential and starts to run the formula again until there are no records.

 

PRIMER_REG_DEP

 

 

With this operator, the first record of dependants loads the memory in the selected range.

 

ULTIMO_REG_DEP

 

 

With this operator, the first record of dependants loads the memory in the selected range.

Example: It is needed to determine whether there is a dependant that is spouse (C) to grant the correspondent IST credit.

Operand 1

Operator

Operand 2

Result

If you want to know whether the employee has a spouse to calculate the spouse credit.

 

LEE_DEPENDIENTE

C

 

 

BUSCA_TABLA

TABLA_S002

 

ELEMENTO_01

ATÉ_IGUAL

1

 
 

MOVE

ELEMENTO_02

NCREDISR

 

SIG_DEPENDIENTE

 
 

 

 

Tables

RC2 – Formula Headers.
RC3 – Formula Items.
RCA – Mnemonics.
SRY – Calculation Routes.
SRM – Calculation Route Items.

See Also

Mnemonics File
Calculation Scripts