Data Transaction - Mod II

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 has the size of 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 21st, 2012 corresponds to 39.12 Pesos Dominican Republic X Dollars, and this is currency 3. The worker 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

 

Day

F

N

Returns a determined date day:

Operand 1

Operator

Operand 2

Result

Evaluación

 

Day

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

Dato {AAAAMMDD}

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

Evaluation

 

ANO

FECFINPER

NAUX_01

2009

 

MES

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

ANIVERSARIO

05/01/2009

ANIVERSARIO

SI_MENOR

FECHINIPER

FINAL

 

ANIVERSARIO

SI_MAYOR

FECHFINPER

FINAL

 

12

MULTIPLICA

FACTPRIMVA

UNIDADES

 

UNIDADES

MULTIPLICA

SALDIA

IMPORTE

 

 

MUEVE

IMPORTE

PRIMAVAC

 

FINAL

ETIQUETA

 

 

 

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

ETIQUETA

 

 

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

ETIQUETA

 

 

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

ETIQUETA

 

 

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

ETIQUETA

 

 

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

ETIQUETA

 

 

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

ETIQUETA

 

 

<Valor a Filtrar>

 

<VAZIO>

FILTRO_MOVLI

<Campo SRV>

<lista verbas>

<VAZIO>

 

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: just with a filter inFILTRO_MOVLI

Operand 1

Operator

Operand 2

Result

1.

FILTRO_MOVLI

CONISR

 

 

SUMA_MOVLI

 

NAUX_01

Example 02: just with a filter in SUMA_MOVLI

Operand 1

Operator

Operand 2

Result

1.

SUMA_MOVLI

CONISR

NAUX_01

Example 03: just with a filter in SUMA_MOVLI and taking the value 1 or S as standard

Operand 1

Operator

Operand 2

Result

 

SUMA_MOVLI

CONISR

NAUX_01

Example 04: just with 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

The SUMA_MOVLI operator is available and allows the calculation through its formula (adding/subtracting) of payment values already calculated in Monthly Transactions (table SRC), according to the selected list of payments. It also allows the calculation for beneficiaries according to definition of the BASE_PENSION operator.

As default, the values (RC_VALOR) are obtained from the indicated list; however, you need to obtain the total of T=Time or D=Days must be indicated in 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 routine Beneficiaries, if an employee has several alimonies, a different payroll item for each record must be captured.
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

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

<critério>

N

 

IE_TOTAL_EMP

<critério>

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 gets the sum of the 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 gets 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 follow the indicated <criterion> .

Example: Sum the month state tax base, all employees with criterion 004. From this base, subtract 8 monthly minimum salaries, considering the factor 30.5. From this result, divide between the original base 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

 
 

 

BUSCA

TABLA_S006

 

ELEMENTO_01

HASTA_IGUAL

EMPZONECO

 

 

MUEVE

ELEMENTO_02

SALMIN

# OBTIENE ACUM

DEL MES DE TODOS

LOS TRABAJADORER

CON CRITERIO “0004”

EMPCRIACUM

SI_DIFERENTE

\"004\"

CONT_04

 

IE_TOTAL_CON

004

BASEISNQRO

CONT_04

ETIQUETA

 
 

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

ETIQUETA