PRSRL21 ;HISC/JH-IND. OR ALL EMPLOYEE LEAVE REQUEST REPORT CONT. ;8/27/01
;;4.0;PAID;**2,26,39,69**;Sep 21, 1995
PRT1 S (FR,FR(1))=0 F I=0:0 S FR=$O(^TMP($J,"REQ",FR)) Q:FR'>0 D Q:POUT
. S NAM="" F I=0:0 S NAM=$O(^TMP($J,"REQ",FR,NAM)) Q:NAM="" D Q:POUT
. . S DA=0 F S DA=$O(^TMP($J,"REQ",FR,NAM,DA)) Q:DA'>0 D Q:POUT
. . . S TOUR=$G(^TMP($J,"REQ",FR,NAM,DA)),BEG=$E(FR,4,5)_"/"_$E(FR,6,7)_"/"_$E(FR,2,3),END=$P(TOUR,U,3),END=$E(END,4,5)_"/"_$E(END,6,7)_"/"_$E(END,2,3)
. . . S X=$P(TOUR,U,9) S X=$S(X:X_$S($P(TOUR,U,10)="D":" days",1:" hrs"),1:"")
. . . S DENT=$P(TOUR,U,6),DENT=$E(DENT,4,5)_"/"_$E(DENT,6,7)_"/"_$E(DENT,2,3),DAPR=$P(TOUR,U,7),DAPR=$S(DAPR:$E(DAPR,4,5)_"/"_$E(DAPR,6,7)_"/"_$E(DAPR,2,3),1:""),SUPR=$S($P(TOUR,U,8)'="":$P($G(^VA(200,$P(TOUR,U,8),0)),U),1:"")
. . . D:$Y>(IOSL-5) HDR Q:POUT D VLIN1:FR(1)'=FR
. . . W !,"|",BEG,?10,$P(TOUR,U,1),?17,"|",END,?27,$P(TOUR,U,2),?34,"|",$E(NAM,1,20),?57,"|",?58,$J(X,10),?68,"|",?69,$E($P(TOUR,U,4),1,18),?88,"|",?89,DENT,?98,"|",?99,DAPR,?108,"|",?109,$E(SUPR,1,22),?131,"|"
. . . S FR(1)=FR
Q
;
PRT2 S FR=0 F I=0:0 S FR=$O(^TMP($J,"REQ",FR)) Q:FR'>0 D Q:POUT
. S NAM="" F I=0:0 S NAM=$O(^TMP($J,"REQ",FR,NAM)) Q:NAM="" D Q:POUT
. . S DA=0 F S DA=$O(^TMP($J,"REQ",FR,NAM,DA)) Q:DA'>0 D Q:POUT
. . . S TOUR=$G(^TMP($J,"REQ",FR,NAM,DA)),BEG=$E(FR,4,5)_"/"_$E(FR,6,7)_"/"_$E(FR,2,3),END=$P(TOUR,U,3),END=$E(END,4,5)_"/"_$E(END,6,7)_"/"_$E(END,2,3)
. . . S X=$P(TOUR,U,9) S X=$S(X:X_$S($P(TOUR,U,10)="D":" days",1:" hrs"),1:"")
. . . S DENT=$P(TOUR,U,6),DENT=$E(DENT,4,5)_"/"_$E(DENT,6,7)_"/"_$E(DENT,2,3),DAPR=$P(TOUR,U,7),DAPR=$S(DAPR:$E(DAPR,4,5)_"/"_$E(DAPR,6,7)_"/"_$E(DAPR,2,3),1:""),SUPR=$S($P(TOUR,U,8)'="":$P($G(^VA(200,$P(TOUR,U,8),0)),U),1:"")
. . . D:$Y>(IOSL-5) HDR Q:POUT
. . . W !,"|",BEG,?11,$P(TOUR,U,1),?18,"|",END,?29,$P(TOUR,U,2),?36,"|",?37,$J(X,10),?47,"|",?48,$E($P(TOUR,U,4),1,23),?72,"|",?74,DENT,?84,"|",?86,DAPR,?96,"|",?99,$E(SUPR,1,34),?131,"|"
Q
;
HDR ; page header
I $D(ZTQUEUED),$$S^%ZTLOAD S ZSTOP=1,POUT=1 Q
D VLIDSH:'SW,VLIDSH1:SW S CODE=$S(SW=0:"L001",1:"L002"),FOOT="VA TIME & ATTENDANCE SYSTEM" D FOOT1^PRSRUT0 Q:POUT
I $E(IOST,1,2)="C-" R !!,"Press Return/Enter to continue or ""^"" to quit. ",X:DTIME S:X="^"!('$T) POUT=1
Q:POUT
W @IOF
D HDR1:SW,HDR2:'SW Q
HDR1 ; page header for all employee report
W !?(IOM-$L(^TMP($J,"REQ",0)))/2,^TMP($J,"REQ",0),?(IOM-14),"DATE: ",DAT,!?(IOM-$L(" from: "_XX_" to: "_YY))/2," from: ",XX," to: ",YY,!?(IOM-$L(" for T&L: "_$P(TLE(1),U)))/2," for T&L: ",$P(TLE(1),U),!! D VLIDSH1
W !,"|","FROM",?17,"|","TO",?34,"|","EMPLOYEE",?57,"|",?58,"LENGTH",?68,"|",?69,"TYPE LEAVE",?88,"|",?89,"DATE-REQ",?98,"|",?99,"DATE-APP",?108,"|",?109,"APPROVING SUPERVISOR",?131,"|" D VLIDSH1 Q
HDR2 ; page header for single employee report
W !?(IOM-$L(^TMP($J,"REQ",0)))/2,^TMP($J,"REQ",0),?(IOM-14),"DATE: ",DAT,!,?48," from ",XX," to ",YY,!,?IOM-($L(NAM)+$L(ORG))/2-5,"for: ",NAM," - ",ORG,!! D VLIDSH
W !,"|",?6,"FROM",?18,"|",?27,"TO",?36,"|",?39,"LENGTH",?47,"|",?54,"TYPE LEAVE",?72,"|",?74,"DATE-REQ",?84,"|",?86,"DATE-APP",?96,"|",?99,"APPROVING SUPERVISOR",?131,"|" D VLIDSH Q
VLIDSH W !,"|-----------------|-----------------|----------|------------------------|-----------|-----------|----------------------------------|" Q
VLIDSH1 W !,"|----------------|----------------|----------------------|----------|-------------------|---------|---------|----------------------|" Q
VLIN1 W !,"|",?17,"|",?34,"|",?57,"|",?68,"|",?88,"|",?98,"|",?108,"|",?131,"|" Q
VLIN W !,"|",?18,"|",?36,"|",?47,"|",?72,"|",?84,"|",?96,"|",?131,"|" Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSRL21 3638 printed Dec 13, 2024@02:28:31 Page 2
PRSRL21 ;HISC/JH-IND. OR ALL EMPLOYEE LEAVE REQUEST REPORT CONT. ;8/27/01
+1 ;;4.0;PAID;**2,26,39,69**;Sep 21, 1995
PRT1 SET (FR,FR(1))=0
FOR I=0:0
SET FR=$ORDER(^TMP($JOB,"REQ",FR))
if FR'>0
QUIT
Begin DoDot:1
+1 SET NAM=""
FOR I=0:0
SET NAM=$ORDER(^TMP($JOB,"REQ",FR,NAM))
if NAM=""
QUIT
Begin DoDot:2
+2 SET DA=0
FOR
SET DA=$ORDER(^TMP($JOB,"REQ",FR,NAM,DA))
if DA'>0
QUIT
Begin DoDot:3
+3 SET TOUR=$GET(^TMP($JOB,"REQ",FR,NAM,DA))
SET BEG=$EXTRACT(FR,4,5)_"/"_$EXTRACT(FR,6,7)_"/"_$EXTRACT(FR,2,3)
SET END=$PIECE(TOUR,U,3)
SET END=$EXTRACT(END,4,5)_"/"_$EXTRACT(END,6,7)_"/"_$EXTRACT(END,2,3)
+4 SET X=$PIECE(TOUR,U,9)
SET X=$SELECT(X:X_$SELECT($PIECE(TOUR,U,10)="D":" days",1:" hrs"),1:"")
+5 SET DENT=$PIECE(TOUR,U,6)
SET DENT=$EXTRACT(DENT,4,5)_"/"_$EXTRACT(DENT,6,7)_"/"_$EXTRACT(DENT,2,3)
SET DAPR=$PIECE(TOUR,U,7)
SET DAPR=$SELECT(DAPR:$EXTRACT(DAPR,4,5)_"/"_$EXTRACT(DAPR,6,7)_"/"_$EXTRACT(DAPR,2,3),1:"")
SET SUPR=$SELECT($PIECE(TOUR,U,8)'="":$PIECE($GET(^VA(200,$PIECE(TOUR,U,8),0)),U),1:"")
+6 if $Y>(IOSL-5)
DO HDR
if POUT
QUIT
if FR(1)'=FR
DO VLIN1
+7 WRITE !,"|",BEG,?10,$PIECE(TOUR,U,1),?17,"|",END,?27,$PIECE(TOUR,U,2),?34,"|",$EXTRACT(NAM,1,20),?57,"|",?58,$JUSTIFY(X,10),?68,"|",?69,$EXTRACT($PIECE(TOUR,U,4),1,18),?88,"|",?89,DENT,?98,"|",?99,DAPR,?108,"|",?109,$EXT
RACT(SUPR,1,22),?131,"|"
+8 SET FR(1)=FR
End DoDot:3
if POUT
QUIT
End DoDot:2
if POUT
QUIT
End DoDot:1
if POUT
QUIT
+9 QUIT
+10 ;
PRT2 SET FR=0
FOR I=0:0
SET FR=$ORDER(^TMP($JOB,"REQ",FR))
if FR'>0
QUIT
Begin DoDot:1
+1 SET NAM=""
FOR I=0:0
SET NAM=$ORDER(^TMP($JOB,"REQ",FR,NAM))
if NAM=""
QUIT
Begin DoDot:2
+2 SET DA=0
FOR
SET DA=$ORDER(^TMP($JOB,"REQ",FR,NAM,DA))
if DA'>0
QUIT
Begin DoDot:3
+3 SET TOUR=$GET(^TMP($JOB,"REQ",FR,NAM,DA))
SET BEG=$EXTRACT(FR,4,5)_"/"_$EXTRACT(FR,6,7)_"/"_$EXTRACT(FR,2,3)
SET END=$PIECE(TOUR,U,3)
SET END=$EXTRACT(END,4,5)_"/"_$EXTRACT(END,6,7)_"/"_$EXTRACT(END,2,3)
+4 SET X=$PIECE(TOUR,U,9)
SET X=$SELECT(X:X_$SELECT($PIECE(TOUR,U,10)="D":" days",1:" hrs"),1:"")
+5 SET DENT=$PIECE(TOUR,U,6)
SET DENT=$EXTRACT(DENT,4,5)_"/"_$EXTRACT(DENT,6,7)_"/"_$EXTRACT(DENT,2,3)
SET DAPR=$PIECE(TOUR,U,7)
SET DAPR=$SELECT(DAPR:$EXTRACT(DAPR,4,5)_"/"_$EXTRACT(DAPR,6,7)_"/"_$EXTRACT(DAPR,2,3),1:"")
SET SUPR=$SELECT($PIECE(TOUR,U,8)'="":$PIECE($GET(^VA(200,$PIECE(TOUR,U,8),0)),U),1:"")
+6 if $Y>(IOSL-5)
DO HDR
if POUT
QUIT
+7 WRITE !,"|",BEG,?11,$PIECE(TOUR,U,1),?18,"|",END,?29,$PIECE(TOUR,U,2),?36,"|",?37,$JUSTIFY(X,10),?47,"|",?48,$EXTRACT($PIECE(TOUR,U,4),1,23),?72,"|",?74,DENT,?84,"|",?86,DAPR,?96,"|",?99,$EXTRACT(SUPR,1,34),?131,"|"
End DoDot:3
if POUT
QUIT
End DoDot:2
if POUT
QUIT
End DoDot:1
if POUT
QUIT
+8 QUIT
+9 ;
HDR ; page header
+1 IF $DATA(ZTQUEUED)
IF $$S^%ZTLOAD
SET ZSTOP=1
SET POUT=1
QUIT
+2 if 'SW
DO VLIDSH
if SW
DO VLIDSH1
SET CODE=$SELECT(SW=0:"L001",1:"L002")
SET FOOT="VA TIME & ATTENDANCE SYSTEM"
DO FOOT1^PRSRUT0
if POUT
QUIT
+3 IF $EXTRACT(IOST,1,2)="C-"
READ !!,"Press Return/Enter to continue or ""^"" to quit. ",X:DTIME
if X="^"!('$TEST)
SET POUT=1
+4 if POUT
QUIT
+5 WRITE @IOF
+6 if SW
DO HDR1
if 'SW
DO HDR2
QUIT
HDR1 ; page header for all employee report
+1 WRITE !?(IOM-$LENGTH(^TMP($JOB,"REQ",0)))/2,^TMP($JOB,"REQ",0),?(IOM-14),"DATE: ",DAT,!?(IOM-$LENGTH(" from: "_XX_" to: "_YY))/2," from: ",XX," to: ",YY,!?(IOM-$LENGTH(" for T&L: "_$PIECE(TLE(1),U)))/2," for T&L: ",$PIECE(TLE(1),U),!!
DO VLIDSH1
+2 WRITE !,"|","FROM",?17,"|","TO",?34,"|","EMPLOYEE",?57,"|",?58,"LENGTH",?68,"|",?69,"TYPE LEAVE",?88,"|",?89,"DATE-REQ",?98,"|",?99,"DATE-APP",?108,"|",?109,"APPROVING SUPERVISOR",?131,"|"
DO VLIDSH1
QUIT
HDR2 ; page header for single employee report
+1 WRITE !?(IOM-$LENGTH(^TMP($JOB,"REQ",0)))/2,^TMP($JOB,"REQ",0),?(IOM-14),"DATE: ",DAT,!,?48," from ",XX," to ",YY,!,?IOM-($LENGTH(NAM)+$LENGTH(ORG))/2-5,"for: ",NAM," - ",ORG,!!
DO VLIDSH
+2 WRITE !,"|",?6,"FROM",?18,"|",?27,"TO",?36,"|",?39,"LENGTH",?47,"|",?54,"TYPE LEAVE",?72,"|",?74,"DATE-REQ",?84,"|",?86,"DATE-APP",?96,"|",?99,"APPROVING SUPERVISOR",?131,"|"
DO VLIDSH
QUIT
VLIDSH WRITE !,"|-----------------|-----------------|----------|------------------------|-----------|-----------|----------------------------------|"
QUIT
VLIDSH1 WRITE !,"|----------------|----------------|----------------------|----------|-------------------|---------|---------|----------------------|"
QUIT
VLIN1 WRITE !,"|",?17,"|",?34,"|",?57,"|",?68,"|",?88,"|",?98,"|",?108,"|",?131,"|"
QUIT
VLIN WRITE !,"|",?18,"|",?36,"|",?47,"|",?72,"|",?84,"|",?96,"|",?131,"|"
QUIT