185 lines
5.5 KiB
Plaintext
185 lines
5.5 KiB
Plaintext
|
SUBROUTINE MSD.ACCRUAL.REPORT
|
||
|
*
|
||
|
* AUTHOR: SCOTT REDMOND
|
||
|
* DATE: 04/04/95
|
||
|
* PURPOSE: VACATION/SICK TIME ACCRUAL REPORT (TIME BREAKDOWN)
|
||
|
*
|
||
|
*----------------------------------------------------------------*
|
||
|
*
|
||
|
$INCLUDE GEN.COMMON
|
||
|
$INCLUDE USER
|
||
|
*
|
||
|
*----------------------------------------------------------------*
|
||
|
*
|
||
|
OPEN 'USER' TO USER.FILE ELSE ABORT 201, 'USER'
|
||
|
OPEN 'HP.CONTROL' TO HPC ELSE ABORT 201, 'HP.CONTROL'
|
||
|
OPEN 'CLOCK.GEN.KEYS' TO CLOCK.GEN.KEYS ELSE ABORT 201, 'CLOCK.GEN.KEYS'
|
||
|
*
|
||
|
*----------------------------------------------------------------*
|
||
|
*
|
||
|
EOF=0 ; T=0 ; WT=0 ; CHANNEL.1=CHAR(12) ; PAGECNT=0 ; LNCT=99
|
||
|
TODAY=OCONV(DATE(),'D2/') ; LAST.DEPT='' ; FIRST.SW=1
|
||
|
TOTALS=''
|
||
|
FOR X = 1 TO 14 ;* init column totals
|
||
|
TOTALS<X>=0
|
||
|
NEXT X
|
||
|
*
|
||
|
*----------------------------------------------------------------*
|
||
|
*
|
||
|
10 *
|
||
|
CRT CS
|
||
|
HDG='CLOCK/PROJECT/MANAGER TIME DETAIL REPORT'
|
||
|
HDL=(80 - LEN(HDG)) /2
|
||
|
CRT @(0,0):CL:RV:STR(' ',80):ERV
|
||
|
CRT @(HDL,0):RV:HDG:ERV:
|
||
|
*
|
||
|
READ JEN.REC FROM CLOCK.GEN.KEYS,"NEXT.PAY.PERIOD" ELSE
|
||
|
CRT @(0,22):CL:RV:" ERROR - MISSING CLOCK.GEN.KEYS ITEM! ":ERV:
|
||
|
INPUT ANY,3
|
||
|
STOP
|
||
|
END
|
||
|
*
|
||
|
CRT @(8,6):CL:RV:" PAY PERIOD BEGINNING DATE :":ERV:" ":OCONV(JEN.REC<1>-14,'D2/')
|
||
|
CRT @(8,8):CL:RV:" PAY PERIOD ENDING DATE :":ERV:" ":OCONV(JEN.REC<1>-1,'D2/')
|
||
|
*
|
||
|
H1=TODAY'L#8':SPACE(58):'MICAHTEK, MSD & IDM USER TIME DETAIL REPORT'
|
||
|
H2=SPACE(75):'FOR PAY PERIOD ':OCONV(JEN.REC<1>-14,'D')
|
||
|
H3A=SPACE(37):'Last pay Vac Sick Reg OT Vac Sick Holiday'
|
||
|
H3A=H3A:' Funeral Personal Bonus W. Comp Jury Non-Acc Total'
|
||
|
H3='User Name':SPACE(8):' Dept Sta Type Clk'
|
||
|
H3=H3:SPACE(1):' Period Avail Avail Work Work Used Used Used'
|
||
|
H3=H3:SPACE(1):' Used Used Used Used Used Hours Hours'
|
||
|
*
|
||
|
200 *
|
||
|
CRT @(0,22):CL:RV:" REPORT 'A'ctive users, 'I'nactive users or 'B'oth :":ERV:
|
||
|
INPUT ACTIVE.ANS,3
|
||
|
IF ACTIVE.ANS='' OR ACTIVE.ANS=PF3 THEN STOP
|
||
|
IF ACTIVE.ANS='A' OR ACTIVE.ANS='I' OR ACTIVE.ANS='B' OR ACTIVE.ANS='' OR ACTIVE.ANS=PF3 ELSE GO 200
|
||
|
*
|
||
|
CRT @(0,22):CL:RV:" ENTER 'B' TO BEGIN REPORT :":ERV:
|
||
|
INPUT BEGIN.ANS,4
|
||
|
IF BEGIN.ANS[1,1] # 'B' THEN STOP
|
||
|
*
|
||
|
CRT @(8,16):CR:BEEP:RV:" This report must be sent to a laser printer! ":ERV:
|
||
|
CRT @(0,18):
|
||
|
EXECUTE "EX PRINTER"
|
||
|
CRT @(0,16):CR:
|
||
|
*
|
||
|
PRINTER ON
|
||
|
READ SMALL FROM HPC,'16.PITCH' ELSE SMALL=''
|
||
|
READ LAND FROM HPC,'LANDSCAPE' ELSE LAND=''
|
||
|
READ RESET FROM HPC,'RESET' ELSE RESET=''
|
||
|
*
|
||
|
PRINT SMALL ; PRINT LAND
|
||
|
HUSH ON
|
||
|
EXECUTE "SSELECT USER BY DEPT BY LNAME BY FNAME"
|
||
|
HUSH OFF
|
||
|
*
|
||
|
LOOP
|
||
|
READNEXT ID ELSE EOF=1
|
||
|
UNTIL EOF DO
|
||
|
T=T+1
|
||
|
READ UREC FROM USER.FILE,ID THEN
|
||
|
DEPART=UREC<UR$DEPT>
|
||
|
IF NOT(FIRST.SW) THEN
|
||
|
IF DEPART # LAST.DEPT THEN
|
||
|
LINE=STR('-',171)
|
||
|
GOSUB 8000
|
||
|
END
|
||
|
END
|
||
|
FIRST.SW=''
|
||
|
LAST.DEPT=DEPART
|
||
|
NAME=UREC<UR$LNAME>:", ":UREC<UR$FNAME>
|
||
|
LINE=NAME'L#17':SPACE(1)
|
||
|
LINE=LINE:DEPART'R#4':SPACE(2)
|
||
|
USTATUS=UREC<UR$STATUS>
|
||
|
IF ACTIVE.ANS='A' THEN
|
||
|
IF USTATUS # 'A' THEN GO 2000
|
||
|
END
|
||
|
IF ACTIVE.ANS='I' THEN
|
||
|
IF USTATUS # 'I' THEN GO 2000
|
||
|
END
|
||
|
LINE=LINE:UREC<UR$STATUS>'L#2':SPACE(2)
|
||
|
TYPE=UREC<UR$TYPE.CODE>
|
||
|
IF TYPE='F' THEN TYPE='FULL'
|
||
|
IF TYPE='P' THEN TYPE='PART'
|
||
|
IF TYPE='M' THEN TYPE='MGR '
|
||
|
LINE=LINE:TYPE'L#4':SPACE(2)
|
||
|
LINE=LINE:UREC<UR$CLOCK.SYSTEM>'L#1':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$LAST.PAY.DATE>,'D2/')'R#8':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$VACATION.AVAIL>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$SICK.AVAIL>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$REGULAR.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$OT.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$VACATION.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$SICK.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$HOLIDAY.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$FUNERAL.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$PERSONAL.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$BONUS.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$WORKMANS.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$JURY.DUTY.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$OTHER.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
LINE=LINE:OCONV(UREC<UR$TOTAL.HOURS>,'MR2')'R#7':SPACE(2)
|
||
|
GOSUB 6000 ;* subtotal
|
||
|
GOSUB 8000 ;* print line
|
||
|
END
|
||
|
2000 *
|
||
|
REPEAT
|
||
|
LINE=STR('=',172)
|
||
|
GOSUB 8000
|
||
|
LINE='**** GRAND TOTALS':SPACE(29)
|
||
|
FOR X = 1 TO 14
|
||
|
LINE=LINE:OCONV(TOTALS<X>,'MR2')'R#8':SPACE(1)
|
||
|
NEXT X
|
||
|
GOSUB 8000
|
||
|
GOSUB 8000
|
||
|
GOSUB 8000
|
||
|
GOSUB 8000
|
||
|
LINE='END OF REPORT'
|
||
|
GOSUB 8000
|
||
|
*
|
||
|
9999 *
|
||
|
CRT @(0,18):CR:
|
||
|
PRINT RESET
|
||
|
PRINTER CLOSE
|
||
|
PRINTER OFF
|
||
|
CRT @(0,22):CL:RV:" PROCESS COMPLETE <return> :":ERV:
|
||
|
INPUT ANY,3
|
||
|
RETURN
|
||
|
*
|
||
|
6000 *--- total figures ----------------------------------------*
|
||
|
TOTALS<1>=TOTALS<1>+UREC<UR$VACATION.AVAIL>
|
||
|
TOTALS<2>=TOTALS<2>+UREC<UR$SICK.AVAIL>
|
||
|
TOTALS<3>=TOTALS<3>+UREC<UR$REGULAR.HOURS>
|
||
|
TOTALS<4>=TOTALS<4>+UREC<UR$OT.HOURS>
|
||
|
TOTALS<5>=TOTALS<5>+UREC<UR$VACATION.HOURS>
|
||
|
TOTALS<6>=TOTALS<6>+UREC<UR$SICK.HOURS>
|
||
|
TOTALS<7>=TOTALS<7>+UREC<UR$HOLIDAY.HOURS>
|
||
|
TOTALS<8>=TOTALS<8>+UREC<UR$FUNERAL.HOURS>
|
||
|
TOTALS<9>=TOTALS<9>+UREC<UR$PERSONAL.HOURS>
|
||
|
TOTALS<10>=TOTALS<10>+UREC<UR$BONUS.HOURS>
|
||
|
TOTALS<11>=TOTALS<11>+UREC<UR$WORKMANS.HOURS>
|
||
|
TOTALS<12>=TOTALS<12>+UREC<UR$JURY.DUTY.HOURS>
|
||
|
TOTALS<13>=TOTALS<13>+UREC<UR$OTHER.HOURS>
|
||
|
TOTALS<14>=TOTALS<14>+UREC<UR$TOTAL.HOURS>
|
||
|
RETURN
|
||
|
*
|
||
|
8000 *--- print line -------------------------------------------*
|
||
|
IF LNCT > 44 THEN
|
||
|
PRINT CHANNEL.1
|
||
|
PAGECNT=PAGECNT+1
|
||
|
H1B=H1:SPACE(50):"PAGE ":PAGECNT
|
||
|
PRINT H1B
|
||
|
PRINT H2
|
||
|
PRINT
|
||
|
PRINT H3A
|
||
|
PRINT H3
|
||
|
PRINT
|
||
|
LNCT=6
|
||
|
END
|
||
|
PRINT LINE
|
||
|
LINE=''
|
||
|
LNCT=LNCT+1
|
||
|
RETURN
|