PYEN Hour Code Setup
Timecard Employees
All employees who require timecards for normal payroll calculations must be accommodated in the PYEN calculations. Either timecard entries must be provided for each pay period in the encumbered range or one of the below alternatives must take place:
Patch by Payline
Creates a timecard set for a specified pay period. You can run this mask for each period in the range prior to running the PYEN process. This approach has the disadvantage that it must be re-run occasionally for any employees with changes that would affect these timecards.
Calc Code
A calc code can be written that calculates the number of hours specified on the employee's calendar. That calc code logic can be added to existing timecard hour definitions or used with a special hour code dedicated to PYEN processing only. The hour code must be added to the pay class where applicable.
<<*************** CALC CODE *****************
--------------------------------------------------------
- C H A N G E L O G *
- *
- Date Ver By Description of Change *
- ======== ===== ==== ===================== *
- 06/18/10 <1.00> LSD CREATED FOR PYEN Hourly Encumb.*
-------------------------------------------------------- - P U R P O S E *
- *
- THIS CALC CODE IS DESIGNED TO RUN ONLY DURING PAYROLL *
- ENCUMBRANCE PROCESS. *
- *
*------------------------------------------------------->>
<<INITIALIZE VARIABLES>>
NVAR0 := 0 <<HOURS>>
CVAR0 := " " <<MENU MASK>>
CVAR1 := " " <<PAY PERIOD>>
NVAR8 := 0 <<COUNTER>>
<< SET TO EXECUTE ONLY DURING PYEN RUN >>
CVAR0 := MSCX.MASK
CVAR0 := CVAR0[1,4]
IF CVAR0 = "PYEN"
CVAR1 := PERM.CC
DO
NVAR8 := NVAR8 + 1
LOAD(PYPX.CLS,NVAR8)
IF MSCX.STATUS = "FAILED"
GOTO LABEL2
ENDIF
NVAR0 := NVAR0 + PYPX.SAL
LABEL2
UNTIL MSCX.STATUS = "FAILED"
HRSX.AMT := NVAR0
IF HRSD.VALDS{10} = "DEBUG"
WARN(" MASK: ",CVAR0)
WARN("PERIOD: ",CVAR1)
WARN(" RATE: ",MSCX.PMRATE)
WARN(" AMT: ",NVAR0)
ENDIF
ENDIFTimecard Encumbrance Hour Code
Contract Encumbrance Hour Code
Contract employees will have the Contract Encumbrance hour entered into their pay classes. This hour code contains a calc code to process contract pay for the employee. Please note that your pay bases may differ from the example.
<<*************** CALC CODE *****************
--------------------------------------------------------
- C H A N G E L O G *
- *
- Date Ver By Description of Change *
- ======== ===== ==== ===================== *
- 06/18/10 <1.00> LSD CREATED FOR xx *
- 03/13/12 <1.01> TES Updated calculation variables *
-------------------------------------------------------- - P U R P O S E *
- *
- THIS CALC CODE IS DESIGNED TO RUN ONLY DURING PAYROLL *
- ENCUMBRANCE PROCESS. *
- *
*------------------------------------------------------->>
<<INITIALIZE VARIABLES>>
NVAR0 := 0 <<SALARY TOTAL>>
NVAR8 := 0 <<COUNTER>>
NVAR9 := 0 <<COUNTER>>
CVAR0 := " " <<MENU MASK>>
<< SET TO EXECUTE ONLY DURING PYEN RUN >>
CVAR0 := MSCX.MASK
CVAR0 := CVAR0[1,4]
IF CVAR0 = "PYEN"
DO
MSCX.STATUS := "FLUSH"
NVAR9 := NVAR9 + 1
LOAD(CTFC.CLS,NVAR9)
IF MSCX.STATUS = "FAILED"
GOTO LABEL1
ENDIF
NVAR8 := 0
NVAR0 := 0
DO
NVAR8 := NVAR8 + 1
LOAD(PYPX.CLS,NVAR8)
IF MSCX.STATUS = "FAILED"
GOTO LABEL2
ENDIF
IF CTFC.CTID = PYPX.CNTID AND PYPX.FROM ="P"
NVAR0 := NVAR0 + PYPX.SAL
ENDIF
LABEL2
UNTIL MSCX.STATUS = "FAILED"
CTFC.CDHAMT := NVAR0
CTFC.CDHPAY := NVAR0
IF HRSD.VALDS{10} = "DEBUG"
WARN(" MASK: ",CVAR0)
WARN(" PERIOD: ",PERM.CD)
WARN("CONTRACT ID: ",CTFC.CTID)
WARN(" SALARY AMT: ",CTFC.CDHPAY)
ENDIF
MSCX.STATUS := "FLUSH"
LABEL1
UNTIL MSCX.STATUS = "FAILED"
ENDIF