903 lines
27 KiB
Plaintext
903 lines
27 KiB
Plaintext
|
SUBROUTINE MSD.USER.MAINT
|
||
|
*
|
||
|
*
|
||
|
*-------------------------------------------------------------------*
|
||
|
*
|
||
|
$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'
|
||
|
OPEN 'INFO.LOG' TO INFO.LOG ELSE ABORT 201, 'INFO.LOG'
|
||
|
*
|
||
|
*-------------------------------------------------------------------*
|
||
|
*
|
||
|
USER.ADD='' ; USER.REC='' ; TODAY=DATE()
|
||
|
*
|
||
|
*-------------------------------------------------------------------*
|
||
|
PASSWORD=CHAR(73):CHAR(88):CHAR(79):CHAR(89):CHAR(69)
|
||
|
5 *
|
||
|
CRT @(0,22):CL:RV:" ENTER PASSWORD TO CONTINUE :":ERV:
|
||
|
HUSH ON
|
||
|
INPUT PASS,19
|
||
|
HUSH OFF
|
||
|
IF PASS # PASSWORD THEN RETURN
|
||
|
*
|
||
|
10 *
|
||
|
CRT CS
|
||
|
HDG='MICAHTEK & IDM TIME CLOCK USER MAINTENANCE UTILITY'
|
||
|
HDL=(80 - LEN(HDG)) / 2
|
||
|
CRT @(0,0):CL:RV:STR(' ',80):ERV
|
||
|
CRT @(HDL,0):RV:HDG:ERV:
|
||
|
|
||
|
*
|
||
|
5000 *--- update manager/user records ------------------------*
|
||
|
*
|
||
|
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 RETURN
|
||
|
IF NUM(REQUEST) THEN
|
||
|
OTITLE=" ":REQUEST ; GOSUB 41000
|
||
|
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
|
||
|
OTITLE=" ":USER.CODE ; GOSUB 41000
|
||
|
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 #, 'N'ext period, 'L'ast period, 'P'ersonal begin, '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='PP' ; GOSUB 31000
|
||
|
CASE FIVE.ANS='P' ; GOSUB 39000
|
||
|
CASE FIVE.ANS='DELETE' ; GOSUB 32000
|
||
|
CASE FIVE.ANS='SAL' ; GOSUB 33700
|
||
|
CASE FIVE.ANS='N'
|
||
|
IF USER.REC<UR$CLOCK.SYSTEM> = 'M' ELSE
|
||
|
CRT @(0,22):CL:BEEP:RV:" USER MUST HAVE MANUAL CLOCK CODE! <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 RETURN
|
||
|
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 RETURN
|
||
|
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 RETURN
|
||
|
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, 'O'ther ":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 RETURN
|
||
|
IF TYPE.CODE='' OR TYPE.CODE='*' THEN GO 5050
|
||
|
IF TYPE.CODE='M' OR TYPE.CODE='F' OR TYPE.CODE='P' OR TYPE.CODE='O' ELSE GO 5050
|
||
|
USER.REC<UR$TYPE.CODE>=TYPE.CODE
|
||
|
IF TYPE.CODE='M' THEN TYPE.CODE='Manager'
|
||
|
IF TYPE.CODE='F' THEN TYPE.CODE='Full-time'
|
||
|
IF TYPE.CODE='P' THEN TYPE.CODE='Part-time'
|
||
|
IF TYPE.CODE='O' THEN TYPE.CODE='Other'
|
||
|
CRT @(25,9):TYPE.CODE'L#15'
|
||
|
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 RETURN
|
||
|
IF STATUS.CODE='' OR STATUS.CODE='*' THEN GO 5060
|
||
|
IF STATUS.CODE='A' OR STATUS.CODE='I' ELSE GO 5060
|
||
|
USER.REC<UR$STATUS>=STATUS.CODE
|
||
|
IF STATUS.CODE='A' THEN STATUS.CODE='Active'
|
||
|
IF STATUS.CODE='I' THEN STATUS.CODE='Inactive'
|
||
|
CRT @(25,10):STATUS.CODE'L#15'
|
||
|
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 RETURN
|
||
|
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 VACATION DAYS/YEAR ":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 RETURN
|
||
|
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'anual ":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 RETURN
|
||
|
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. VAC DAYS/YR. :":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 @(8,16):CL:RV:" PERSONAL BEG.:":ERV:
|
||
|
*
|
||
|
CRT @(5,18):RV:" VACATION AVAILABLE :":ERV:
|
||
|
CRT @(5,20):RV:" PERSONAL 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>
|
||
|
TYPE.CODE=''
|
||
|
IF USER.REC<UR$TYPE.CODE>='M' THEN TYPE.CODE='Manager'
|
||
|
IF USER.REC<UR$TYPE.CODE>='F' THEN TYPE.CODE='Full-time'
|
||
|
IF USER.REC<UR$TYPE.CODE>='P' THEN TYPE.CODE='Part-time'
|
||
|
IF USER.REC<UR$TYPE.CODE>='O' THEN TYPE.CODE='Other'
|
||
|
CRT @(25,9):TYPE.CODE
|
||
|
USTAT=''
|
||
|
IF USER.REC<UR$STATUS>='A' THEN USTAT='Active'
|
||
|
IF USER.REC<UR$STATUS>='I' THEN USTAT='Inactive'
|
||
|
CRT @(25,10):USTAT
|
||
|
CRT @(25,11):OCONV(USER.REC<UR$HIRE.DATE>,'D2/')
|
||
|
IF USER.REC<UR$INTERNAL.CALC> > 0 THEN
|
||
|
CRT @(25,12):USER.REC<UR$CALC.FACTOR>:" (":USER.REC<UR$INTERNAL.CALC>:"/hour)"
|
||
|
END ELSE
|
||
|
CRT @(25,12):USER.REC<UR$CALC.FACTOR>
|
||
|
END
|
||
|
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>
|
||
|
*CRT @(25,16):OCONV(USER.REC<UR$PERSONAL.BEGIN>,'D2/')
|
||
|
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$PERSONAL.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-Regular Hrs.: ":USER.REC<UR$OTHER.HOURS>'R26'
|
||
|
CRT @(48,15):CL:"23. Total Hours : ":RV:USER.REC<UR$TOTAL.HOURS>'R26':ERV:
|
||
|
IF USER.REC<UR$CLOCK.SYSTEM>='P' THEN
|
||
|
CRT @(48,16):CL:RV:" BILLING HOUR DETAIL...... ":ERV:
|
||
|
CRT @(48,17):CL:"24. Billable Hours : ":USER.REC<UR$BILL.BILL>'R26'
|
||
|
CRT @(48,18):CL:"25. Service Hours : ":USER.REC<UR$BILL.SERVICE>'R26'
|
||
|
CRT @(48,19):CL:"26. Free Hours : ":USER.REC<UR$BILL.FREE>'R26'
|
||
|
END
|
||
|
NEXT.FLAG=''
|
||
|
RETURN
|
||
|
*
|
||
|
5885 *---- display next pay period info --------------------------*
|
||
|
CRT @(48,3):RV:"NEXT PAY PERIOD.....":OCONV(USER.REC<UR$NEXT.PAY.DATE>,'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-Regular 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 *
|
||
|
OTITLE='* UPDATE VACATION' ; GOSUB 41000
|
||
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
||
|
CRT @(0,22):CL:"ENTER VACATION TIME :":
|
||
|
INPUT REG.HRS
|
||
|
IF REG.HRS='' OR REG.HRS='/' ELSE
|
||
|
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
|
||
|
END
|
||
|
*
|
||
|
GOSUB 5850
|
||
|
*
|
||
|
RETURN
|
||
|
31000 *
|
||
|
OTITLE='* UPDATE PERSONAL' ; GOSUB 41000
|
||
|
ONE.NUM='' ; TWO.NUM='' ; HOLD='' ; COLN='' ; REG.HRS=''
|
||
|
CRT @(0,22):CL:"ENTER PERSONAL TIME :":
|
||
|
INPUT REG.HRS,7
|
||
|
IF REG.HRS='' OR REG.HRS='/' ELSE
|
||
|
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$PERSONAL.AVAIL>=REG.HRS
|
||
|
END
|
||
|
*
|
||
|
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
|
||
|
*
|
||
|
33700 *
|
||
|
OPEN 'LRTES' TO LRTES ELSE ABORT 201, 'LRTES'
|
||
|
READ SREC FROM LRTES,USER.CODE ELSE SREC='0'
|
||
|
OUT.SAL=(SREC<1>*1)
|
||
|
33701 *
|
||
|
CRT @(0,22):CL:RV:" CURRENT SALARY IS ":OUT.SAL'R26,$':"...'U'pdate, else <return> :":ERV:
|
||
|
INPUT SAL.ANS,4
|
||
|
IF SAL.ANS='U' THEN
|
||
|
CRT @(0,22):CL:RV:" CURRENT = ":OUT.SAL'R26,':".... NEW = ":ERV:
|
||
|
INPUT NEW.SAL,20
|
||
|
IF NEW.SAL='' OR NEW.SAL='/' THEN
|
||
|
CRT @(0,22):CL:RV:" SALARY HAS NOT BEEN UPDATED! <return> :":ERV:
|
||
|
INPUT ANY,4
|
||
|
RETURN
|
||
|
END
|
||
|
NEW.SAL=ICONV(NEW.SAL,'MR2')'R%10'
|
||
|
SREC<1>=NEW.SAL
|
||
|
WRITE SREC ON LRTES,USER.CODE
|
||
|
CRT @(0,22):CL:RV:" SALARY HAS BEEN CHANGED TO ":(NEW.SAL*1)'R26,$':" <return> :":ERV:
|
||
|
INPUT ANY,4
|
||
|
END
|
||
|
RETURN
|
||
|
*
|
||
|
39000 *---- display date personal accrual begins ----------------*
|
||
|
IF USER.REC<UR$PERSONAL.BEGIN> > 1 THEN
|
||
|
CRT @(0,22):CL:RV:" Personal time first accrual date is ":OCONV(USER.REC<UR$PERSONAL.BEGIN>,'D2/'):" <return> :":ERV:
|
||
|
END ELSE
|
||
|
CRT @(0,22):CL:RV:" There is no beginning accrual date on file! <return> :":ERV:
|
||
|
END
|
||
|
INPUT ANY,4
|
||
|
RETURN
|
||
|
*
|
||
|
41000 *
|
||
|
IREC='' ; PORT='' ; ADD.OPER='' ; ADD.FNAME='' ; ADD.LNAME=''
|
||
|
PORT=FIELD(OCONV(0, "U50BB")," ",1)
|
||
|
READ PT.REC FROM PT.FILE,PORT THEN
|
||
|
ADD.OPER=PT.REC<1>
|
||
|
ADD.FNAME=PT.REC<2>
|
||
|
ADD.LNAME=PT.REC<3>
|
||
|
END ELSE
|
||
|
ADD.OPER='UNKNOWN'
|
||
|
ADD.LNAME=''
|
||
|
END
|
||
|
TIMER=TIMEDATE()
|
||
|
IREC<1>=ADD.OPER
|
||
|
IREC<2>=OTITLE
|
||
|
IREC<3>=ADD.FNAME:" ":ADD.LNAME
|
||
|
IREC<4>=TIMER
|
||
|
READ NEXX FROM CLOCK.GEN.KEYS,"NEXT.LOG" THEN
|
||
|
NEXX=NEXX+1
|
||
|
* WRITE NEXX ON CLOCK.GEN.KEYS,"NEXT.LOG"
|
||
|
* WRITE IREC ON INFO.LOG,NEXX
|
||
|
END
|
||
|
RETURN
|