PRSREX11 ;HISC/JH-T & L EXPENDITURE REPORT (Continued) ;7/9/97
;;4.0;PAID;**2,19,26**;Sep 21, 1995
D INIT,PRINT
K TAB1,TAB2
Q
;
PRINT ;routine to loop through temp global and print employee expenditures
S PP=0 F I=0:0 S PP=$O(^TMP($J,"EXP",PP)) Q:PP'>0 D:PP'=PP(1) HDR1 S:PP(1)="" SW(7)=0 D Q:POUT
. S TLE="" F I=0:0 S TLE=$O(^TMP($J,"EXP",PP,TLE)) Q:TLE="" D Q:POUT
.. S NAM="" F I=0:0 S NAM=$O(^TMP($J,"EXP",PP,TLE,NAM)) Q:NAM="" D Q:POUT
... S D0=0 F I=0:0 S D0=$O(^TMP($J,"EXP",PP,TLE,NAM,D0)) Q:D0'>0 S TIME=^(D0) Q:TIME="" D Q:POUT
.... D:$Y>(IOSL-5) HDR Q:POUT
.... W !,"|",$E(NAM,1,20),?21,"|"
.... W $J($P(TIME,"^",1),12,2),?34,"|",$J($P(TIME,"^",2),7,2),?42,"|"
.... W $J($P(TIME,"^",3),6,2),?48,"|",$J($P(TIME,"^",4),8,2),?58,"|"
.... W $J($P(TIME,"^",5),6,2),?65,"|",$J($P(TIME,"^",6),6,2),?72,"|"
.... W $J($P(TIME,"^",7),8,2),?80,"|",$J($P(TIME,"^",8),7,2),?88,"|"
.... W $J($P(TIME,"^",9),7,2),?96,"|"
.... W $J($P(TIME,"^",10),10,2),?107,"|",$J($P(TIME,"^",11),8,2),?117,"|",$J($P(TIME,"^",12),12,2),?131,"|"
.... S PP(1)=PP,NAM(1)=NAM
.... Q
... Q
.. Q:POUT D VLIDSH S TOT=^TMP($J,"EXP1",PP,TLE)
.. W !,"|",?6,"T&L ",TLE," Total:",?21,"|",$J($P(TOT,U),12,2),?34,"|",$J($P(TOT,U,2),7,2),?42,"|",$J($P(TOT,U,3),6,2),?48,"|",$J($P(TOT,U,4),8,2),?58,"|"
.. W $J($P(TOT,U,5),6,2),?65,"|",$J($P(TOT,U,6),6,2),?72,"|",$J($P(TOT,U,7),8,2),?80,"|",$J($P(TOT,U,8),7,2),?88,"|",$J($P(TOT,U,9),7,2),?96,"|"
.. W $J($P(TOT,U,10),10,2),?107,"|",$J($P(TOT,U,11),8,2),?117,"|",$J($P(TOT,U,12),12,2),?131,"|" D VLIN0 S PP(2)=PP,PP(2)=$O(^TMP($J,"EXP",PP(2))) I PP(2)'="" I IOSL<66 F II=$Y:1:IOSL-5 D VLIN0
.. Q
. Q:POUT I PP(2)'="" S SW=1 D HDR S SW=0 Q
. Q
Q:POUT D VLIN0,VLIDSH W !,"|","Totals:",?21,"|",$J(TOTAL(1),12,2),?34,"|",$J(TOTAL(2),7,2),?42,"|",$J(TOTAL(3),6,2),?48,"|",$J(TOTAL(4),8,2),?58,"|"
W $J(TOTAL(5),6,2),?65,"|",$J(TOTAL(6),6,2),?72,"|",$J(TOTAL(7),8,2),?80,"|",$J(TOTAL(8),7,2),?88,"|",$J(TOTAL(9),7,2),?96,"|"
W $J(TOTAL,10,2),?107,"|",$J(TGOV,8,2),?117,"|",$J(TOTAL+TGOV,12,2),?131,"|"
I IOSL<66 F I=$Y:1:IOSL-5 D VLIN0
S SW=1 D HDR S SW=0
Q
;
HDR S CODE="E001",FOOT="VA TIME & ATTENDANCE SYSTEM" D VLIDSH0,FOOT1^PRSRUT0
I $E(IOST,1,2)="C-" R !,"Press Return to continue. ",II:DTIME S:II="^" POUT=1
Q:POUT!(SW=1)
;
HDR1 W:'SW(7)!($E(IOST)="C") @IOF
D SETTABS
W !?TAB1
W ^TMP($J,"EXP")," ",$S(PP'="":"- "_PP,1:"- ALL"),?(IOM-14),"DATE: ",DAT
W !?TAB2,"T&L Unit: ",$G(TLEU)," Year: ",YEAR,!! D
. W !,"|",?21,"|","BASE",?34,"|","NIGHT",?42,"|","HOLIDA",?48,"|","O/TIME",?58,"|","SUNDAY",?65,"|","ON-CA",?72,"|",?81,"|","REEMP",?89,"|","SAT",?97,"|","GROSS",?108,"|","G/SHARE",?117,"|","GROSS",?131,"|"
. W !,"|","NAME",?21,"|","PAY",?34,"|","DIFF",?42,"|","PAY",?49,"|","PAY",?58,"|","PAY",?65,"|","PAY",?72,"|","AWARDS",?81,"|","ANNUIT",?89,"|","PAY",?97,"|","PAY",?108,"|","BENEFITS",?117,"|","COST",?131,"|" D VLIDSH0 Q
Q
;
VLIDSH0 W !,"|--------------------|------------|-------|------|--------|------|------|--------|-------|-------|----------|--------|-------------|" Q
VLIDSH W !,"|",?21,"| -----------| ------| -----| -------| -----| -----| -------| ------| ------| ---------| -------| ------------|" Q
VLIN0 W !,"|",?21,"|",?34,"|",?42,"|",?49,"|",?58,"|",?65,"|",?72,"|",?81,"|",?89,"|",?97,"|",?108,"|",?117,"|",?131,"|" Q
;
INIT ; initialize tabs and flags
S (PP(1),NAM(1))="",SW=0,SW(7)=1
;
; save off the user entered T&L unit for the report, since we
; have to set TLE to null to traverse the TMP global.
S TLEU=TLE
Q
SETTABS ;set tabs for report header lines
S TAB1=IOM-$L(^TMP($J,"EXP")_" "_$S(PP'="":"- "_PP,1:"- ALL"))\2
S TAB2=IOM-$L("T&L Unit: "_$G(TLE)_" Year: "_YEAR)\2
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSREX11 3781 printed Oct 16, 2024@18:29:11 Page 2
PRSREX11 ;HISC/JH-T & L EXPENDITURE REPORT (Continued) ;7/9/97
+1 ;;4.0;PAID;**2,19,26**;Sep 21, 1995
+2 DO INIT
DO PRINT
+3 KILL TAB1,TAB2
+4 QUIT
+5 ;
PRINT ;routine to loop through temp global and print employee expenditures
+1 SET PP=0
FOR I=0:0
SET PP=$ORDER(^TMP($JOB,"EXP",PP))
if PP'>0
QUIT
if PP'=PP(1)
DO HDR1
if PP(1)=""
SET SW(7)=0
Begin DoDot:1
+2 SET TLE=""
FOR I=0:0
SET TLE=$ORDER(^TMP($JOB,"EXP",PP,TLE))
if TLE=""
QUIT
Begin DoDot:2
+3 SET NAM=""
FOR I=0:0
SET NAM=$ORDER(^TMP($JOB,"EXP",PP,TLE,NAM))
if NAM=""
QUIT
Begin DoDot:3
+4 SET D0=0
FOR I=0:0
SET D0=$ORDER(^TMP($JOB,"EXP",PP,TLE,NAM,D0))
if D0'>0
QUIT
SET TIME=^(D0)
if TIME=""
QUIT
Begin DoDot:4
+5 if $Y>(IOSL-5)
DO HDR
if POUT
QUIT
+6 WRITE !,"|",$EXTRACT(NAM,1,20),?21,"|"
+7 WRITE $JUSTIFY($PIECE(TIME,"^",1),12,2),?34,"|",$JUSTIFY($PIECE(TIME,"^",2),7,2),?42,"|"
+8 WRITE $JUSTIFY($PIECE(TIME,"^",3),6,2),?48,"|",$JUSTIFY($PIECE(TIME,"^",4),8,2),?58,"|"
+9 WRITE $JUSTIFY($PIECE(TIME,"^",5),6,2),?65,"|",$JUSTIFY($PIECE(TIME,"^",6),6,2),?72,"|"
+10 WRITE $JUSTIFY($PIECE(TIME,"^",7),8,2),?80,"|",$JUSTIFY($PIECE(TIME,"^",8),7,2),?88,"|"
+11 WRITE $JUSTIFY($PIECE(TIME,"^",9),7,2),?96,"|"
+12 WRITE $JUSTIFY($PIECE(TIME,"^",10),10,2),?107,"|",$JUSTIFY($PIECE(TIME,"^",11),8,2),?117,"|",$JUSTIFY($PIECE(TIME,"^",12),12,2),?131,"|"
+13 SET PP(1)=PP
SET NAM(1)=NAM
+14 QUIT
End DoDot:4
if POUT
QUIT
+15 QUIT
End DoDot:3
if POUT
QUIT
+16 if POUT
QUIT
DO VLIDSH
SET TOT=^TMP($JOB,"EXP1",PP,TLE)
+17 WRITE !,"|",?6,"T&L ",TLE," Total:",?21,"|",$JUSTIFY($PIECE(TOT,U),12,2),?34,"|",$JUSTIFY($PIECE(TOT,U,2),7,2),?42,"|",$JUSTIFY($PIECE(TOT,U,3),6,2),?48,"|",$JUSTIFY($PIECE(TOT,U,4),8,2),?58,"|"
+18 WRITE $JUSTIFY($PIECE(TOT,U,5),6,2),?65,"|",$JUSTIFY($PIECE(TOT,U,6),6,2),?72,"|",$JUSTIFY($PIECE(TOT,U,7),8,2),?80,"|",$JUSTIFY($PIECE(TOT,U,8),7,2),?88,"|",$JUSTIFY($PIECE(TOT,U,9),7,2),?96,"|"
+19 WRITE $JUSTIFY($PIECE(TOT,U,10),10,2),?107,"|",$JUSTIFY($PIECE(TOT,U,11),8,2),?117,"|",$JUSTIFY($PIECE(TOT,U,12),12,2),?131,"|"
DO VLIN0
SET PP(2)=PP
SET PP(2)=$ORDER(^TMP($JOB,"EXP",PP(2)))
IF PP(2)'=""
IF IOSL<66
FOR II=$Y:1:IOSL-5
DO VLIN0
+20 QUIT
End DoDot:2
if POUT
QUIT
+21 if POUT
QUIT
IF PP(2)'=""
SET SW=1
DO HDR
SET SW=0
QUIT
+22 QUIT
End DoDot:1
if POUT
QUIT
+23 if POUT
QUIT
DO VLIN0
DO VLIDSH
WRITE !,"|","Totals:",?21,"|",$JUSTIFY(TOTAL(1),12,2),?34,"|",$JUSTIFY(TOTAL(2),7,2),?42,"|",$JUSTIFY(TOTAL(3),6,2),?48,"|",$JUSTIFY(TOTAL(4),8,2),?58,"|"
+24 WRITE $JUSTIFY(TOTAL(5),6,2),?65,"|",$JUSTIFY(TOTAL(6),6,2),?72,"|",$JUSTIFY(TOTAL(7),8,2),?80,"|",$JUSTIFY(TOTAL(8),7,2),?88,"|",$JUSTIFY(TOTAL(9),7,2),?96,"|"
+25 WRITE $JUSTIFY(TOTAL,10,2),?107,"|",$JUSTIFY(TGOV,8,2),?117,"|",$JUSTIFY(TOTAL+TGOV,12,2),?131,"|"
+26 IF IOSL<66
FOR I=$Y:1:IOSL-5
DO VLIN0
+27 SET SW=1
DO HDR
SET SW=0
+28 QUIT
+29 ;
HDR SET CODE="E001"
SET FOOT="VA TIME & ATTENDANCE SYSTEM"
DO VLIDSH0
DO FOOT1^PRSRUT0
+1 IF $EXTRACT(IOST,1,2)="C-"
READ !,"Press Return to continue. ",II:DTIME
if II="^"
SET POUT=1
+2 if POUT!(SW=1)
QUIT
+3 ;
HDR1 if 'SW(7)!($EXTRACT(IOST)="C")
WRITE @IOF
+1 DO SETTABS
+2 WRITE !?TAB1
+3 WRITE ^TMP($JOB,"EXP")," ",$SELECT(PP'="":"- "_PP,1:"- ALL"),?(IOM-14),"DATE: ",DAT
+4 WRITE !?TAB2,"T&L Unit: ",$GET(TLEU)," Year: ",YEAR,!!
Begin DoDot:1
+5 WRITE !,"|",?21,"|","BASE",?34,"|","NIGHT",?42,"|","HOLIDA",?48,"|","O/TIME",?58,"|","SUNDAY",?65,"|","ON-CA",?72,"|",?81,"|","REEMP",?89,"|","SAT",?97,"|","GROSS",?108,"|","G/SHARE",?117,"|","GROSS",?131,"|"
+6 WRITE !,"|","NAME",?21,"|","PAY",?34,"|","DIFF",?42,"|","PAY",?49,"|","PAY",?58,"|","PAY",?65,"|","PAY",?72,"|","AWARDS",?81,"|","ANNUIT",?89,"|","PAY",?97,"|","PAY",?108,"|","BENEFITS",?117,"|","COST",?131,"|"
DO VLIDSH0
QUIT
End DoDot:1
+7 QUIT
+8 ;
VLIDSH0 WRITE !,"|--------------------|------------|-------|------|--------|------|------|--------|-------|-------|----------|--------|-------------|"
QUIT
VLIDSH WRITE !,"|",?21,"| -----------| ------| -----| -------| -----| -----| -------| ------| ------| ---------| -------| ------------|"
QUIT
VLIN0 WRITE !,"|",?21,"|",?34,"|",?42,"|",?49,"|",?58,"|",?65,"|",?72,"|",?81,"|",?89,"|",?97,"|",?108,"|",?117,"|",?131,"|"
QUIT
+1 ;
INIT ; initialize tabs and flags
+1 SET (PP(1),NAM(1))=""
SET SW=0
SET SW(7)=1
+2 ;
+3 ; save off the user entered T&L unit for the report, since we
+4 ; have to set TLE to null to traverse the TMP global.
+5 SET TLEU=TLE
+6 QUIT
SETTABS ;set tabs for report header lines
+1 SET TAB1=IOM-$LENGTH(^TMP($JOB,"EXP")_" "_$SELECT(PP'="":"- "_PP,1:"- ALL"))\2
+2 SET TAB2=IOM-$LENGTH("T&L Unit: "_$GET(TLE)_" Year: "_YEAR)\2
+3 QUIT