PRSRAU11 ;HISC/JH=EMPLOYEE AUDIT RECORD REPORT CONT. ;07-SEP-2000
;;4.0;PAID;**2,60**;Sep 21, 1995
PRT W:$E(IOST,1,2)="C-" @IOF
S (DATE(1),NAM)="",TL=0,SW=0,PRSE=" "
S TL(0)="" F S TL(0)=$O(^TMP($J,"AUD",TL(0))) Q:TL(0)="" D:TL'=TL(0) HDR1 D Q:POUT
. S DA(1)=0 F I=0:0 S DA(1)=$O(^TMP($J,"AUD",TL(0),DA(1))) Q:DA(1)'>0 D Q:POUT
.. S DA="" F I=0:0 S DA=$O(^TMP($J,"AUD",TL(0),DA(1),DA)) Q:DA="" D Q:POUT
... S CNT=0 F I=0:0 S CNT=$O(^TMP($J,"AUD",TL(0),DA(1),DA,CNT)) Q:CNT'>0 D Q:POUT
.... S DATA=$G(^TMP($J,"AUD",TL(0),DA(1),DA,CNT)),ADATE=$P(DATA,"^"),AUDITOR=$P(DATA,"^",2),TYP=$P(DATA,"^",3),STAT=$P(DATA,"^",4)
.... S PCLERK=$P(DATA,"^",5),CDATE=$P(DATA,"^",6),APRV=$P(DATA,"^",7),APRVD=$P(DATA,"^",8),APSUP=$P(DATA,"^",9),APSUPD=$P(DATA,"^",10)
.... D:($Y>(IOSL-9)) HDR Q:POUT F JJ="AUDITOR","PCLERK","APRV","APSUP" D INITALS(.JJ):@JJ'=""
.... I DA'=NAM W !,"|",DA D VLIN
.... I TYP="T" S RAUDIT=$TR($$FMTE^XLFDT(DA(1),"2FD")," ","0")
.... I TYP'="T" D
..... N D1,PPI,PPE,PP4Y,DAY
..... S D1=DA(1)
..... D PP^PRSAPPU
..... S RAUDIT="PP "_PPE
.... W !,"|",?8,RAUDIT,?22,"|",AUDITOR,?26,"|",ADATE,?35,"|"
.... W TYP,?37,"|",STAT,?40,"|",APSUP,?44,"|",APSUPD,?53,"|",APRV,?57,"|",APRVD,?66,"|",PCLERK,?70,"|",CDATE,?79,"|"
.... S DATE(1)=DA(1),NAM=DA
.... Q
... Q
.. Q
. I IOSL<66 F I=$Y:1:IOSL-9 D VLIN1
. S SW=1 D HDR:'POUT Q
Q
INITALS(INIT) ;EXTRACT INITALS FROM NAME (Last,First Middle<(optional))
;PASS BACK (XXX)
N J S J=$F(@INIT,","),J(1)=$F(@INIT," "),@INIT=$E(@INIT,J)_$S(J(1):$E(@INIT,J(1)),1:"")_$E(@INIT)
Q
HDR D CODES,VLIDSH1 S CODE="AU01",FOOT="VA TIME & ATTENDANCE SYSTEM" D FOOT2^PRSRUT0
I $E(IOST)="C" R !,"Press Return/Enter to continue. ",II:DTIME S:'$T!(II="^") POUT=1 Q:POUT
W @IOF
D:'SW HDR1 S SW=0 Q
HDR1 W !?23,^TMP($J,"AUD"),?66,"DATE: ",DAT2,!?20,"from PP ",FR," thru PP ",TO,?43," for T&L ",$P(TL(0),"^") D VLIDSH1
W !,"|",?22,"|"," TIMEKEEPER",?35,"|"," ","|"," ","|"," SUPERVISOR",?53,"|"," APPROVER",?66,"|"," PROCESSOR",?79,"|"
;W !,"|",?22,"|","------------","| | |","------------","|","------------","|","------------","|"
W !,"|","EMPLOYEE",?22,"|","NAM",?26,"|"," DATE",?35,"|","*",?37,"|","**",?40,"|","NAM",?44,"|"," DATE",?53,"|","NAM",?57,"|"," DATE",?66,"|","NAM",?70,"|"," DATE",?79,"|" D VLIDSH2 Q
VLIDSH1 W !,"|---------------------|------------|-|--|------------|------------|------------|" Q
VLIDSH2 W !,"|---------------------|---|--------|-|--|---|--------|---|--------|---|--------|" Q
VLIN1 W !,"|",?22,"|",?26,"|",?35,"|",?37,"|",?40,"|",?44,"|",?53,"|",?57,"|",?66,"|",?70,"|",?79,"|" Q
VLIN W ?22,"|",?26,"|",?35,"|",?37,"|",?40,"|",?44,"|",?53,"|",?57,"|",?66,"|",?70,"|",?79,"|" Q
CODES ;LIST CODES & DESCRIPTIONS
S TYPE=";"_$P($G(^DD(458.1101,3,0)),U,3),STATUS=";"_$P($G(^DD(458.1101,4,0)),U,3)
W !,"| *TYPE: " F I=1:1 S J=$P(TYPE,";",I+1) Q:J="" W $P(J,":")_"="_$P(J,":",2),?($X+3)
W ?79,"|",!,"| **STATUS: " F I=1:1 S J=$P(STATUS,";",I+1) Q:J="" W:$P(J,":")="X" ?79,"|",!,"|",?13 W $P(J,":")_"="_$P(J,":",2),?($X+3)
W ?79,"|" Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSRAU11 3117 printed Dec 13, 2024@02:28:25 Page 2
PRSRAU11 ;HISC/JH=EMPLOYEE AUDIT RECORD REPORT CONT. ;07-SEP-2000
+1 ;;4.0;PAID;**2,60**;Sep 21, 1995
PRT if $EXTRACT(IOST,1,2)="C-"
WRITE @IOF
+1 SET (DATE(1),NAM)=""
SET TL=0
SET SW=0
SET PRSE=" "
+2 SET TL(0)=""
FOR
SET TL(0)=$ORDER(^TMP($JOB,"AUD",TL(0)))
if TL(0)=""
QUIT
if TL'=TL(0)
DO HDR1
Begin DoDot:1
+3 SET DA(1)=0
FOR I=0:0
SET DA(1)=$ORDER(^TMP($JOB,"AUD",TL(0),DA(1)))
if DA(1)'>0
QUIT
Begin DoDot:2
+4 SET DA=""
FOR I=0:0
SET DA=$ORDER(^TMP($JOB,"AUD",TL(0),DA(1),DA))
if DA=""
QUIT
Begin DoDot:3
+5 SET CNT=0
FOR I=0:0
SET CNT=$ORDER(^TMP($JOB,"AUD",TL(0),DA(1),DA,CNT))
if CNT'>0
QUIT
Begin DoDot:4
+6 SET DATA=$GET(^TMP($JOB,"AUD",TL(0),DA(1),DA,CNT))
SET ADATE=$PIECE(DATA,"^")
SET AUDITOR=$PIECE(DATA,"^",2)
SET TYP=$PIECE(DATA,"^",3)
SET STAT=$PIECE(DATA,"^",4)
+7 SET PCLERK=$PIECE(DATA,"^",5)
SET CDATE=$PIECE(DATA,"^",6)
SET APRV=$PIECE(DATA,"^",7)
SET APRVD=$PIECE(DATA,"^",8)
SET APSUP=$PIECE(DATA,"^",9)
SET APSUPD=$PIECE(DATA,"^",10)
+8 if ($Y>(IOSL-9))
DO HDR
if POUT
QUIT
FOR JJ="AUDITOR","PCLERK","APRV","APSUP"
if @JJ'=""
DO INITALS(.JJ)
+9 IF DA'=NAM
WRITE !,"|",DA
DO VLIN
+10 IF TYP="T"
SET RAUDIT=$TRANSLATE($$FMTE^XLFDT(DA(1),"2FD")," ","0")
+11 IF TYP'="T"
Begin DoDot:5
+12 NEW D1,PPI,PPE,PP4Y,DAY
+13 SET D1=DA(1)
+14 DO PP^PRSAPPU
+15 SET RAUDIT="PP "_PPE
End DoDot:5
+16 WRITE !,"|",?8,RAUDIT,?22,"|",AUDITOR,?26,"|",ADATE,?35,"|"
+17 WRITE TYP,?37,"|",STAT,?40,"|",APSUP,?44,"|",APSUPD,?53,"|",APRV,?57,"|",APRVD,?66,"|",PCLERK,?70,"|",CDATE,?79,"|"
+18 SET DATE(1)=DA(1)
SET NAM=DA
+19 QUIT
End DoDot:4
if POUT
QUIT
+20 QUIT
End DoDot:3
if POUT
QUIT
+21 QUIT
End DoDot:2
if POUT
QUIT
+22 IF IOSL<66
FOR I=$Y:1:IOSL-9
DO VLIN1
+23 SET SW=1
if 'POUT
DO HDR
QUIT
End DoDot:1
if POUT
QUIT
+24 QUIT
INITALS(INIT) ;EXTRACT INITALS FROM NAME (Last,First Middle<(optional))
+1 ;PASS BACK (XXX)
+2 NEW J
SET J=$FIND(@INIT,",")
SET J(1)=$FIND(@INIT," ")
SET @INIT=$EXTRACT(@INIT,J)_$SELECT(J(1):$EXTRACT(@INIT,J(1)),1:"")_$EXTRACT(@INIT)
+3 QUIT
HDR DO CODES
DO VLIDSH1
SET CODE="AU01"
SET FOOT="VA TIME & ATTENDANCE SYSTEM"
DO FOOT2^PRSRUT0
+1 IF $EXTRACT(IOST)="C"
READ !,"Press Return/Enter to continue. ",II:DTIME
if '$TEST!(II="^")
SET POUT=1
if POUT
QUIT
+2 WRITE @IOF
+3 if 'SW
DO HDR1
SET SW=0
QUIT
HDR1 WRITE !?23,^TMP($JOB,"AUD"),?66,"DATE: ",DAT2,!?20,"from PP ",FR," thru PP ",TO,?43," for T&L ",$PIECE(TL(0),"^")
DO VLIDSH1
+1 WRITE !,"|",?22,"|"," TIMEKEEPER",?35,"|"," ","|"," ","|"," SUPERVISOR",?53,"|"," APPROVER",?66,"|"," PROCESSOR",?79,"|"
+2 ;W !,"|",?22,"|","------------","| | |","------------","|","------------","|","------------","|"
+3 WRITE !,"|","EMPLOYEE",?22,"|","NAM",?26,"|"," DATE",?35,"|","*",?37,"|","**",?40,"|","NAM",?44,"|"," DATE",?53,"|","NAM",?57,"|"," DATE",?66,"|","NAM",?70,"|"," DATE",?79,"|"
DO VLIDSH2
QUIT
VLIDSH1 WRITE !,"|---------------------|------------|-|--|------------|------------|------------|"
QUIT
VLIDSH2 WRITE !,"|---------------------|---|--------|-|--|---|--------|---|--------|---|--------|"
QUIT
VLIN1 WRITE !,"|",?22,"|",?26,"|",?35,"|",?37,"|",?40,"|",?44,"|",?53,"|",?57,"|",?66,"|",?70,"|",?79,"|"
QUIT
VLIN WRITE ?22,"|",?26,"|",?35,"|",?37,"|",?40,"|",?44,"|",?53,"|",?57,"|",?66,"|",?70,"|",?79,"|"
QUIT
CODES ;LIST CODES & DESCRIPTIONS
+1 SET TYPE=";"_$PIECE($GET(^DD(458.1101,3,0)),U,3)
SET STATUS=";"_$PIECE($GET(^DD(458.1101,4,0)),U,3)
+2 WRITE !,"| *TYPE: "
FOR I=1:1
SET J=$PIECE(TYPE,";",I+1)
if J=""
QUIT
WRITE $PIECE(J,":")_"="_$PIECE(J,":",2),?($X+3)
+3 WRITE ?79,"|",!,"| **STATUS: "
FOR I=1:1
SET J=$PIECE(STATUS,";",I+1)
if J=""
QUIT
if $PIECE(J,"
WRITE ?79,"|",!,"|",?13
WRITE $PIECE(J,":")_"="_$PIECE(J,":",2),?($X+3)
+4 WRITE ?79,"|"
QUIT