TRTSYN script: Time synthesis
HREJOUR entry point
When the payroll variables and time synthesis variables are updated, this entry point is used to modify the number of hours and days valued according to the employee's planning. This entry point is called after the valuation of the employee's planning and before the time synthesis update (TIMRECAP file) and payroll variable update (VALEUR file). It comes before the calls to the SPECALTPS scripts.
Context and operating mode
In the context of the entry point :
- There is no current transaction
Log file
The GTRACE variable must be tested. If GTRACE<> » » a log file is opened, otherwise GTRACE= » ».
Different call cases
The TRTSYN processing is called from the following functions:
- Time cut-off, if the "Time summary calculations" box or the "Pay variable update" box is checked.
- Employee values, with the "Functions / Sequences" button if the "Time summary calculations" box or the "Pay variable update" box is checked.
The TRTSYN processing calls the HREJOUR entry point three times when the time file is read.
The HREJOUR entry point is called first when the days contained within the extraction period are valued. This valuation is based on the planning. It updates the HEURES variables (number of hours), JOURS variables (number of days, with a maximum of 1), JNUIT variables (day/night activity type), HOUVRAS variables (number of working hours), JOUVRAS variables (number of working days, with a maximum of 1), HOUVRES variables (number of work hours), JOUVRES variables (number of work days, with a maximum of 1), HCALENS variables (number of calendar hours) and JOUVRAS variables (number of calendar days, with a maximum of 1). The entry point is used to modify these values. When it is equal to 1, the ISTIMEMP variable processes the TIMEMP time spent.
The HREJOUR entry point is called a second time when the days included between the end date of the extraction period and the end date of the calendar month are valued. In effect, some events like paid leave are entered within the month. This valuation is based on the planning. It updates the HEURE variables (number of hours), JOUR variables (number of days, with a maximum of 1), JNUIT variables (day/night activity type), HOUVRAS variables (number of working hours), JOUVRAS variables (number of working days, with a maximum of 1), HOUVRES variables (number of work hours), JOUVRES variables (number of work days, with a maximum of 1), HCALENS variables (number of calendar hours) and JOUVRAS variables (number of calendar days, with a maximum of 1). The entry point is used to modify these values. When it is equal to 1, the ISTIMEMP variable processes the TIMEMP time spent.
The HREJOUR entry point is called a third time when the days contained within the adjustment read are valued. This valuation updates the HEURE variables (number of hours), JOUR variables (number of days, with a maximum of 1), JNUIT variables (day/night activity type), HOUVRAS variables (number of working hours), JOUVRAS variables (number of working days, with a maximum of 1), HOUVRES variables (number of work hours), JOUVRES variables (number of work days, with a maximum of 1), HCALENS variables (number of calendar hours) and JOUVRAS variables (number of calendar days, with a maximum of 1). The entry point is used to modify these values. When it is equal to 0, the ISTIMEMP variable processes the TIMREGUL time adjustment.
Available variables and masks
Variable or mask |
Definition |
Char() MATRI |
Employee's ID number |
Date DAT |
Contains the day that is being valuated |
Decimal HEURES, HEURE Decimal HOUVRAS, HOUVRES, HCALENS |
Valuation of the day in number of hours Valuation of the working days, work days, calendar days in number of hours |
Decimal JOURS, JOUR Decimal JOUVRAS, JOUVRES, JCALENS Decimal QTY1, QTY2 |
Number of days contained in the date (0,5, 0,75, etc.) with a maximum of 1 Number of working days, work days, calendar days contained in the date (0,5, 0,75, etc.) with a maximum of 1 Quantity management |
Integer JNUIT |
Indicates the day activity type. Local menu 402 |
Date DATDEB |
Extraction period start date that corresponds to the pay date |
Date DATFIN |
Extraction period end date that corresponds to the pay date |
Date DMOIS |
Pay month start date |
Date FMOIS |
Pay month end date |
Date DATPAY |
Pay date |
Integer K |
The valuated day is the kth day of the pay period (if the pay period starts on 21/03, k=1 for 21/03, k=2 for 22/03, etc.) |
Integer ISTIMEMP |
When it is equal to 1, the ISTIMEMP variable processes the TIMEMP time spent, and when it is equal to 0, this variable processes the TIMREGUL time adjustment. |
Open tables
Table |
Significant |
Table title |
TIMEMP [TIP] |
Yes |
Employee working times |
PERIOD [PEO] |
Yes |
Extraction period |
EMPLOPAY [PAY] |
Yes |
Employee's payroll information |
EMPLOCPT [CPT] |
Yes |
Employee's accounting information |
EMPLOAD [AD] |
Yes |
Employee's administrative information |
EMPLOCUM [EPC] |
Yes |
Employee totals |
EMPLOID [ID] |
Yes |
Employee's civil status |
EMPLOCTR [CTR] |
Yes |
Employee's employment contract |
EMPLOENT [ENT] |
Yes |
Employee arrival/departure |
EMPLOEXM [EXM] |
Yes |
Employee's degrees |
EMPLOCHD [CHD] |
Yes |
Employee's children |
EMPLOMED [MED] |
Yes |
Employee's medical examinations |
EMPLOTRY [TRY] |
Yes |
Professional experience |
EMPLOPRO [PRO] |
Yes |
Employee's professional status |
EMPLORIB [RIB] |
Yes |
Employee's bank ID |
EMPLOSAL [SAL] |
Yes |
Employee's salary evolution |
DATPERSYN
When the payroll variables and time synthesis variables are updated, this entry point is used to modify the extraction period dates. This entry point is called before the time synthesis update (TIMRECAP file) and payroll variable update (VALEUR file). It comes before the calls to the SPECALTPS scripts.
Context and operating mode
In the context of the entry point :
- There is no current transaction
Different call cases
The TRTSYN processing is called from the following functions:
- Time cut-off, if the "Time summary calculations" box or the "Pay variable update" box is checked.
- Employee values, with the "Functions / Sequences" button if the "Time summary calculations" box or the "Pay variable update" box is checked.
The TRTSYN processing calls the DATPERSYN entry point when starting the processing and after the extraction periods have been assigned to variables.
The entry point is used to modify these values.
Available variables and masks
Variable or mask |
Definition |
Date DATDEB |
Extraction period start date that corresponds to the pay date |
Date DATFIN |
Extraction period end date that corresponds to the pay date |
Date DMOIS |
Pay month start date |
Date FMOIS |
Pay month end date |
Date REGDEB |
Adjustment start date |
Date REGFIN |
Adjustment end date |
Date DATDEBCAL |
Calendar start date |
Date DATFINCAL |
Calendar end date |
Open tables
Table |
Significant |
Table title |
TIMEMP [TIP] |
Yes |
Employee working times |
PERIOD [PEO] |
Yes |
Extraction period |
EMPLOPAY [PAY] |
Yes |
Employee's payroll information |
EMPLOCPT [CPT] |
Yes |
Employee's accounting information |
EMPLOAD [AD] |
Yes |
Employee's administrative information |
EMPLOCUM [EPC] |
Yes |
Employee totals |
EMPLOID [ID] |
Yes |
Employee's civil status |
EMPLOCTR [CTR] |
Yes |
Employee's employment contract |
EMPLOENT [ENT] |
Yes |
Employee arrival/departure |
EMPLOEXM [EXM] |
Yes |
Employee's degrees |
EMPLOCHD [CHD] |
Yes |
Employee's children |
EMPLOMED [MED] |
Yes |
Employee's medical examinations |
EMPLOTRY [TRY] |
Yes |
Professional experience |
EMPLOPRO [PRO] |
Yes |
Employee's professional status |
EMPLORIB [RIB] |
Yes |
Employee's bank ID |
EMPLOSAL [SAL] |
Yes |
Employee's salary evolution |
HRESEMSYN entry point
When the payroll variables and time synthesis variables are updated, this entry point is used to modify the extraction period dates. This entry point is called before the time synthesis update (TIMRECAP file) and payroll variable update (VALEUR file). The entry point is in the loop updating the SEM_*** variables by week day which then populate the totals per week variables that are used for the calculations of time variables. It comes before the calls to the SPECALTPS scripts.
Context and operating method
In the context of the entry point :
- There is no current transaction
Log file
The GTRACE variable must be tested. If GTRACE<> » » a log file is opened, otherwise GTRACE= » ».
Different call cases
The TRTSYN processing is called from the following functions:
- Time cut-off, if the "Time summary calculations" box or the "Pay variable update" box is checked.
- Employee values, with the "Functions / Sequences" button if the "Time summary calculations" box or the "Pay variable update" box is checked.
The TRTSYN processing calls the HRESEMSYN entry point once during the population by a loop of intermediate variables that give the details by week day (K index of these variables from 1 to 7). The entry point is used to modify these variables before the intermediate variables that give the total by week are updated (variables not indexed).
Available variables and masks
Variable or mask |
Definition |
Char() MATRI |
Employee's ID number |
Date DAT |
Contains the day that is being valuated |
Decimal SEM_TTR Decimal SEM_TRA |
"Working time" hours, indexed by K |
|
"Work" hours (W=GPSW), indexed by K |
Decimal SEM_ABS |
Absence hours, indexed by K |
Decimal TOT_TTR |
Total "working time" hours |
Decimal TOT_TRA |
Total "work" hours (W=GPSW) |
Decimal TOT_ABS |
Total absence hours |
Date DATDEB |
Extraction period start date that corresponds to the pay date |
Date DATFIN |
Extraction period end date that corresponds to the pay date |
Date DMOIS |
Pay month start date |
Date FMOIS |
Pay month end date |
Date DATPAY |
Pay date |
Integer K |
Week day index from 1 to 7 |
Open tables
Table |
Significant |
Table title |
TIMEMP [TIP] |
Yes |
Employee working times |
PERIOD [PEO] |
Yes |
Extraction period |
EMPLOPAY [PAY] |
Yes |
Employee's payroll information |
EMPLOCPT [CPT] |
Yes |
Employee's accounting information |
EMPLOAD [AD] |
Yes |
Employee's administrative information |
EMPLOCUM [EPC] |
Yes |
Employee totals |
EMPLOID [ID] |
Yes |
Employee's civil status |
EMPLOCTR [CTR] |
Yes |
Employee's employment contract |
EMPLOENT [ENT] |
Yes |
Employee arrival/departure |
EMPLOEXM [EXM] |
Yes |
Employee's degrees |
EMPLOCHD [CHD] |
Yes |
Employee's children |
EMPLOMED [MED] |
Yes |
Employee's medical examinations |
EMPLOTRY [TRY] |
Yes |
Professional experience |
EMPLOPRO [PRO] |
Yes |
Employee's professional status |
EMPLORIB [RIB] |
Yes |
Employee's bank ID |
EMPLOSAL [SAL] |
Yes |
Employee's salary evolution |
UPDRECAP entry point
When updating payroll variables and time synthesis variables, this entry point is used to populate payroll variables with other values than those contained in the time synthesis (TIMRECAP table).
Context and operating method
In the context of the entry point :
- There is no current transaction
The entry point is called just before payroll variables are updated with time synthesis values, contained in the TIMRECAP table.
The GPE variable is initialized to 0 before calling the entry point and it is tested when resuming the processing. If GPE<>0, the standard update is not executed.
DATCAR entry point
When the payroll variables and time synthesis variables are updated, this entry point is used to assign a different text of comment on heading.
Context and operating method
In the context of the entry point :
- There is no current transaction
The entry point is called just before the clob containing the comments on heading is updated.
The GPE variable is initialized to 0 before calling the entry point and it is tested when resuming the processing. If GPE<>0, the comment is not updated.
The MESSAGE variable must contain the desired comment.