PRSDYTD ;HISC/GWB-COMPUTE YTD TOTALS ;2/15/94 13:20
;;4.0;PAID;;Sep 21, 1995
S (BASYTD,LOCYTD,SPRYTD,SSAYTD,NDFYTD,SATYTD,SUNYTD,HOLYTD)=0
S (OVRYTD,ONCYTD,STBYTD,INCYTD,PERYTD,HBDYTD,TSPYTD)=0
D NOW^%DTC S PYR=$E(%,1,3),PDT=$E(%,1,3)_"0000"
F S PDT=$O(^PRST(459,"AC",PDT)) Q:$E(PDT,1,3)'=PYR S PPIEN=0,PPIEN=$O(^PRST(459,"AC",PDT,PPIEN)) D
.I $D(^PRST(459,PPIEN,"P",DA,1)) D
..S HBDYTD=HBDYTD+$P(^PRST(459,PPIEN,"P",DA,1),"^",17)
.I $D(^PRST(459,PPIEN,"P",DA,2)) D
..S TSPCSF=$P(^PRST(459,PPIEN,"P",DA,2),"^",10)
..S TSPFIF=$P(^PRST(459,PPIEN,"P",DA,2),"^",11)
..S TSPGSF=$P(^PRST(459,PPIEN,"P",DA,2),"^",12)
..S TSPYTD=TSPYTD+(TSPCSF+TSPFIF+TSPGSF)
.I $D(^PRST(459,PPIEN,"P",DA,5)) D
..S BASYTD=BASYTD+$P(^PRST(459,PPIEN,"P",DA,5),"^",5)
..S HOLYTD=HOLYTD+$P(^PRST(459,PPIEN,"P",DA,5),"^",8)
..S NDFYTD=NDFYTD+$P(^PRST(459,PPIEN,"P",DA,5),"^",10)
..S ONCYTD=ONCYTD+$P(^PRST(459,PPIEN,"P",DA,5),"^",13)
..S OVRYTD=OVRYTD+$P(^PRST(459,PPIEN,"P",DA,5),"^",14)
..S SATYTD=SATYTD+$P(^PRST(459,PPIEN,"P",DA,5),"^",17)
..S STBYTD=STBYTD+$P(^PRST(459,PPIEN,"P",DA,5),"^",18)
..S SUNYTD=SUNYTD+$P(^PRST(459,PPIEN,"P",DA,5),"^",19)
..S INCYTD=INCYTD+$P(^PRST(459,PPIEN,"P",DA,5),"^",24)
..S PERYTD=PERYTD+$P(^PRST(459,PPIEN,"P",DA,5),"^",31)
.I $D(^PRST(459,PPIEN,"P",DA,6)) D
..S SSAYTD=SSAYTD+$P(^PRST(459,PPIEN,"P",DA,6),"^",3)
..S SPRYTD=SPRYTD+$P(^PRST(459,PPIEN,"P",DA,6),"^",4)
.I $D(^PRST(459,PPIEN,"P",DA,8)) D
..S LOCYTD=LOCYTD+$P(^PRST(459,PPIEN,"P",DA,8),"^",30)
Q
DSPYTD ;Display YTD totals
W:BASYTD'=0 !,"BASE PAY YTD",?30,$J($FN(BASYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:LOCYTD'=0 !,"LOCALITY PAY YTD",?30,$J($FN(LOCYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:SPRYTD'=0 !,"SPECIAL PAY RATE DIFF YTD",?30,$J($FN(SPRYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:SSAYTD'=0 !,"SPECIAL SALARY ADJ YTD",?30,$J($FN(SSAYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:NDFYTD'=0 !,"NIGHT DIFF AMT YTD",?30,$J($FN(NDFYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:SATYTD'=0 !,"SATURDAY AMT YTD",?30,$J($FN(SATYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:SUNYTD'=0 !,"SUNDAY AMT YTD",?30,$J($FN(SUNYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:HOLYTD'=0 !,"HOLIDAY AMT YTD",?30,$J($FN(HOLYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:OVRYTD'=0 !,"OVERTIME AMT YTD",?30,$J($FN(OVRYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:ONCYTD'=0 !,"ON CALL AMT YTD",?30,$J($FN(ONCYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:STBYTD'=0 !,"STANDBY AMT YTD",?30,$J($FN(STBYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:INCYTD'=0 !,"INCENTIVE AWARDS YTD",?30,$J($FN(INCYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
W:PERYTD'=0 !,"PERFORMANCE AWARDS YTD",?30,$J($FN(PERYTD,",",2),14)
D CHECK^PRSDV450 G:PRTC=0 YTDEX I PRTC=1 D HDR^PRSDSRS S PRTC=""
Q
YTDEX ;KILL YTD variables
K BASYTD,LOCYTD,SPRYTD,SSAYTD,NDFYTD,SATYTD,SUNYTD,HOLYTD,OVRYTD,ONCYTD
K STBYTD,INCYTD,PERYTD,HBDYTD,TSPGSF,TSPFIF,TSPCSF,TSPYTD,PYR,PDT,PPIEN
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSDYTD 3463 printed Nov 22, 2024@17:36:19 Page 2
PRSDYTD ;HISC/GWB-COMPUTE YTD TOTALS ;2/15/94 13:20
+1 ;;4.0;PAID;;Sep 21, 1995
+2 SET (BASYTD,LOCYTD,SPRYTD,SSAYTD,NDFYTD,SATYTD,SUNYTD,HOLYTD)=0
+3 SET (OVRYTD,ONCYTD,STBYTD,INCYTD,PERYTD,HBDYTD,TSPYTD)=0
+4 DO NOW^%DTC
SET PYR=$EXTRACT(%,1,3)
SET PDT=$EXTRACT(%,1,3)_"0000"
+5 FOR
SET PDT=$ORDER(^PRST(459,"AC",PDT))
if $EXTRACT(PDT,1,3)'=PYR
QUIT
SET PPIEN=0
SET PPIEN=$ORDER(^PRST(459,"AC",PDT,PPIEN))
Begin DoDot:1
+6 IF $DATA(^PRST(459,PPIEN,"P",DA,1))
Begin DoDot:2
+7 SET HBDYTD=HBDYTD+$PIECE(^PRST(459,PPIEN,"P",DA,1),"^",17)
End DoDot:2
+8 IF $DATA(^PRST(459,PPIEN,"P",DA,2))
Begin DoDot:2
+9 SET TSPCSF=$PIECE(^PRST(459,PPIEN,"P",DA,2),"^",10)
+10 SET TSPFIF=$PIECE(^PRST(459,PPIEN,"P",DA,2),"^",11)
+11 SET TSPGSF=$PIECE(^PRST(459,PPIEN,"P",DA,2),"^",12)
+12 SET TSPYTD=TSPYTD+(TSPCSF+TSPFIF+TSPGSF)
End DoDot:2
+13 IF $DATA(^PRST(459,PPIEN,"P",DA,5))
Begin DoDot:2
+14 SET BASYTD=BASYTD+$PIECE(^PRST(459,PPIEN,"P",DA,5),"^",5)
+15 SET HOLYTD=HOLYTD+$PIECE(^PRST(459,PPIEN,"P",DA,5),"^",8)
+16 SET NDFYTD=NDFYTD+$PIECE(^PRST(459,PPIEN,"P",DA,5),"^",10)
+17 SET ONCYTD=ONCYTD+$PIECE(^PRST(459,PPIEN,"P",DA,5),"^",13)
+18 SET OVRYTD=OVRYTD+$PIECE(^PRST(459,PPIEN,"P",DA,5),"^",14)
+19 SET SATYTD=SATYTD+$PIECE(^PRST(459,PPIEN,"P",DA,5),"^",17)
+20 SET STBYTD=STBYTD+$PIECE(^PRST(459,PPIEN,"P",DA,5),"^",18)
+21 SET SUNYTD=SUNYTD+$PIECE(^PRST(459,PPIEN,"P",DA,5),"^",19)
+22 SET INCYTD=INCYTD+$PIECE(^PRST(459,PPIEN,"P",DA,5),"^",24)
+23 SET PERYTD=PERYTD+$PIECE(^PRST(459,PPIEN,"P",DA,5),"^",31)
End DoDot:2
+24 IF $DATA(^PRST(459,PPIEN,"P",DA,6))
Begin DoDot:2
+25 SET SSAYTD=SSAYTD+$PIECE(^PRST(459,PPIEN,"P",DA,6),"^",3)
+26 SET SPRYTD=SPRYTD+$PIECE(^PRST(459,PPIEN,"P",DA,6),"^",4)
End DoDot:2
+27 IF $DATA(^PRST(459,PPIEN,"P",DA,8))
Begin DoDot:2
+28 SET LOCYTD=LOCYTD+$PIECE(^PRST(459,PPIEN,"P",DA,8),"^",30)
End DoDot:2
End DoDot:1
+29 QUIT
DSPYTD ;Display YTD totals
+1 if BASYTD'=0
WRITE !,"BASE PAY YTD",?30,$JUSTIFY($FNUMBER(BASYTD,",",2),14)
+2 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+3 if LOCYTD'=0
WRITE !,"LOCALITY PAY YTD",?30,$JUSTIFY($FNUMBER(LOCYTD,",",2),14)
+4 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+5 if SPRYTD'=0
WRITE !,"SPECIAL PAY RATE DIFF YTD",?30,$JUSTIFY($FNUMBER(SPRYTD,",",2),14)
+6 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+7 if SSAYTD'=0
WRITE !,"SPECIAL SALARY ADJ YTD",?30,$JUSTIFY($FNUMBER(SSAYTD,",",2),14)
+8 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+9 if NDFYTD'=0
WRITE !,"NIGHT DIFF AMT YTD",?30,$JUSTIFY($FNUMBER(NDFYTD,",",2),14)
+10 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+11 if SATYTD'=0
WRITE !,"SATURDAY AMT YTD",?30,$JUSTIFY($FNUMBER(SATYTD,",",2),14)
+12 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+13 if SUNYTD'=0
WRITE !,"SUNDAY AMT YTD",?30,$JUSTIFY($FNUMBER(SUNYTD,",",2),14)
+14 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+15 if HOLYTD'=0
WRITE !,"HOLIDAY AMT YTD",?30,$JUSTIFY($FNUMBER(HOLYTD,",",2),14)
+16 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+17 if OVRYTD'=0
WRITE !,"OVERTIME AMT YTD",?30,$JUSTIFY($FNUMBER(OVRYTD,",",2),14)
+18 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+19 if ONCYTD'=0
WRITE !,"ON CALL AMT YTD",?30,$JUSTIFY($FNUMBER(ONCYTD,",",2),14)
+20 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+21 if STBYTD'=0
WRITE !,"STANDBY AMT YTD",?30,$JUSTIFY($FNUMBER(STBYTD,",",2),14)
+22 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+23 if INCYTD'=0
WRITE !,"INCENTIVE AWARDS YTD",?30,$JUSTIFY($FNUMBER(INCYTD,",",2),14)
+24 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+25 if PERYTD'=0
WRITE !,"PERFORMANCE AWARDS YTD",?30,$JUSTIFY($FNUMBER(PERYTD,",",2),14)
+26 DO CHECK^PRSDV450
if PRTC=0
GOTO YTDEX
IF PRTC=1
DO HDR^PRSDSRS
SET PRTC=""
+27 QUIT
YTDEX ;KILL YTD variables
+1 KILL BASYTD,LOCYTD,SPRYTD,SSAYTD,NDFYTD,SATYTD,SUNYTD,HOLYTD,OVRYTD,ONCYTD
+2 KILL STBYTD,INCYTD,PERYTD,HBDYTD,TSPGSF,TSPFIF,TSPCSF,TSPYTD,PYR,PDT,PPIEN
+3 QUIT