1396 lines
44 KiB
Plaintext
Executable File
1396 lines
44 KiB
Plaintext
Executable File
* MSD.INFO.ACCRUAL
|
|
*
|
|
* AUTHOR: SCOTT REDMOND
|
|
* PURPOSE: UTILITY TO MAINTAIN VACATION/SICK ACCRUAL FOR EMPLOYEES
|
|
* DATE: 03/28/95
|
|
*
|
|
*-------------------------------------------------------------------*
|
|
*
|
|
$INCLUDE GEN.COMMON
|
|
$INCLUDE USER
|
|
*
|
|
*-------------------------------------------------------------------*
|
|
*
|
|
OPEN 'USER' TO USER.FILE ELSE ABORT 201, 'USER'
|
|
*OPEN 'CUSTOMER.TRANS' TO CUSTOMER.TRANS ELSE ABORT 201, 'CUSTOMER.TRANS'
|
|
OPEN 'PROJECT' TO PROJECT ELSE ABORT 201, 'PROJECT'
|
|
OPEN 'INFO.ACCRUAL' TO INFO.ACCRUAL ELSE ABORT 201, 'INFO.ACCRUAL'
|
|
OPEN 'PT' TO PT.FILE ELSE ABORT 201, 'PT'
|
|
OPEN 'CLOCKFILE' TO CLOCKFILE ELSE ABORT 201, 'CLOCKFILE'
|
|
OPEN 'CLOCK.GEN.KEYS' TO CLOCK.GEN.KEYS ELSE ABORT 201, 'CLOCK.GEN.KEYS'
|
|
OPEN 'CM' TO CM ELSE ABORT 201, 'CM'
|
|
OPEN 'HP.CONTROL' TO HP.CONTROL ELSE ABORT 201, 'HP.CONTROL'
|
|
*
|
|
*-------------------------------------------------------------------*
|
|
*
|
|
USER.ADD='' ; USER.REC='' ; TODAY=DATE() ; PASSWORD='IXOYE'
|
|
*
|
|
*-------------------------------------------------------------------*
|
|
5 *
|
|
CRT @(0,22):CL:RV:" ENTER PASSWORD TO CONTINUE :":ERV:
|
|
HUSH ON
|
|
INPUT PASS,19
|
|
HUSH OFF
|
|
IF PASS # 'VVSS' THEN STOP
|
|
*
|
|
10 *
|
|
CRT CS
|
|
HDG='MICAHTEK & IDM VACATION/SICK TIME ACCRUAL UTILITY'
|
|
HDL=(80 - LEN(HDG)) / 2
|
|
CRT @(0,0):CL:RV:STR(' ',80):ERV
|
|
CRT @(HDL,0):RV:HDG:ERV:
|
|
*
|
|
100 *------ opening menu ------------------------------------------*
|
|
CRT @(20,5):CL:RV:" 1 - QUICK VIEW ACCRUAL TOTALS ":ERV
|
|
CRT @(20,7):CL:RV:" 2 - RUN CURRENT PAY PERIOD PROCESS ":ERV
|
|
CRT @(20,9):CL:RV:" 3 - ACCRUAL REPORT BY DEPARTMENT ":ERV
|
|
CRT @(20,11):CL:RV:" 4 - UPDATE MANAGERS/USERS RECORDS ":ERV
|
|
CRT @(20,13):CL:RV:" 5 - PRINT DETAIL ACCRUAL REPORT ":ERV
|
|
*
|
|
101 *
|
|
CRT @(0,22):CL:RV:" ENTER SELECTION :":ERV:
|
|
INPUT SELECTION,4
|
|
BEGIN CASE
|
|
CASE SELECTION=PF3 OR SELECTION=''
|
|
STOP
|
|
CASE SELECTION='1'
|
|
GOSUB 1000
|
|
CASE SELECTION='2'
|
|
GOSUB 2000
|
|
CASE SELECTION='3'
|
|
GOSUB 3000
|
|
CASE SELECTION='4'
|
|
GOSUB 5000
|
|
CASE SELECTION='5'
|
|
CALL MSD.ACCRUAL.REPORT
|
|
CASE 1
|
|
GO 101
|
|
END CASE
|
|
GO 10
|
|
*
|
|
9999 *
|
|
STOP
|
|
*
|
|
1000 *--- quick view accrual records ------------------------*
|
|
EXECUTE "EX CLOCK.INFO"
|
|
CRT @(0,22):CL:RV:" PROCESS COMPLETE <return> :":ERV:
|
|
INPUT ANY,2
|
|
RETURN
|
|
*
|
|
2000 *--- run next pay period process / update files --------*
|
|
CRT @(0,1):CR:
|
|
CRT @(20,5):CL:RV:" STEP 1 - PROCESS CLOCKFILE RECORDS ":ERV
|
|
CRT @(20,7):CL:RV:" STEP 2 - PROCESS MANAGER'S RECORDS ":ERV
|
|
CRT @(20,9):CL:RV:" STEP 3 - PROCESS PROJECT RECORDS ":ERV
|
|
*
|
|
READ JEN.REC FROM CLOCK.GEN.KEYS,"NEXT.PAY.PERIOD" ELSE
|
|
*
|
|
* NOTE: IF CLOCK.GEN.KEYS ITEM "NEXT.PAY.PERIOD" IS MISSING:
|
|
* 1.) FIND THE LATEST <UR$LAST.PAY.DATE> IN THE USER FILE.
|
|
* 2.) ADD ONE DAY TO THAT.
|
|
* 3.) EDIT THE CLOCK.GEN.KEYS ITEM AND PUT THAT DATE
|
|
* IN ATTRIBUTE ONE OF THAT ITEM.
|
|
* 4.) START THIS PROCESS OVER AGAIN.
|
|
*
|
|
CRT @(0,22):CL:BEEP:RV:" SERIOUS ERROR - CLOCK.GEN.KEYS (NEXT.PAY.PERIOD) MISSING! ":ERV:
|
|
INPUT ANY,3
|
|
STOP
|
|
END
|
|
PAY.BEGIN=JEN.REC<1>
|
|
2010 *
|
|
CRT @(20,12):CL:RV:" PAY PERIOD BEGIN DATE :":ERV:" ":OCONV(PAY.BEGIN,'D')
|
|
PAY.END=PAY.BEGIN+13
|
|
CRT @(20,14):CL:RV:" PAY PERIOD ENDING DATE:":ERV:" ":OCONV(PAY.END,'D')
|
|
*
|
|
CRT @(0,22):CL:RV:" ENTER 'B' TO BEGIN PROCESSING :":ERV:
|
|
INPUT BEGIN.ANS,5
|
|
IF BEGIN.ANS[1,1] # 'B' THEN RETURN
|
|
IF PAY.END >= TODAY THEN
|
|
CRT @(0,22):CL:BEEP:RV:" ACTIVE PAY PERIOD! TRY AGAIN ON ":OCONV(PAY.END+1,'D'):" <return> :":ERV:
|
|
INPUT ANY,3
|
|
GO 10
|
|
END
|
|
CRT @(0,22):CL:RV:" SELECTING FILE...PLEASE WAIT! ":ERV:
|
|
*
|
|
GOSUB 35000 ;* verify manager records have been updated since last pay
|
|
*
|
|
JEN.REC<1>=PAY.END+1
|
|
WRITE JEN.REC ON CLOCK.GEN.KEYS,"NEXT.PAY.PERIOD"
|
|
CRT @(60,5):CL:RV:" <===== ":ERV:
|
|
*
|
|
USER.ADD='' ; USER.REC='' ; TODAY=DATE() ; WT=0 ; FOUND=0
|
|
SDATE=ICONV('03/26/94','D')
|
|
*
|
|
TIME.TABLE=''
|
|
START=0
|
|
FOR X = SDATE TO TODAY STEP 14
|
|
START=START+1
|
|
TIME.TABLE=INSERT(TIME.TABLE,1,START;X+1)
|
|
TIME.TABLE=INSERT(TIME.TABLE,2,START;X+14)
|
|
TIME.TABLE=INSERT(TIME.TABLE,3,START;START)
|
|
NEXT X
|
|
*
|
|
CLEARFILE INFO.ACCRUAL
|
|
*
|
|
EOF=0 ; T=0 ; FILE.ACCESS='CLOCK FILE'
|
|
SELECT CLOCKFILE
|
|
LOOP
|
|
READNEXT ID ELSE EOF=1
|
|
UNTIL EOF DO
|
|
T=T+1
|
|
IF REM(T,2000)=0 THEN GOSUB 2900 ;* refresh totals
|
|
USER.KEY =OCONV(ID,'G0|1')
|
|
CLOCK.DATE=OCONV(ID,'G1|1')
|
|
IF CLOCK.DATE < PAY.BEGIN OR CLOCK.DATE > PAY.END THEN GO 2500
|
|
READ CLOCK.REC FROM CLOCKFILE,ID THEN
|
|
IF CLOCK.DATE=9582 THEN CLOCK.DATE=9583 ;* start date
|
|
IF CLOCK.DATE < SDATE THEN GO 2500
|
|
READ USR.REC FROM USER.FILE,USER.KEY THEN
|
|
IF USR.REC<UR$CLOCK.SYSTEM># 'C' THEN GO 2500 ;* time clock employee
|
|
FOUND=FOUND+1
|
|
LOCATE(CLOCK.DATE,TIME.TABLE,1;WHR;"AR") THEN NULL
|
|
POSITON=''
|
|
IF CLOCK.DATE = TIME.TABLE<1,WHR> THEN
|
|
POSITION=WHR
|
|
END ELSE
|
|
IF CLOCK.DATE <= TIME.TABLE<2,WHR> THEN
|
|
POSITION=WHR-1
|
|
END
|
|
END
|
|
PERIOD=TIME.TABLE<3,POSITION>
|
|
*----- initialize totals with each user, each day -----*
|
|
OUT.TIME=0 ; IN.TIME=0 ; DAILY.TIME=0
|
|
VAC.TOTAL=0 ; SICK.TOTAL=0 ; HOLIDAY.TOTAL=0 ; OTHER.TOTAL=0
|
|
FUNERAL.TOTAL=0 ; JURY.TOTAL=0 ; WORKMANS.TOTAL=0
|
|
PERSONAL.TOTAL=0 ; BONUS.TOTAL=0
|
|
*
|
|
TIMCT=DCOUNT(CLOCK.REC<1>,VM)
|
|
FOR TIM = 1 TO TIMCT ;* calc daily time
|
|
IF CLOCK.REC<2,TIM>='OFF' THEN
|
|
OUT.TIME=CLOCK.REC<1,TIM>
|
|
DAILY.TIME=DAILY.TIME+(OUT.TIME-IN.TIME)
|
|
END ELSE
|
|
JOB=''
|
|
JOB=OCONV(CLOCK.REC<2,TIM>,'G1-1')
|
|
JOB.TWO=JOB[2,2]'L%3'
|
|
IF JOB[1,1]='V' THEN ;* compute vacation
|
|
VAC.TOTAL=VAC.TOTAL+JOB.TWO
|
|
END
|
|
IF JOB[1,1]='S' THEN ;* compute sick
|
|
SICK.TOTAL=SICK.TOTAL+JOB.TWO
|
|
END
|
|
IF JOB[1,1]='H' THEN ;* compute holiday
|
|
HOLIDAY.TOTAL=HOLIDAY.TOTAL+JOB.TWO
|
|
END
|
|
IF JOB[1,1]='P' THEN ;* personal
|
|
PERSONAL.TOTAL=PERSONAL.TOTAL+JOB.TWO
|
|
END
|
|
IF JOB[1,1]='F' THEN ;* funeral
|
|
FUNERAL.TOTAL=FUNERAL.TOTAL+JOB.TWO
|
|
END
|
|
IF JOB[1,1]='W' THEN ;* workmans comp.
|
|
WORKMANS.TOTAL=WORKMANS.TOTAL+JOB.TWO
|
|
END
|
|
IF JOB[1,1]='B' THEN ;* bonus day
|
|
BONUS.TOTAL=BONUS.TOTAL+JOB.TWO
|
|
END
|
|
IF JOB[1,1]='J' THEN ;* jury duty
|
|
JURY.TOTAL=JURY.TOTAL+JOB.TWO
|
|
END
|
|
IN.TIME=CLOCK.REC<1,TIM>
|
|
END
|
|
NEXT TIM
|
|
DAILY.TIME =(DAILY.TIME/60)/60 ;* convert minutes to hours
|
|
DAILY.HOURS=INT(DAILY.TIME)
|
|
DAILY.DECI =OCONV(DAILY.TIME,'G1.1')[1,3]
|
|
TWO.DECI =DAILY.DECI[1,2]'R%2'
|
|
EXTRA.DECI =DAILY.DECI[3,1]
|
|
IF EXTRA.DECI >= 5 THEN
|
|
IF TWO.DECI=99 THEN
|
|
TWO.DECI='00'
|
|
DAILY.HOURS=DAILY.HOURS+1
|
|
END ELSE
|
|
TWO.DECI=TWO.DECI+1'R%2'
|
|
END
|
|
END ELSE
|
|
IF TWO.DECI=99 THEN
|
|
TWO.DECI='00'
|
|
DAILY.HOURS=DAILY.HOURS+1
|
|
END
|
|
END
|
|
OUTPUT.HOURS=DAILY.HOURS:TWO.DECI
|
|
READ INFO.REC FROM INFO.ACCRUAL,USER.KEY ELSE INFO.REC=''
|
|
OTHER.TOTAL=OTHER.TOTAL+VAC.TOTAL+SICK.TOTAL+HOLIDAY.TOTAL
|
|
OTHER.TOTAL=OTHER.TOTAL+FUNERAL.TOTAL+PERSONAL.TOTAL+BONUS.TOTAL
|
|
OTHER.TOTAL=OTHER.TOTAL+JURY.TOTAL+WORKMANS.TOTAL
|
|
INFO.REC<PERIOD,1>=INFO.REC<PERIOD,1>+OUTPUT.HOURS ;* add hours
|
|
INFO.REC<PERIOD,2>=TIME.TABLE<1,POSITION> ;* beginning period date
|
|
INFO.REC<PERIOD,3>=TIME.TABLE<2,POSITION> ;* ending period date
|
|
INFO.REC<PERIOD,4>=INFO.REC<PERIOD,4>+VAC.TOTAL ;* vacation hours
|
|
INFO.REC<PERIOD,5>=INFO.REC<PERIOD,5>+SICK.TOTAL ;* sick hours used
|
|
INFO.REC<PERIOD,6>=INFO.REC<PERIOD,6>+HOLIDAY.TOTAL ;* holiday hours
|
|
INFO.REC<PERIOD,7>=INFO.REC<PERIOD,7>+OTHER.TOTAL ;* other hours
|
|
INFO.REC<PERIOD,8>=INFO.REC<PERIOD,8>+FUNERAL.TOTAL ;* funeral hours
|
|
INFO.REC<PERIOD,9>=INFO.REC<PERIOD,9>+PERSONAL.TOTAL ;* personal hours
|
|
INFO.REC<PERIOD,10>=INFO.REC<PERIOD,10>+BONUS.TOTAL ;* bonus hours
|
|
INFO.REC<PERIOD,11>=INFO.REC<PERIOD,11>+JURY.TOTAL ;* jury hours
|
|
INFO.REC<PERIOD,12>=INFO.REC<PERIOD,12>+WORKMANS.TOTAL;* work comp hours
|
|
WRITE INFO.REC ON INFO.ACCRUAL,USER.KEY
|
|
WT=WT+1
|
|
END
|
|
END
|
|
2500 *
|
|
REPEAT
|
|
*
|
|
2600 *---- select file & determine hours accrued/used ------------*
|
|
*
|
|
EOF=0 ; T=0 ; WT=0 ; FILE.ACCESS='USER FILE'
|
|
*
|
|
LOCATE(PAY.BEGIN,TIME.TABLE,1;BEGIN.ATT) THEN NULL
|
|
LOCATE(PAY.END,TIME.TABLE,2;END.ATT) THEN NULL
|
|
*
|
|
SELECT INFO.ACCRUAL
|
|
LOOP
|
|
READNEXT ID ELSE EOF=1
|
|
UNTIL EOF DO
|
|
T=T+1
|
|
IF REM(T,25)=0 THEN GOSUB 2900 ;* refresh totals
|
|
TOTAL.HOURS=0 ; VAC.HOURS=0 ; OT.HOURS=0 ; SICK.HOURS=0
|
|
HOL.HOURS=0 ; OTHER.HOURS=0 ; ACCRUAL.HOURS=0
|
|
WORKED.HOURS=0 ; BONUS.HOURS=0 ; JURY.HOURS=0
|
|
WORKMANS.HOURS=0 ; PERSONAL.HOURS=0 ; FUNERAL.HOURS=0
|
|
READ IREC FROM INFO.ACCRUAL,ID THEN
|
|
FOR XTX = BEGIN.ATT TO END.ATT
|
|
TOTAL.HOURS=TOTAL.HOURS+IREC<XTX,1>
|
|
VAC.HOURS =IREC<XTX,4> ;* vacation hours used
|
|
SICK.HOURS =IREC<XTX,5> ;* sick hours used
|
|
HOL.HOURS =IREC<XTX,6> ;* holiday hours used
|
|
OTHER.HOURS =IREC<XTX,7>
|
|
FUNERAL.HOURS =IREC<XTX,8>
|
|
PERSONAL.HOURS =IREC<XTX,9>
|
|
BONUS.HOURS =IREC<XTX,10>
|
|
JURY.HOURS =IREC<XTX,11>
|
|
WORKMANS.HOURS =IREC<XTX,12>
|
|
WORKED.HOURS=TOTAL.HOURS-OTHER.HOURS
|
|
IF WORKED.HOURS > 8000 THEN
|
|
OT.HOURS=WORKED.HOURS-8000
|
|
END ELSE
|
|
OT.HOURS=0
|
|
END
|
|
IF WORKED.HOURS >= 8000 THEN
|
|
ACCRUAL.HOURS=8000
|
|
END ELSE
|
|
ACCRUAL.HOURS=WORKED.HOURS
|
|
END
|
|
REG.HOLD=ACCRUAL.HOURS
|
|
ACCRUAL.HOURS=OCONV(ACCRUAL.HOURS,'MR2')
|
|
READU USERX FROM USER.FILE,ID THEN
|
|
*---- check for probation ----------*
|
|
USERX<UR$OFF.PROBATION>=USERX<UR$HIRE.DATE>+90
|
|
*---- check for part time ----------*
|
|
IF USERX<UR$TYPE.CODE>='P' THEN PART.TIME=1 ELSE PART.TIME=''
|
|
*---- check for managers ----------*
|
|
IF USERX<UR$TYPE.CODE>='M' THEN GO 2699 ;* figured in 2700
|
|
*---- check for inactive status-----*
|
|
IF USERX<UR$STATUS>#'A' THEN GO 2699
|
|
*-----------------------------------*
|
|
IF TODAY <= USERX<UR$HIRE.DATE>+365 THEN ;* 0-1 year
|
|
USERX<UR$CALC.FACTOR>='3.33'
|
|
END
|
|
IF TODAY >= USERX<UR$HIRE.DATE>+365 THEN ;* 2-9 year
|
|
USERX<UR$CALC.FACTOR>='6.67'
|
|
END
|
|
IF TODAY >= USERX<UR$HIRE.DATE>+3650 THEN ;* ten year
|
|
USERX<UR$CALC.FACTOR>='10'
|
|
END
|
|
IF USERX<UR$TYPE.CODE>='M' THEN ;* manager rate
|
|
USERX<UR$CALC.FACTOR>='10'
|
|
END
|
|
CALC.FACTOR=USERX<UR$CALC.FACTOR>
|
|
*--- factors per John Longley 04/03/95 -------*
|
|
IF CALC.FACTOR='3.33' THEN CALC.FACTOR='.020492'
|
|
IF CALC.FACTOR='6.67' THEN CALC.FACTOR='.042735'
|
|
IF CALC.FACTOR='10' THEN CALC.FACTOR='.066964'
|
|
VAC.ACCRUAL=ACCRUAL.HOURS*CALC.FACTOR
|
|
VAC.ONE=OCONV(VAC.ACCRUAL,'G0.1')
|
|
VAC.TWO=OCONV(VAC.ACCRUAL,'G1.1')'L%2'
|
|
VAC.ACCRUAL=VAC.ONE:VAC.TWO[1,2]
|
|
SIK.ACCRUAL=ACCRUAL.HOURS*CALC.FACTOR
|
|
SIK.ONE=OCONV(SIK.ACCRUAL,'G0.1')
|
|
SIK.TWO=OCONV(SIK.ACCRUAL,'G1.1')'L%2'
|
|
SIK.ACCRUAL=SIK.ONE:SIK.TWO[1,2]
|
|
USERX<UR$REGULAR.HOURS> =REG.HOLD
|
|
IF PART.TIME THEN ;* reduce but not accrue vac
|
|
USERX<UR$OT.HOURS> =OT.HOURS
|
|
USERX<UR$HOLIDAY.HOURS> =0
|
|
USERX<UR$FUNERAL.HOURS> =0
|
|
USERX<UR$PERSONAL.HOURS>=0
|
|
USERX<UR$BONUS.HOURS> =0
|
|
USERX<UR$WORKMANS.HOURS>=0
|
|
USERX<UR$JURY.DUTY.HOURS>=0
|
|
USERX<UR$VACATION.HOURS>=VAC.HOURS
|
|
USERX<UR$SICK.HOURS> =0
|
|
USERX<UR$TOTAL.HOURS> =TOTAL.HOURS
|
|
USERX<UR$OTHER.HOURS> =OTHER.HOURS
|
|
USERX<UR$LAST.PAY.DATE> =PAY.END
|
|
USERX<UR$VACATION.AVAIL>=USERX<UR$VACATION.AVAIL>-VAC.HOURS
|
|
END ELSE
|
|
USERX<UR$OT.HOURS> =OT.HOURS
|
|
USERX<UR$HOLIDAY.HOURS> =HOL.HOURS
|
|
USERX<UR$VACATION.HOURS>=VAC.HOURS
|
|
USERX<UR$SICK.HOURS> =SICK.HOURS
|
|
USERX<UR$TOTAL.HOURS> =TOTAL.HOURS
|
|
USERX<UR$FUNERAL.HOURS> =FUNERAL.HOURS
|
|
USERX<UR$PERSONAL.HOURS>=PERSONAL.HOURS
|
|
USERX<UR$BONUS.HOURS> =BONUS.HOURS
|
|
USERX<UR$WORKMANS.HOURS>=WORKMANS.HOURS
|
|
USERX<UR$JURY.DUTY.HOURS>=JURY.HOURS
|
|
USERX<UR$OTHER.HOURS> =OTHER.HOURS
|
|
USERX<UR$LAST.PAY.DATE> =PAY.END
|
|
USERX<UR$VACATION.AVAIL>=USERX<UR$VACATION.AVAIL>+VAC.ACCRUAL-VAC.HOURS
|
|
USERX<UR$SICK.AVAIL>=USERX<UR$SICK.AVAIL>+SIK.ACCRUAL-SICK.HOURS
|
|
END
|
|
WRITE USERX ON USER.FILE,ID ; WT=WT+1
|
|
END
|
|
RELEASE USER.FILE,ID
|
|
NEXT XTX
|
|
END
|
|
2699 *
|
|
REPEAT
|
|
*
|
|
2700 *--- calculate managers totals ---------------------------*
|
|
*
|
|
CRT @(60,5):CL:
|
|
CRT @(60,7):CL:RV:" <===== ":ERV:
|
|
*
|
|
EOF=0 ; T=0 ; WT=0 ; FILE.ACCESS='MANAGER'
|
|
*
|
|
LOCATE(PAY.BEGIN,TIME.TABLE,1;BEGIN.ATT) THEN NULL
|
|
LOCATE(PAY.END,TIME.TABLE,2;END.ATT) THEN NULL
|
|
*
|
|
SELECT USER.FILE
|
|
LOOP
|
|
READNEXT ID ELSE EOF=1
|
|
UNTIL EOF DO
|
|
T=T+1
|
|
IF REM(T,25)=0 THEN GOSUB 2900 ;* refresh totals
|
|
READ MAN.REC FROM USER.FILE,ID ELSE GO 2799
|
|
IF MAN.REC<UR$TYPE.CODE>#'M' THEN GO 2799
|
|
TOTAL.HOURS=0 ; VAC.HOURS=0 ; OT.HOURS=0 ; SICK.HOURS=0
|
|
HOL.HOURS=0 ; OTHER.HOURS=0 ; ACCRUAL.HOURS=0
|
|
WORKED.HOURS=0 ; BONUS.HOURS=0 ; JURY.HOURS=0
|
|
WORKMANS.HOURS=0 ; PERSONAL.HOURS=0 ; FUNERAL.HOURS=0
|
|
*
|
|
TOTAL.HOURS=OCONV(MAN.REC<UR$NEXT.TOTAL>,'MR2')
|
|
VAC.HOURS =OCONV(MAN.REC<UR$NEXT.VACATION>,'MR2')
|
|
SICK.HOURS =OCONV(MAN.REC<UR$NEXT.SICK>,'MR2')
|
|
HOL.HOURS =OCONV(MAN.REC<UR$NEXT.HOLIDAY>,'MR2')
|
|
OT.HOURS =OCONV(MAN.REC<UR$NEXT.OT>,'MR2')
|
|
BONUS.HOURS =OCONV(MAN.REC<UR$NEXT.BONUS>,'MR2')
|
|
JURY.HOURS =OCONV(MAN.REC<UR$NEXT.JURY>,'MR2')
|
|
WORKMANS.HOURS =OCONV(MAN.REC<UR$NEXT.WORKMANS>,'MR2')
|
|
PERSONAL.HOURS =OCONV(MAN.REC<UR$NEXT.PERSONAL>,'MR2')
|
|
FUNERAL.HOURS =OCONV(MAN.REC<UR$NEXT.FUNERAL>,'MR2')
|
|
OTHER.HOURS =OCONV(MAN.REC<UR$NEXT.OTHER>,'MR2')
|
|
*
|
|
ACCRUAL.HOURS =TOTAL.HOURS-OTHER.HOURS
|
|
*---- check for inactive status-----*
|
|
IF MAN.REC<UR$STATUS>#'A' THEN GO 2799
|
|
*-----------------------------------*
|
|
IF MAN.REC<UR$CLOCK.SYSTEM> # 'M' THEN GO 2799
|
|
*-----------------------------------*
|
|
CALC.FACTOR='.066964'
|
|
VAC.ACCRUAL=ACCRUAL.HOURS*CALC.FACTOR
|
|
VAC.ONE=OCONV(VAC.ACCRUAL,'G0.1')
|
|
VAC.TWO=OCONV(VAC.ACCRUAL,'G1.1')'L%2'
|
|
VAC.ACCRUAL=VAC.ONE:VAC.TWO[1,2]
|
|
SIK.ACCRUAL=ACCRUAL.HOURS*CALC.FACTOR
|
|
SIK.ONE=OCONV(SIK.ACCRUAL,'G0.1')
|
|
SIK.TWO=OCONV(SIK.ACCRUAL,'G1.1')'L%2'
|
|
SIK.ACCRUAL=SIK.ONE:SIK.TWO[1,2]
|
|
MAN.REC<UR$REGULAR.HOURS> =MAN.REC<UR$NEXT.REG>
|
|
MAN.REC<UR$OT.HOURS> =MAN.REC<UR$NEXT.OT>
|
|
MAN.REC<UR$OTHER.HOURS> =MAN.REC<UR$NEXT.OTHER>
|
|
MAN.REC<UR$VACATION.HOURS>=MAN.REC<UR$NEXT.VACATION>
|
|
MAN.REC<UR$SICK.HOURS> =MAN.REC<UR$NEXT.SICK>
|
|
MAN.REC<UR$FUNERAL.HOURS> =MAN.REC<UR$NEXT.FUNERAL>
|
|
MAN.REC<UR$HOLIDAY.HOURS> =MAN.REC<UR$NEXT.HOLIDAY>
|
|
MAN.REC<UR$PERSONAL.HOURS>=MAN.REC<UR$NEXT.PERSONAL>
|
|
MAN.REC<UR$JURY.DUTY.HOURS>=MAN.REC<UR$NEXT.JURY>
|
|
MAN.REC<UR$BONUS.HOURS> =MAN.REC<UR$NEXT.BONUS>
|
|
MAN.REC<UR$WORKMANS.HOURS>=MAN.REC<UR$NEXT.WORKMANS>
|
|
MAN.REC<UR$TOTAL.HOURS> =MAN.REC<UR$NEXT.TOTAL>
|
|
MAN.REC<UR$LAST.PAY.DATE> =PAY.END
|
|
MAN.REC<UR$VACATION.AVAIL>=MAN.REC<UR$VACATION.AVAIL>+VAC.ACCRUAL-VAC.HOURS
|
|
MAN.REC<UR$SICK.AVAIL> =MAN.REC<UR$SICK.AVAIL>+SIK.ACCRUAL-SICK.HOURS
|
|
*--- clear next info attributes -----*
|
|
MAN.REC<UR$NEXT.REG> =0
|
|
MAN.REC<UR$NEXT.OT> =0
|
|
MAN.REC<UR$NEXT.HOLIDAY> =0
|
|
MAN.REC<UR$NEXT.VACATION> =0
|
|
MAN.REC<UR$NEXT.SICK> =0
|
|
MAN.REC<UR$NEXT.TOTAL> =0
|
|
MAN.REC<UR$NEXT.FUNERAL> =0
|
|
MAN.REC<UR$NEXT.PERSONAL> =0
|
|
MAN.REC<UR$NEXT.JURY> =0
|
|
MAN.REC<UR$NEXT.WORKMANS> =0
|
|
MAN.REC<UR$NEXT.BONUS> =0
|
|
MAN.REC<UR$NEXT.OTHER> =0
|
|
WRITE MAN.REC ON USER.FILE,ID ; WT=WT+1
|
|
RELEASE USER.FILE,ID
|
|
2799 *
|
|
REPEAT
|
|
*
|
|
GO 55555 ;*********** TEMP
|
|
*
|
|
2800 *--- process project (programmers) records ---------------*
|
|
CRT @(60,7):CL:
|
|
CRT @(60,9):CL:RV:" <===== ":ERV:
|
|
*
|
|
EOF=0 ; T=0 ; WT=0 ; FILE.ACCESS='PROJECT'
|
|
*
|
|
LOCATE(PAY.BEGIN,TIME.TABLE,1;BEGIN.ATT) THEN NULL
|
|
LOCATE(PAY.END,TIME.TABLE,2;END.ATT) THEN NULL
|
|
*
|
|
SELECT CUSTOMER.TRANS
|
|
*
|
|
LOOP
|
|
READNEXT ID ELSE EOF=1
|
|
UNTIL EOF DO
|
|
T=T+1
|
|
IF REM(T,100)=0 THEN GOSUB 2900 ;* refresh totals
|
|
READ CUST.REC FROM CUSTOMER.TRANS,ID ELSE GO 2899
|
|
READ PRO.REC FROM USER.FILE,ID ELSE GO 2899
|
|
IF PRO.REC<UR$TYPE.CODE>#'P' THEN GO 2899
|
|
TOTAL.HOURS=0 ; VAC.HOURS=0 ; OT.HOURS=0 ; SICK.HOURS=0
|
|
HOL.HOURS=0 ; OTHER.HOURS=0 ; ACCRUAL.HOURS=0
|
|
WORKED.HOURS=0
|
|
*
|
|
ACCRUAL.HOURS=TOTAL.HOURS-VAC.HOURS-SICK.HOURS-HOL.HOURS
|
|
*---- check for probation ----------*
|
|
PRO.REC<UR$OFF.PROBATION>=PRO.REC<UR$HIRE.DATE>+90
|
|
*---- check for part time ----------*
|
|
IF PRO.REC<UR$TYPE.CODE>='P' THEN GO 2899
|
|
*---- check for inactive status-----*
|
|
IF PRO.REC<UR$STATUS>#'A' THEN GO 2899
|
|
*-----------------------------------*
|
|
IF PRO.REC<UR$CLOCK.SYSTEM>#'P' THEN GO 2899 ;* project only
|
|
*-----------------------------------*
|
|
IF TODAY <= PRO.REC<UR$HIRE.DATE>+365 THEN ;* 0-1 year
|
|
PRO.REC<UR$CALC.FACTOR>='3.33'
|
|
END
|
|
IF TODAY >= PRO.REC<UR$HIRE.DATE>+365 THEN ;* 2-9 year
|
|
PRO.REC<UR$CALC.FACTOR>='6.67'
|
|
END
|
|
IF TODAY >= PRO.REC<UR$HIRE.DATE>+3650 THEN ;* ten year
|
|
PRO.REC<UR$CALC.FACTOR>='10'
|
|
END
|
|
CALC.FACTOR=PRO.REC<UR$CALC.FACTOR>
|
|
IF CALC.FACTOR='3.33' THEN CALC.FACTOR='.020492'
|
|
IF CALC.FACTOR='6.67' THEN CALC.FACTOR='.042735'
|
|
IF CALC.FACTOR='10' THEN CALC.FACTOR='.066964'
|
|
VAC.ACCRUAL=ACCRUAL.HOURS*CALC.FACTOR
|
|
VAC.ONE=OCONV(VAC.ACCRUAL,'G0.1')
|
|
VAC.TWO=OCONV(VAC.ACCRUAL,'G1.1')'L%2'
|
|
VAC.ACCRUAL=VAC.ONE:VAC.TWO[1,2]
|
|
SIK.ACCRUAL=ACCRUAL.HOURS*CALC.FACTOR
|
|
SIK.ONE=OCONV(SIK.ACCRUAL,'G0.1')
|
|
SIK.TWO=OCONV(SIK.ACCRUAL,'G1.1')'L%2'
|
|
SIK.ACCRUAL=SIK.ONE:SIK.TWO[1,2]
|
|
PRO.REC<UR$REGULAR.HOURS> =WORKED.HOURS
|
|
PRO.REC<UR$OT.HOURS> =OT.HOURS
|
|
PRO.REC<UR$HOLIDAY.HOURS> =HOL.HOURS
|
|
PRO.REC<UR$VACATION.HOURS>=VAC.HOURS
|
|
PRO.REC<UR$SICK.HOURS> =SICK.HOURS
|
|
PRO.REC<UR$TOTAL.HOURS> =TOTAL.HOURS
|
|
PRO.REC<UR$LAST.PAY.DATE> =PAY.END
|
|
PRO.REC<UR$VACATION.AVAIL>=PRO.REC<UR$VACATION.AVAIL>+VAC.ACCRUAL-VAC.HOURS
|
|
PRO.REC<UR$SICK.AVAIL> =PRO.REC<UR$SICK.AVAIL>+SIK.ACCRUAL-SICK.HOURS
|
|
*--- clear next info attributes -----*
|
|
PRO.REC<UR$NEXT.REG> =0
|
|
PRO.REC<UR$NEXT.OT> =0
|
|
PRO.REC<UR$NEXT.HOLIDAY> =0
|
|
PRO.REC<UR$NEXT.VACATION> =0
|
|
PRO.REC<UR$NEXT.SICK> =0
|
|
PRO.REC<UR$NEXT.TOTAL> =0
|
|
WRITE PRO.REC ON USER.FILE,ID ; WT=WT+1
|
|
RELEASE USER.FILE,ID
|
|
2899 *
|
|
REPEAT
|
|
*
|
|
55555 * ;* TEMP
|
|
*
|
|
CRT @(0,22):CL:RV:" PROCESS COMPLETE <return> :":ERV:
|
|
INPUT ANY,3
|
|
RETURN
|
|
|
|
2900 *--- refrsh processing totals ----------------------------*
|
|
LINE=''
|
|
LINE=FILE.ACCESS:" RECORDS READ :"
|
|
CRT @(20,16):CR:LINE'L#25':":":T'L,'
|
|
CRT @(20,17):CL:"RECORDS FOUND :":WT'L,'
|
|
RETURN
|
|
*
|
|
3000 *--- print accrual report ------------------------------*
|
|
CRT @(0,0):CL:RV:STR(' ',80):ERV
|
|
CRT @(HDL,0):RV:HDG:ERV:
|
|
DEPT='ALL'
|
|
READ LAND FROM HP.CONTROL,'LANDSCAPE' ELSE LAND=''
|
|
READ SMALL FROM HP.CONTROL,'16.PITCH' ELSE SMALL=''
|
|
CRT @(0,1):CR:
|
|
CRT @(17,3):CL:RV:" CREATE / PRINT ACCRUAL REPORTS BY DEPARTMENT ":ERV:
|
|
CRT @(27,5):CL:RV:" 1 - SPECIAL ACCOUNTS ":ERV:
|
|
CRT @(27,7):CL:RV:" 2 - PERSONNEL ":ERV:
|
|
CRT @(27,9):CL:RV:" 3 - PROGRAMMING ":ERV:
|
|
CRT @(27,11):CL:RV:" 4 - PHONE CENTER ":ERV:
|
|
CRT @(27,13):CL:RV:" 5 - WOF PROCESSING ":ERV:
|
|
CRT @(27,15):CL:RV:" 6 - WAREHOUSE ":ERV:
|
|
CRT @(27,17):CL:RV:" 7 - ALL DEPARTMENTS ":ERV:
|
|
CRT @(0,22):CL:RV:" ENTER DEPARTMENT : ":ERV:
|
|
INPUT DEPT,9
|
|
IF DEPT='' OR DEPT=PF3 THEN RETURN
|
|
IF NUM(DEPT) ELSE GO 3000
|
|
CRT @(0,22):CL:RV:" SEND REPORT TO PRINTER (Y/N) :":ERV:
|
|
INPUT PRINTER.ANS,3
|
|
IF PRINTER.ANS[1,1]='Y' THEN
|
|
CRT @(0,18):CR:
|
|
EXECUTE "EX PRINTER"
|
|
CRT @(0,18):CR:
|
|
END
|
|
CMD=''
|
|
CMD='SORT USER '
|
|
CMD=CMD:' FNAME LNAME BREAK.ON DEPT STATUS TOTAL VAC TOTAL SICK '
|
|
CMD=CMD:'BY DEPT BY LNAME BY FNAME'
|
|
CMD=CMD:' WITH DEPT '
|
|
BEGIN CASE
|
|
CASE DEPT='1'
|
|
CMD=CMD:' \511\ '
|
|
CASE DEPT='2'
|
|
CMD=CMD:' \517\ '
|
|
CASE DEPT='3'
|
|
CMD=CMD:' \504\\512\ '
|
|
CASE DEPT='4'
|
|
CMD=CMD:' \800\ '
|
|
CASE DEPT='5'
|
|
CMD=CMD:' \500\\501\\502\\503\\505\\509\\514\\525\ '
|
|
CASE DEPT='6'
|
|
CMD=CMD:' \506\\507\ '
|
|
CASE DEPT='7'
|
|
CASE DEPT='8'
|
|
END CASE
|
|
IF PRINTER.ANS='Y' THEN
|
|
CMD=CMD:\ HEADING "PAGE 'P' ACCRUAL REPORT BY DEPARTMENT 'D' 'L' 'L'" (P \
|
|
END ELSE
|
|
CMD=CMD:\ HEADING "PAGE 'P' ACCRUAL REPORT BY DEPARTMENT 'D' 'L' 'L'" \
|
|
END
|
|
*HUSH ON
|
|
EXECUTE CMD
|
|
*HUSH OFF
|
|
CRT @(0,22):CL:RV:" REPORT COMPLETE <return> :":ERV:
|
|
INPUT ANY,2
|
|
GO 3000
|
|
RETURN
|
|
*
|
|
5000 *--- update manager/user records ------------------------*
|
|
CRT @(0,1):CR
|
|
*
|
|
GOSUB 5800 ;* refresh main screen
|
|
*
|
|
5001 *
|
|
CRT @(0,22):CL:RV:" ENTER USER CODE OR LAST NAME (OR PARTIAL LAST NAME) ":ERV:
|
|
CRT @(5,3):CL:RV:" USER CODE/LAST NAME :":ERV:
|
|
INPUT REQUEST,30
|
|
IF REQUEST=PF3 OR REQUEST='' THEN GO 10
|
|
IF NUM(REQUEST) THEN
|
|
READ USER.REC FROM USER.FILE,REQUEST THEN
|
|
USER.CODE=REQUEST
|
|
HOLD.REC=USER.REC
|
|
GOSUB 5850 ;* display data
|
|
GOSUB 5875 ;* display last pay period data
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" USER NOT ON FILE 'A'dd :":ERV:
|
|
INPUT ADD.ANS,4
|
|
IF ADD.ANS[1,1]='A' THEN
|
|
USER.CODE=REQUEST
|
|
USER.REC=''
|
|
ADD.USER=1
|
|
UPDATE=''
|
|
GO 5010 ;* input data in fields
|
|
END
|
|
GO 5001 ;* return to prompt
|
|
END
|
|
END ELSE
|
|
GOSUB 10000 ;* search & display users meeting criteria
|
|
HOLD.REC=USER.REC
|
|
GOSUB 5800 ;* display main screen
|
|
GOSUB 5850 ;* display data
|
|
GOSUB 5875 ;* display last pay period data
|
|
END
|
|
*
|
|
5005 *---- main screen prompt -----------------------------------*
|
|
CRT @(0,22):CL:RV:" ENTER # to change, 'N'ext period, 'L'ast period, 'E'nd, :":ERV:
|
|
INPUT FIVE.ANS,8
|
|
BEGIN CASE
|
|
CASE NUM(FIVE.ANS)
|
|
IF FIVE.ANS >= 1 AND FIVE.ANS <= 23 THEN
|
|
UPDATE=1
|
|
ON FIVE.ANS GOSUB 5010,5020,5030,5040,5050,5060,5070,5080,5090,5100,5110,5120,5130,5140,5150,5160,5161,5162,5163,5164,5165,5170,5170
|
|
UPDATE=''
|
|
END
|
|
CASE FIVE.ANS='VV' ; GOSUB 30000
|
|
CASE FIVE.ANS='SS' ; GOSUB 31000
|
|
CASE FIVE.ANS='DELETE' ; GOSUB 32000
|
|
CASE FIVE.ANS='N'
|
|
IF USER.REC<UR$TYPE.CODE> # 'M' THEN
|
|
CRT @(0,22):CL:BEEP:RV:" THIS USER IS NOT A MANAGER! <return> :":ERV:
|
|
INPUT ANY,3 ; GO 5005
|
|
END
|
|
GOSUB 5885 ;* display next period data
|
|
CASE FIVE.ANS='L' ; GOSUB 5875 ;* display last period data
|
|
CASE FIVE.ANS='E'
|
|
GOSUB 7000 ;* write record
|
|
GO 5000 ;* return to screen prompt
|
|
CASE FIVE.ANS=PF3
|
|
IF USER.REC # HOLD.REC THEN
|
|
5007 *
|
|
CRT @(0,22):CL:BEEP:RV:" RECORD HAS BEEN UPDATED! 'X'exit or 'S'ave changes :":ERV:
|
|
INPUT SAVE.ANS,5
|
|
IF SAVE.ANS[1,1]='S' THEN
|
|
GOSUB 7000 ;* write changes
|
|
GO 5000
|
|
END
|
|
IF SAVE.ANS[1,1]='X' THEN GO 5000 ;* return to user prompt
|
|
GO 5007
|
|
END ELSE
|
|
CRT @(0,22):CL:RV:" RECORD HAS NOT BEEN UPDATED! <return> :":ERV:
|
|
INPUT ANY,4
|
|
GO 5000 ;* return to user prompt
|
|
END
|
|
CASE 1
|
|
GO 5005
|
|
END CASE
|
|
GO 5005
|
|
*
|
|
5010 *--- add/update user code ----------------------------------*
|
|
HOLD=''
|
|
IF UPDATE THEN
|
|
CRT @(0,22):CL:BEEP:RV:" THE USER CODE MAY NOT BE UPDATED! ":ERV:
|
|
INPUT ANY
|
|
RETURN
|
|
END ELSE
|
|
CRT @(25,5):USER.CODE'L#20'
|
|
END
|
|
*
|
|
5020 *--- add/update last name ----------------------------------*
|
|
HOLD=''
|
|
IF UPDATE THEN HOLD=USER.REC<UR$LNAME> ELSE HOLD=''
|
|
CRT @(0,22):CL:RV:" ENTER THE USER LAST NAME ":ERV:
|
|
CRT @(25,6):HOLD'L#15'
|
|
CRT @(24,6):
|
|
INPUT LNAME,15
|
|
IF LNAME='' THEN LNAME=HOLD
|
|
IF LNAME=PF3 THEN STOP
|
|
IF LNAME='' OR LNAME='*' THEN GO 5020
|
|
CRT @(25,6):LNAME'L#15'
|
|
USER.REC<UR$LNAME>=LNAME
|
|
IF UPDATE THEN RETURN
|
|
*
|
|
5030 *--- add/update first name ---------------------------------*
|
|
HOLD=''
|
|
IF UPDATE THEN HOLD=USER.REC<UR$FNAME> ELSE HOLD=''
|
|
CRT @(0,22):CL:RV:" ENTER THE USER FIRST NAME ":ERV:
|
|
CRT @(25,7):HOLD'L#15'
|
|
CRT @(24,7):
|
|
INPUT FNAME,15
|
|
IF FNAME='' THEN FNAME=HOLD
|
|
IF FNAME=PF3 THEN STOP
|
|
IF FNAME='' OR FNAME='*' THEN GO 5030
|
|
CRT @(25,7):FNAME'L#15'
|
|
USER.REC<UR$FNAME>=FNAME
|
|
IF UPDATE THEN RETURN
|
|
*
|
|
5040 *--- add/update department ---------------------------------*
|
|
HOLD=''
|
|
IF UPDATE THEN HOLD=USER.REC<UR$DEPT> ELSE HOLD=''
|
|
CRT @(0,22):CL:RV:" ENTER THE USER DEPARTMENT ":ERV:
|
|
CRT @(25,8):HOLD'L#15'
|
|
CRT @(24,8):
|
|
INPUT DEPT,20
|
|
IF DEPT='' THEN DEPT=HOLD
|
|
IF DEPT=PF3 THEN STOP
|
|
IF DEPT='' OR DEPT='*' THEN GO 5040
|
|
CRT @(25,8):DEPT'L#15'
|
|
USER.REC<UR$DEPT>=DEPT
|
|
IF UPDATE THEN RETURN
|
|
*
|
|
5050 *--- add/update type code ---------------------------------*
|
|
HOLD=''
|
|
IF UPDATE THEN HOLD=USER.REC<UR$TYPE.CODE> ELSE HOLD=''
|
|
CRT @(0,22):CL:RV:" ENTER USER TYPE CODE 'M'anager, 'F'ull-time, 'P'art-time ":ERV:
|
|
CRT @(25,9):HOLD'L#15'
|
|
CRT @(24,9):
|
|
INPUT TYPE.CODE,4
|
|
IF TYPE.CODE='' THEN TYPE.CODE=HOLD
|
|
IF TYPE.CODE=PF3 THEN STOP
|
|
IF TYPE.CODE='' OR TYPE.CODE='*' THEN GO 5050
|
|
IF TYPE.CODE='M' OR TYPE.CODE='F' OR TYPE.CODE='P' ELSE GO 5050
|
|
CRT @(25,9):TYPE.CODE'L#15'
|
|
USER.REC<UR$TYPE.CODE>=TYPE.CODE
|
|
IF UPDATE THEN RETURN
|
|
*
|
|
5060 *--- add/update status -------------------------------------*
|
|
HOLD=''
|
|
IF UPDATE THEN HOLD=USER.REC<UR$STATUS> ELSE HOLD=''
|
|
CRT @(0,22):CL:RV:" ENTER THE USER STATUS 'A'ctive, 'I'nactive :":ERV:
|
|
CRT @(25,10):HOLD'L#15'
|
|
CRT @(24,10):
|
|
INPUT STATUS.CODE,4
|
|
IF STATUS.CODE='' THEN STATUS.CODE=HOLD
|
|
IF STATUS.CODE=PF3 THEN STOP
|
|
IF STATUS.CODE='' OR STATUS.CODE='*' THEN GO 5060
|
|
IF STATUS.CODE='A' OR STATUS.CODE='I' ELSE GO 5060
|
|
CRT @(25,10):STATUS.CODE'L#15'
|
|
USER.REC<UR$STATUS>=STATUS.CODE
|
|
IF UPDATE THEN RETURN
|
|
*
|
|
5070 *--- add/update hire date ----------------------------------*
|
|
HOLD=''
|
|
IF UPDATE THEN HOLD=USER.REC<UR$HIRE.DATE> ELSE HOLD=''
|
|
CRT @(0,22):CL:RV:" ENTER THE USER HIRE DATE ":ERV:
|
|
CRT @(25,11):OCONV(HOLD,'D2/')'L#15'
|
|
CRT @(24,11):
|
|
INPUT HIRE.DATE,20
|
|
IF HIRE.DATE='' THEN HIRE.DATE=OCONV(HOLD,'D')
|
|
IF HIRE.DATE=PF3 THEN STOP
|
|
HIRE.DATE=ICONV(HIRE.DATE,'D')
|
|
IF HIRE.DATE='' OR HIRE.DATE='*' THEN GO 5070
|
|
IF HIRE.DATE <= 0 THEN GO 5070
|
|
CRT @(25,11):OCONV(HIRE.DATE,'D2/')'L#15'
|
|
USER.REC<UR$HIRE.DATE>=HIRE.DATE
|
|
IF UPDATE THEN RETURN
|
|
*
|
|
5080 *--- add/update calc factor --------------------------------*
|
|
HOLD=''
|
|
IF UPDATE THEN HOLD=USER.REC<UR$CALC.FACTOR> ELSE HOLD=''
|
|
CRT @(0,22):CL:RV:" ENTER CALCULATION FACTOR (0-1yr = 3.33, 2-9yr = 6.67, Mgr=10) ":ERV:
|
|
CRT @(25,12):HOLD'L#15'
|
|
CRT @(24,12):
|
|
INPUT CALC.FACTOR,20
|
|
IF CALC.FACTOR='' THEN CALC.FACTOR=HOLD
|
|
IF CALC.FACTOR=PF3 THEN STOP
|
|
IF CALC.FACTOR='3' THEN CALC.FACTOR='3.33'
|
|
IF CALC.FACTOR='6' THEN CALC.FACTOR='6.67'
|
|
IF CALC.FACTOR='3.33' OR CALC.FACTOR=0 OR CALC.FACTOR='6.67' OR CALC.FACTOR='10' ELSE GO 5080
|
|
CRT @(25,12):CALC.FACTOR'L#15'
|
|
USER.REC<UR$CALC.FACTOR>=CALC.FACTOR
|
|
IF UPDATE THEN RETURN
|
|
*
|
|
5090 *--- add/update clock system -------------------------------*
|
|
HOLD=''
|
|
IF UPDATE THEN HOLD=USER.REC<UR$CLOCK.SYSTEM> ELSE HOLD=''
|
|
CRT @(0,22):CL:RV:" ENTER THE USER CLOCK SYSTEM: 'C'lock, 'P'roject, 'M'anager ":ERV:
|
|
CRT @(25,13):HOLD'L#15'
|
|
CRT @(24,13):
|
|
INPUT CLOCK.SYSTEM,3
|
|
IF CLOCK.SYSTEM='' THEN CLOCK.SYSTEM=HOLD
|
|
IF CLOCK.SYSTEM=PF3 THEN STOP
|
|
IF CLOCK.SYSTEM='' OR CLOCK.SYSTEM='*' THEN GO 5090
|
|
IF CLOCK.SYSTEM='C' OR CLOCK.SYSTEM='P' OR CLOCK.SYSTEM='M' ELSE GO 5090
|
|
CRT @(25,13):CLOCK.SYSTEM'L#15'
|
|
USER.REC<UR$CLOCK.SYSTEM>=CLOCK.SYSTEM
|
|
IF UPDATE THEN RETURN
|
|
*
|
|
5100 *--- add/update last update date----------------------------*
|
|
HOLD=''
|
|
IF UPDATE THEN
|
|
CRT @(0,22):CL:BEEP:RV:" SYSTEM UPDATED FIELD - CANNOT UPDATE! ":ERV:
|
|
INPUT ANY
|
|
RETURN
|
|
END ELSE
|
|
CRT @(25,14):OCONV(TODAY,'D2/')
|
|
END
|
|
5110 *--- add/update operator ----------------------------------*
|
|
UNK.SW=''
|
|
PORT=FIELD(OCONV(0, "U50BB")," ",1)
|
|
READ PT.REC FROM PT.FILE,PORT ELSE
|
|
UNK.SW=1
|
|
ADD.OPER='UNKNOWN'
|
|
ADD.LNAME=''
|
|
END
|
|
IF NOT(UNK.SW) THEN
|
|
ADD.OPER=PT.REC<1>
|
|
ADD.FNAME=PT.REC<2>
|
|
ADD.LNAME=PT.REC<3>
|
|
END
|
|
HOLD=''
|
|
IF UPDATE THEN
|
|
CRT @(0,22):CL:BEEP:RV:" SYSTEM UPDATED FIELD - CANNOT UPDATE! ":ERV:
|
|
INPUT ANY
|
|
RETURN
|
|
END ELSE
|
|
CRT @(25,15):ADD.OPER:" ":ADD.LNAME'L#14'
|
|
END
|
|
*
|
|
GO 5005 ;* return to prompt after adding
|
|
*
|
|
5120 *--- add/update regular time -------------------------------*
|
|
IF NEXT.FLAG THEN
|
|
CRT @(0,22):CL:RV:" ENTER THE TIME (In Quarter-hour increments, Ex. 14.25) ":ERV:
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN=''
|
|
HOLD=USER.REC<UR$NEXT.REG>'R26'
|
|
CRT @(70,4):HOLD'L#6'
|
|
CRT @(69,4):
|
|
INPUT REG.HRS,7
|
|
IF REG.HRS='' THEN REG.HRS=(HOLD*100)'R26'
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
GO 5120
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM'R%2':TWO.NUM'L%2'
|
|
END
|
|
CRT @(70,4):REG.HRS'L26(#5)'
|
|
USER.REC<UR$NEXT.REG>=REG.HRS
|
|
*
|
|
GOSUB 5175 ;* calc total time
|
|
*
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" CANNOT UPDATE LAST PERIOD TOTALS! <return> :":ERV:
|
|
INPUT ANY,3
|
|
END
|
|
RETURN
|
|
5130 *--- add/update overtime -----------------------------------*
|
|
IF NEXT.FLAG THEN
|
|
CRT @(0,22):CL:RV:" ENTER THE TIME (In Quarter-hour increments, Ex. 14.25) ":ERV:
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
|
HOLD=USER.REC<UR$NEXT.OT>'R26'
|
|
CRT @(70,5):HOLD'L#6'
|
|
CRT @(69,5):
|
|
INPUT REG.HRS,7
|
|
IF REG.HRS='' THEN REG.HRS=(HOLD*100)'R26'
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
GO 5130
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM'R%2':TWO.NUM'L%2'
|
|
END
|
|
CRT @(70,5):REG.HRS'L26(#5)'
|
|
USER.REC<UR$NEXT.OT>=REG.HRS
|
|
*
|
|
GOSUB 5175 ;* calc total time
|
|
*
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" CANNOT UPDATE LAST PERIOD TOTALS! <return> :":ERV:
|
|
INPUT ANY,3
|
|
END
|
|
RETURN
|
|
5140 *--- add/update vacation time ---------------------------------*
|
|
IF NEXT.FLAG THEN
|
|
CRT @(0,22):CL:RV:" ENTER THE TIME (In Quarter-hour increments, Ex. 14.25) ":ERV:
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
|
HOLD=USER.REC<UR$NEXT.VACATION>'R26'
|
|
CRT @(70,6):HOLD'L#6'
|
|
CRT @(69,6):
|
|
INPUT REG.HRS,7
|
|
IF REG.HRS='' THEN REG.HRS=(HOLD*100)'R26'
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
GO 5140
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM'R%2':TWO.NUM'L%2'
|
|
END
|
|
CRT @(70,6):REG.HRS'L26(#5)'
|
|
USER.REC<UR$NEXT.VACATION>=REG.HRS
|
|
*
|
|
GOSUB 5175 ;* calc total time
|
|
*
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" CANNOT UPDATE LAST PERIOD TOTALS! <return> :":ERV:
|
|
INPUT ANY,3
|
|
END
|
|
RETURN
|
|
5150 *--- add/update sick used--------------------------------*
|
|
IF NEXT.FLAG THEN
|
|
CRT @(0,22):CL:RV:" ENTER THE TIME (In Quarter-hour increments, Ex. 14.25) ":ERV:
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
|
HOLD=USER.REC<UR$NEXT.SICK>'R26'
|
|
CRT @(70,7):HOLD'L#6'
|
|
CRT @(69,7):
|
|
INPUT REG.HRS,7
|
|
IF REG.HRS='' THEN REG.HRS=(HOLD*100)'R26'
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
GO 5150
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM'R%2':TWO.NUM'L%2'
|
|
END
|
|
CRT @(70,7):REG.HRS'L26(#5)'
|
|
USER.REC<UR$NEXT.SICK>=REG.HRS
|
|
*
|
|
GOSUB 5175 ;* calc total time
|
|
*
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" CANNOT UPDATE LAST PERIOD TOTALS! <return> :":ERV:
|
|
INPUT ANY,3
|
|
END
|
|
RETURN
|
|
5160 *--- add/update holiday used ---------------------------------*
|
|
IF NEXT.FLAG THEN
|
|
CRT @(0,22):CL:RV:" ENTER THE TIME (In Quarter-hour increments, Ex. 14.25) ":ERV:
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN=''
|
|
HOLD=USER.REC<UR$NEXT.HOLIDAY>'R26'
|
|
CRT @(70,8):HOLD'L#6'
|
|
CRT @(69,8):
|
|
INPUT REG.HRS,7
|
|
IF REG.HRS='' THEN REG.HRS=(HOLD*100)'R26'
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
GO 5160
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM'R%2':TWO.NUM'L%2'
|
|
END
|
|
CRT @(70,8):REG.HRS'L26(#5)'
|
|
USER.REC<UR$NEXT.HOLIDAY>=REG.HRS
|
|
*
|
|
GOSUB 5175 ;* calc total time
|
|
*
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" CANNOT UPDATE LAST PERIOD TOTALS! <return> :":ERV:
|
|
INPUT ANY,3
|
|
END
|
|
RETURN
|
|
5161 *--- add/update funeral used--------------------------------*
|
|
IF NEXT.FLAG THEN
|
|
CRT @(0,22):CL:RV:" ENTER THE TIME (In Quarter-hour increments, Ex. 14.25) ":ERV:
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
|
HOLD=USER.REC<UR$NEXT.FUNERAL>'R26'
|
|
CRT @(70,9):HOLD'L#6'
|
|
CRT @(69,9):
|
|
INPUT REG.HRS,7
|
|
IF REG.HRS='' THEN REG.HRS=(HOLD*100)'R26'
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
GO 5150
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM'R%2':TWO.NUM'L%2'
|
|
END
|
|
CRT @(70,9):REG.HRS'L26(#5)'
|
|
USER.REC<UR$NEXT.FUNERAL>=REG.HRS
|
|
*
|
|
GOSUB 5175 ;* calc total time
|
|
*
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" CANNOT UPDATE LAST PERIOD TOTALS! <return> :":ERV:
|
|
INPUT ANY,3
|
|
END
|
|
RETURN
|
|
5162 *---- add/update personal time -------------------------------*
|
|
IF NEXT.FLAG THEN
|
|
CRT @(0,22):CL:RV:" ENTER THE TIME (In Quarter-hour increments, Ex. 14.25) ":ERV:
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
|
HOLD=USER.REC<UR$NEXT.PERSONAL>'R26'
|
|
CRT @(70,10):HOLD'L#6'
|
|
CRT @(69,10):
|
|
INPUT REG.HRS,7
|
|
IF REG.HRS='' THEN REG.HRS=(HOLD*100)'R26'
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
GO 5150
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM'R%2':TWO.NUM'L%2'
|
|
END
|
|
CRT @(70,10):REG.HRS'L26(#5)'
|
|
USER.REC<UR$NEXT.PERSONAL>=REG.HRS
|
|
*
|
|
GOSUB 5175 ;* calc total time
|
|
*
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" CANNOT UPDATE LAST PERIOD TOTALS! <return> :":ERV:
|
|
INPUT ANY,3
|
|
END
|
|
RETURN
|
|
5163 *--- add/update bonus used--------------------------------*
|
|
IF NEXT.FLAG THEN
|
|
CRT @(0,22):CL:RV:" ENTER THE TIME (In Quarter-hour increments, Ex. 14.25) ":ERV:
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
|
HOLD=USER.REC<UR$NEXT.BONUS>'R26'
|
|
CRT @(70,11):HOLD'L#6'
|
|
CRT @(69,11):
|
|
INPUT REG.HRS,7
|
|
IF REG.HRS='' THEN REG.HRS=(HOLD*100)'R26'
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
GO 5150
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM'R%2':TWO.NUM'L%2'
|
|
END
|
|
CRT @(70,11):REG.HRS'L26(#5)'
|
|
USER.REC<UR$NEXT.BONUS>=REG.HRS
|
|
*
|
|
GOSUB 5175 ;* calc total time
|
|
*
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" CANNOT UPDATE LAST PERIOD TOTALS! <return> :":ERV:
|
|
INPUT ANY,3
|
|
END
|
|
RETURN
|
|
5164 *--- add/update workmans comp used--------------------------------*
|
|
IF NEXT.FLAG THEN
|
|
CRT @(0,22):CL:RV:" ENTER THE TIME (In Quarter-hour increments, Ex. 14.25) ":ERV:
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
|
HOLD=USER.REC<UR$NEXT.WORKMANS>'R26'
|
|
CRT @(70,12):HOLD'L#6'
|
|
CRT @(69,12):
|
|
INPUT REG.HRS,7
|
|
IF REG.HRS='' THEN REG.HRS=(HOLD*100)'R26'
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
GO 5150
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM'R%2':TWO.NUM'L%2'
|
|
END
|
|
CRT @(70,12):REG.HRS'L26(#5)'
|
|
USER.REC<UR$NEXT.WORKMANS>=REG.HRS
|
|
*
|
|
GOSUB 5175 ;* calc total time
|
|
*
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" CANNOT UPDATE LAST PERIOD TOTALS! <return> :":ERV:
|
|
INPUT ANY,3
|
|
END
|
|
RETURN
|
|
5165 *--- add/update jury duty time ------------------------------*
|
|
IF NEXT.FLAG THEN
|
|
CRT @(0,22):CL:RV:" ENTER THE TIME (In Quarter-hour increments, Ex. 14.25) ":ERV:
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
|
HOLD=USER.REC<UR$NEXT.JURY>'R26'
|
|
CRT @(70,13):HOLD'L#6'
|
|
CRT @(69,13):
|
|
INPUT REG.HRS,7
|
|
IF REG.HRS='' THEN REG.HRS=(HOLD*100)'R26'
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
GO 5150
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM'R%2':TWO.NUM'L%2'
|
|
END
|
|
CRT @(70,13):REG.HRS'L26(#5)'
|
|
USER.REC<UR$NEXT.JURY>=REG.HRS
|
|
*
|
|
GOSUB 5175 ;* calc total time
|
|
*
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" CANNOT UPDATE LAST PERIOD TOTALS! <return> :":ERV:
|
|
INPUT ANY,3
|
|
END
|
|
RETURN
|
|
5170 *--- add/update total time ---------------------------------*
|
|
CRT @(0,22):CL:BEEP:RV:" SYSTEM CALCULATES TOTALS! <return> :":ERV:
|
|
INPUT ANY,3
|
|
RETURN
|
|
*
|
|
5175 *--- add/update total time ---------------------------------*
|
|
TOTAL.TIME=0 ; OTHER.TIME=0
|
|
OTHER.TIME=OTHER.TIME+USER.REC<UR$NEXT.SICK>
|
|
OTHER.TIME=OTHER.TIME+USER.REC<UR$NEXT.VACATION>
|
|
OTHER.TIME=OTHER.TIME+USER.REC<UR$NEXT.HOLIDAY>
|
|
OTHER.TIME=OTHER.TIME+USER.REC<UR$NEXT.FUNERAL>
|
|
OTHER.TIME=OTHER.TIME+USER.REC<UR$NEXT.JURY>
|
|
OTHER.TIME=OTHER.TIME+USER.REC<UR$NEXT.WORKMANS>
|
|
OTHER.TIME=OTHER.TIME+USER.REC<UR$NEXT.BONUS>
|
|
OTHER.TIME=OTHER.TIME+USER.REC<UR$NEXT.PERSONAL>
|
|
USER.REC<UR$NEXT.OTHER>=OTHER.TIME
|
|
*
|
|
TOTAL.TIME=TOTAL.TIME+USER.REC<UR$NEXT.REG>
|
|
TOTAL.TIME=TOTAL.TIME+USER.REC<UR$NEXT.OT>
|
|
TOTAL.TIME=TOTAL.TIME+USER.REC<UR$NEXT.OTHER>
|
|
USER.REC<UR$NEXT.TOTAL>=TOTAL.TIME
|
|
CRT @(70,14):CL:USER.REC<UR$NEXT.OTHER>'R26'
|
|
CRT @(70,15):CL:RV:USER.REC<UR$NEXT.TOTAL>'R26':ERV:
|
|
RETURN
|
|
*
|
|
5800 *---- display screen ----------------------------------------*
|
|
CRT @(0,1):CR:
|
|
CRT @(5,3):CL:RV:" USER CODE/LAST NAME :":ERV:
|
|
CRT @(5,5):CL:RV:" 1. USER CODE :":ERV
|
|
CRT @(5,6):CL:RV:" 2. LAST NAME :":ERV
|
|
CRT @(5,7):CL:RV:" 3. FIRST NAME :":ERV
|
|
CRT @(5,8):CL:RV:" 4. DEPARTMENT :":ERV
|
|
CRT @(5,9):CL:RV:" 5. TYPE CODE :":ERV
|
|
CRT @(5,10):CL:RV:" 6. STATUS :":ERV
|
|
CRT @(5,11):CL:RV:" 7. HIRE DATE :":ERV
|
|
CRT @(5,12):CL:RV:" 8. FACTOR :":ERV
|
|
CRT @(5,13):CL:RV:" 9. CLOCK SYSTEM :":ERV
|
|
CRT @(5,14):CL:RV:"10. LAST UPDATE :":ERV
|
|
CRT @(5,15):CL:RV:"11. LAST OPERATOR:":ERV
|
|
*
|
|
CRT @(5,18):RV:" VACATION AVAILABLE :":ERV:
|
|
CRT @(5,20):RV:" SICK TIME AVAILABLE :":ERV:
|
|
CRT @(43,1):CL:"LAST PAY PERIOD PROCESSED :"
|
|
RETURN
|
|
*
|
|
5850 *---- display data ------------------------------------------*
|
|
CRT @(28,3):USER.CODE'L#20'
|
|
CRT @(25,5):USER.CODE
|
|
CRT @(25,6):USER.REC<UR$LNAME>
|
|
CRT @(25,7):USER.REC<UR$FNAME>
|
|
CRT @(25,8):USER.REC<UR$DEPT>
|
|
CRT @(25,9):USER.REC<UR$TYPE.CODE>
|
|
CRT @(25,10):USER.REC<UR$STATUS>
|
|
CRT @(25,11):OCONV(USER.REC<UR$HIRE.DATE>,'D2/')
|
|
CRT @(25,12):USER.REC<UR$CALC.FACTOR>
|
|
CRT @(25,13):USER.REC<UR$CLOCK.SYSTEM>
|
|
CRT @(25,14):OCONV(USER.REC<UR$LAST.UPDATE>,'D2/')
|
|
CRT @(25,15):USER.REC<UR$LAST.UPDATE.OPER>
|
|
READ CM.REC FROM CM,USER.REC<UR$LAST.UPDATE.OPER> THEN
|
|
LAST.OPER=CM.REC<2>
|
|
END ELSE
|
|
LAST.OPER='UNKNOWN'
|
|
END
|
|
CRT @(31,15):LAST.OPER'L#14'
|
|
*
|
|
CRT @(70,1):OCONV(USER.REC<UR$LAST.PAY.DATE>,'D2/')
|
|
CRT @(28,18):OCONV(USER.REC<UR$VACATION.AVAIL>,'MR2')'L#7'
|
|
CRT @(28,20):OCONV(USER.REC<UR$SICK.AVAIL>,'MR2')'L#7'
|
|
RETURN
|
|
*
|
|
5875 *---- display last pay period info --------------------------*
|
|
CRT @(48,3):RV:"LAST PAY PERIOD.....":OCONV(USER.REC<UR$LAST.PAY.DATE>,'D2/'):" ":ERV:
|
|
*
|
|
CRT @(48,4):CL:"12. Regular Hours : ":USER.REC<UR$REGULAR.HOURS>'R26'
|
|
CRT @(48,5):CL:"13. Overtime Hours : ":USER.REC<UR$OT.HOURS>'R26'
|
|
CRT @(48,6):CL:"14. Vacation Hours : ":USER.REC<UR$VACATION.HOURS>'R26'
|
|
CRT @(48,7):CL:"15. Sick Hours : ":USER.REC<UR$SICK.HOURS>'R26'
|
|
CRT @(48,8):CL:"16. Holiday Hours : ":USER.REC<UR$HOLIDAY.HOURS>'R26'
|
|
CRT @(48,9):CL:"17. Funeral Hours : ":USER.REC<UR$FUNERAL.HOURS>'R26'
|
|
*
|
|
CRT @(48,10):CL:"18. Personal Hours : ":USER.REC<UR$PERSONAL.HOURS>'R26'
|
|
CRT @(48,11):CL:"19. Bonus Hours : ":USER.REC<UR$BONUS.HOURS>'R26'
|
|
CRT @(48,12):CL:"20. Workmans Comp. : ":USER.REC<UR$WORKMANS.HOURS>'R26'
|
|
CRT @(48,13):CL:"21. Jury Duty Hours : ":USER.REC<UR$JURY.DUTY.HOURS>'R26'
|
|
CRT @(48,14):CL:"22. Non-Accrual Hrs.: ":USER.REC<UR$OTHER.HOURS>'R26'
|
|
CRT @(48,15):CL:"23. Total Hours : ":RV:USER.REC<UR$TOTAL.HOURS>'R26':ERV:
|
|
|
|
NEXT.FLAG=''
|
|
RETURN
|
|
*
|
|
5885 *---- display next pay period info --------------------------*
|
|
CRT @(48,3):RV:"NEXT PAY PERIOD.....":OCONV(USER.REC<UR$LAST.PAY.DATE>+15,'D2/'):" ":ERV:
|
|
*
|
|
CRT @(48,4):CL:"12. Regular Hours : ":USER.REC<UR$NEXT.REG>'R26'
|
|
CRT @(48,5):CL:"13. Overtime Hours : ":USER.REC<UR$NEXT.OT>'R26'
|
|
CRT @(48,6):CL:"14. Vacation Hours : ":USER.REC<UR$NEXT.VACATION>'R26'
|
|
CRT @(48,7):CL:"15. Sick Hours : ":USER.REC<UR$NEXT.SICK>'R26'
|
|
CRT @(48,8):CL:"16. Holiday Hours : ":USER.REC<UR$NEXT.HOLIDAY>'R26'
|
|
CRT @(48,9):CL:"17. Funeral Hours : ":USER.REC<UR$NEXT.FUNERAL>'R26'
|
|
*
|
|
CRT @(48,10):CL:"18. Personal Hours : ":USER.REC<UR$NEXT.PERSONAL>'R26'
|
|
CRT @(48,11):CL:"19. Bonus Hours : ":USER.REC<UR$NEXT.BONUS>'R26'
|
|
CRT @(48,12):CL:"20. Workmans Comp. : ":USER.REC<UR$NEXT.WORKMANS>'R26'
|
|
CRT @(48,13):CL:"21. Jury Duty Hours : ":USER.REC<UR$NEXT.JURY>'R26'
|
|
CRT @(48,14):CL:"22. Non-Accrual Hrs.: ":USER.REC<UR$NEXT.OTHER>'R26'
|
|
CRT @(48,15):CL:"23. Total Hours : ":RV:USER.REC<UR$NEXT.TOTAL>'R26':ERV:
|
|
*
|
|
NEXT.FLAG=1
|
|
RETURN
|
|
*
|
|
7000 *---write changes to disk ----------------------------------*
|
|
PORT=FIELD(OCONV(0, "U50BB")," ",1)
|
|
READ PT.REC FROM PT.FILE,PORT THEN
|
|
NEW.OPER=PT.REC<1>
|
|
END ELSE
|
|
NEW.OPER=''
|
|
END
|
|
USER.REC<UR$LAST.UPDATE>=TODAY
|
|
USER.REC<UR$LAST.UPDATE.OPER>=NEW.OPER
|
|
WRITE USER.REC ON USER.FILE,USER.CODE
|
|
CRT @(0,22):CL:RV:" RECORDS HAVE BEEN UPDATED! <return> :":ERV:
|
|
INPUT ANY,2
|
|
RETURN
|
|
*
|
|
10000 *--- search & display users meeting criteria ----------------*
|
|
USER.FIND=''
|
|
EOF=0
|
|
HUSH ON
|
|
EXECUTE "SELECT USER WITH LNAME \[":REQUEST:"]\"
|
|
HUSH OFF
|
|
LOOP
|
|
READNEXT USER.CODE ELSE EOF=1
|
|
UNTIL EOF DO
|
|
READ USER.REC FROM USER.FILE,USER.CODE THEN
|
|
LOCATE(USER.REC<UR$LNAME>,USER.FIND,2;FND;'AL') THEN NULL
|
|
USER.FIND=INSERT(USER.FIND,1,FND;USER.CODE)
|
|
USER.FIND=INSERT(USER.FIND,2,FND;USER.REC<UR$LNAME>)
|
|
USER.FIND=INSERT(USER.FIND,3,FND;USER.REC<UR$FNAME>)
|
|
USER.FIND=INSERT(USER.FIND,4,FND;USER.REC<UR$STATUS>)
|
|
END
|
|
REPEAT
|
|
13000 *
|
|
LINENUM=10
|
|
IF USER.FIND='' THEN
|
|
CRT @(0,22):CL:BEEP:RV:"NO MATCHING USERS FOUND - RETURN: ":ERV:
|
|
INPUT DUMMY
|
|
RETURN TO 5000
|
|
END
|
|
*
|
|
CT=DCOUNT(USER.FIND<1>,VM)
|
|
CRT @(0,9):CR
|
|
CRT @(0,9):RV:STR(' ',80):ERV:
|
|
CRT @(32,9):RV:" U S E R S ":ERV
|
|
FOR X = 1 TO CT
|
|
LN=X'L#4'
|
|
LN=LN:USER.FIND<1,X>'L#8'
|
|
NAME=USER.FIND<2,X>:", ":USER.FIND<3,X>
|
|
DIS.STATUS=USER.FIND<4,X>
|
|
IF DIS.STATUS[1,1]='A' THEN DIS.STATUS='Active'
|
|
IF DIS.STATUS[1,1]='C' THEN DIS.STATUS='Cancelled'
|
|
IF DIS.STATUS[1,1]='I' THEN DIS.STATUS='Inactive'
|
|
RSW=''
|
|
LN=LN:SPACE(5):NAME'L#25':DIS.STATUS'L#15'
|
|
GOSUB 14000 ;* DISPLAY THE LINE
|
|
IF RSW THEN RETURN
|
|
NEXT X
|
|
GO 15000
|
|
*
|
|
14000 * DISPLAY THE LINE
|
|
CRT @(0,LINENUM):LN
|
|
LN=''
|
|
LINENUM=LINENUM+1
|
|
IF LINENUM = 20 THEN
|
|
14100 *
|
|
15000 *
|
|
CRT @(0,22):CL:"Enter number next to User, 'P'(page), 'R'(ref), else return: ":
|
|
ANS=''
|
|
INPUT ANS
|
|
IF ANS='' THEN
|
|
GO 15000
|
|
END
|
|
IF ANS=PF3 THEN
|
|
GO 5000 ;* go to user prompt
|
|
END
|
|
IF ANS='R' THEN GOTO 13000
|
|
IF ANS = 'P' THEN
|
|
IF X >= CT THEN
|
|
CRT @(0,22):CL:BEEP:RV:" LAST PAGE CURRENTLY DISPLAYED <return> ":ERV:
|
|
INPUT DUMMY
|
|
GOTO 14100
|
|
END
|
|
CRT @(0,10):CR
|
|
LINENUM=10
|
|
RETURN
|
|
END
|
|
IF NOT(ANS MATCHES "0N") THEN GO 14100
|
|
IF ANS < 1 THEN GOTO 14100
|
|
IF USER.FIND<1,ANS>='' THEN GO 15000
|
|
USER.KEY=USER.FIND<1,ANS>
|
|
USER.CODE=USER.KEY
|
|
READ USER.REC FROM USER.FILE,USER.KEY THEN
|
|
RSW=1
|
|
RETURN
|
|
END ELSE
|
|
CRT @(0,22):CL:BEEP:RV:" USER CODE NOT FOUND! <return> ":ERV:
|
|
INPUT DUMMY
|
|
GOTO 15000
|
|
END
|
|
15200 *
|
|
RSW=1
|
|
END
|
|
RETURN
|
|
RETURN
|
|
*
|
|
30000 *
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
|
CRT @(0,22):CL:"ENTER VACATION TIME :":
|
|
INPUT REG.HRS
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
* GO 5150
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM:TWO.NUM'L%2'
|
|
END
|
|
USER.REC<UR$VACATION.AVAIL>=REG.HRS
|
|
*
|
|
GOSUB 5850
|
|
*
|
|
RETURN
|
|
31000 *
|
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
|
CRT @(0,22):CL:"ENTER SICK TIME :":
|
|
INPUT REG.HRS,7
|
|
COLN=INDEX(REG.HRS,":",1)
|
|
IF COLN > 0 THEN
|
|
* GO 5150
|
|
END ELSE
|
|
ONE.NUM=OCONV(REG.HRS,'G0.1')
|
|
TWO.NUM=OCONV(REG.HRS,'G1.1')
|
|
REG.HRS=ONE.NUM:TWO.NUM'L%2'
|
|
END
|
|
USER.REC<UR$SICK.AVAIL>=REG.HRS
|
|
*
|
|
GOSUB 5850
|
|
RETURN
|
|
*
|
|
32000 *----- delete user -----------------------------------------*
|
|
CRT @(0,22):CL:BEEP:RV:" ENTER PASSWORD TO DELETE USER >>:":ERV:
|
|
HUSH ON
|
|
INPUT DEL.ANS,10
|
|
HUSH OFF
|
|
IF DEL.ANS = PASSWORD THEN
|
|
DELETE USER.FILE,USER.CODE
|
|
CRT @(0,22):CL:RV:" USER RECORD DELETED! <return> :":ERV:
|
|
END ELSE
|
|
CRT @(0,22):CL:RV:" INVALID PASSWORD!!! ":ERV:
|
|
INPUT ANY,3
|
|
RETURN
|
|
END
|
|
RETURN TO 5000
|
|
*
|
|
*
|
|
35000 *---- verify manager records have been updated since last pay ---*
|
|
EOF=0
|
|
MAN.TABLE=''
|
|
SELECT USER.FILE
|
|
LOOP
|
|
READNEXT MANAGER ELSE EOF=1
|
|
UNTIL EOF DO
|
|
READ MREC FROM USER.FILE,MANAGER THEN
|
|
IF MREC<UR$TYPE.CODE>='M' THEN
|
|
IF MREC<UR$CLOCK.SYSTEM>='M' THEN
|
|
IF MREC<UR$LAST.UPDATE> < PAY.BEGIN THEN
|
|
MAN.TABLE=MAN.TABLE:" ":MREC<UR$LNAME>
|
|
END
|
|
END
|
|
END
|
|
END
|
|
REPEAT
|
|
IF MAN.TABLE# '' THEN
|
|
CRT @(0,21):CR:BEEP:RV:STR(' ',80):ERV:
|
|
CRT @(2,21):RV:"Manager records have not been updated for:":ERV:
|
|
CRT @(0,22):CR:BEEP:RV:STR(' ',80):ERV:
|
|
CRT @(1,22):RV:MAN.TABLE<1>'L#78':ERV:
|
|
INPUT ANY,2
|
|
GO 10
|
|
END
|
|
RETURN
|