ACRPTVS ; GENERATED FROM 'ACR TRAVEL VOUCHER SUMMARY' PRINT TEMPLATE (#3963) ; 09/30/09 ; (FILE 9002196, MARGIN=80)
G BEGIN
N W !
T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
Q
DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
W Y Q
M D @DIXX
Q
BEGIN ;
S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
S I(0)="^ACRDOC(",J(0)=9002196
I $E($G(IOST),1,2)="C-" W "ARMS REF: ",$P(^ACRDOC(D0,0),U,6),"/",D0 K DIP K:DN Y
S ACRDOCDA=D0 K DIP K:DN Y
D N:$X>9 Q:'DN W ?9 W "DHHS/INDIAN HEALTH SERVICE - TRAVEL VOUCHER"
D N:$X>9 Q:'DN W ?9 W "TRAVEL ORDER #:"
S X=$G(^ACRDOC(D0,0)) W ?26,$E($P(X,U,1),1,17)
D N:$X>44 Q:'DN W ?44 W "VOUCHER NO.:"
W ?58,$E($P(X,U,2),1,15)
D N:$X>1 Q:'DN W ?1 W "DHHS ORDER #: "
W $$EXPDN^ACRFUTL(D0) K DIP K:DN Y
D N:$X>0 Q:'DN W ?0 W "--------------------------------------------------------------------------------"
D N:$X>0 Q:'DN W ?0 W "TRAVELER........:"
S X=$G(^ACRDOC(D0,"TO")) D N:$X>19 Q:'DN W ?19 S Y=$P(X,U,9) S Y(0)=Y S Y=$$NAME2^ACRFUTL1(Y) W $E(Y,1,30)
D N:$X>51 Q:'DN W ?51 W "DEPART:"
S X=$G(^ACRDOC(D0,"TO")) W ?60 S Y=$P(X,U,14) D DT
D N:$X>0 Q:'DN W ?0 W "SOC SECURITY NO.: "
W $$PSSN^ACRFUTL($P($G(^ACRDOC(D0,"TO")),U,9),$G(DUZ),$G(IOST),$G(ACRSSNOK)) K DIP K:DN Y
D N:$X>51 Q:'DN W ?51 W "RETURN:"
S X=$G(^ACRDOC(D0,"TO")) W ?60 S Y=$P(X,U,15) D DT
D N:$X>0 Q:'DN W ?0 W "PRESENT STATION.:"
D N:$X>19 Q:'DN W ?19 S Y=$P(X,U,13) S Y=$S(Y="":Y,$D(^AUTTLOC(Y,0))#2:$P(^(0),U),1:Y) S Y=$S(Y="":Y,$D(^DIC(4,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
D N:$X>0 Q:'DN W ?0 W "---------- TRAVEL ADVANCE -----------"
D N:$X>39 Q:'DN W ?39 W "--------- CASH PAYMENT RECEIPT --------"
D N:$X>0 Q:'DN W ?0 W "OUTSTANDING..........:"
W ?24 S Y=$P(X,U,25) W:Y]"" $J(Y,8,2)
D N:$X>39 Q:'DN W ?39 W "| DATE RECEIVED:"
D N:$X>59 Q:'DN W ?59 W "| AMOUNT RECEIVED:"
D N:$X>0 Q:'DN W ?0 W "AMOUNT TO BE APPLIED.:"
W ?24 S Y=$P(X,U,25) W:Y]"" $J(Y,8,2)
D N:$X>39 Q:'DN W ?39 W "|___________________|___________________"
D N:$X>0 Q:'DN W ?0 W "AMOUNT DUE GOVERNMENT:"
D EN11^ACRFCLM K DIP K:DN Y
I $G(ACRADV)>$G(ACRX) W $J($FN(ACRADV-ACRX,"P",2),11) K DIP K:DN Y
D N:$X>39 Q:'DN W ?39 W "| PAYEE'S SIGNATURE:"
D PAUSE^ACRFWARN K DIP K:DN Y
S ACRY="PURPOSE OF TRAVEL" D JUST^ACRFSSD1 K DIP K:DN Y
D ^ACRFCLM K DIP K:DN Y
D EXIT^ACRFCLM K DIP K:DN Y
D ^ACRFPSS K DIP K:DN Y
K Y
Q
HEAD ;
W !,"--------------------------------------------------------------------------------",!!
ACRPTVS ; GENERATED FROM 'ACR TRAVEL VOUCHER SUMMARY' PRINT TEMPLATE (#3963) ; 09/30/09 ; (FILE 9002196, MARGIN=80)
+1 GOTO BEGIN
N WRITE !
T IF $X
WRITE !
IF '$DATA(DIOT(2))
IF DN
IF $DATA(IOSL)
IF $SELECT('$DATA(DIWF):1,$PIECE(DIWF,"B",2):$PIECE(DIWF,"B",2),1:1)+$Y'<IOSL
IF $DATA(^UTILITY($JOB,1))#2
IF ^(1)?1U1P1E.E
XECUTE ^(1)
+1 SET DISTP=DISTP+1
SET DILCT=DILCT+1
IF '(DISTP#100)
DO CSTP^DIO2
+2 QUIT
DT IF $GET(DUZ("LANG"))>1
IF Y
WRITE $$OUT^DIALOGU(Y,"DD")
QUIT
+1 IF Y
WRITE $PIECE("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$EXTRACT(Y,4,5))_" "
IF Y#100
WRITE $JUSTIFY(Y#100\1,2)_","
WRITE Y\10000+1700
IF Y#1
WRITE " "_$EXTRACT(Y_0,9,10)_":"_$EXTRACT(Y_"000",11,12)
QUIT
+2 WRITE Y
QUIT
M DO @DIXX
+1 QUIT
BEGIN ;
+1 IF '$DATA(DN)
SET DN=1
SET DISTP=$GET(DISTP)
SET DILCT=$GET(DILCT)
+2 SET I(0)="^ACRDOC("
SET J(0)=9002196
+3 IF $EXTRACT($GET(IOST),1,2)="C-"
WRITE "ARMS REF: ",$PIECE(^ACRDOC(D0,0),U,6),"/",D0
KILL DIP
IF DN
KILL Y
+4 SET ACRDOCDA=D0
KILL DIP
IF DN
KILL Y
+5 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
WRITE "DHHS/INDIAN HEALTH SERVICE - TRAVEL VOUCHER"
+6 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
WRITE "TRAVEL ORDER #:"
+7 SET X=$GET(^ACRDOC(D0,0))
WRITE ?26,$EXTRACT($PIECE(X,U,1),1,17)
+8 IF $X>44
DO N
IF 'DN
QUIT
WRITE ?44
WRITE "VOUCHER NO.:"
+9 WRITE ?58,$EXTRACT($PIECE(X,U,2),1,15)
+10 IF $X>1
DO N
IF 'DN
QUIT
WRITE ?1
WRITE "DHHS ORDER #: "
+11 WRITE $$EXPDN^ACRFUTL(D0)
KILL DIP
IF DN
KILL Y
+12 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "--------------------------------------------------------------------------------"
+13 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "TRAVELER........:"
+14 SET X=$GET(^ACRDOC(D0,"TO"))
IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
SET Y=$PIECE(X,U,9)
SET Y(0)=Y
SET Y=$$NAME2^ACRFUTL1(Y)
WRITE $EXTRACT(Y,1,30)
+15 IF $X>51
DO N
IF 'DN
QUIT
WRITE ?51
WRITE "DEPART:"
+16 SET X=$GET(^ACRDOC(D0,"TO"))
WRITE ?60
SET Y=$PIECE(X,U,14)
DO DT
+17 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "SOC SECURITY NO.: "
+18 WRITE $$PSSN^ACRFUTL($PIECE($GET(^ACRDOC(D0,"TO")),U,9),$GET(DUZ),$GET(IOST),$GET(ACRSSNOK))
KILL DIP
IF DN
KILL Y
+19 IF $X>51
DO N
IF 'DN
QUIT
WRITE ?51
WRITE "RETURN:"
+20 SET X=$GET(^ACRDOC(D0,"TO"))
WRITE ?60
SET Y=$PIECE(X,U,15)
DO DT
+21 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "PRESENT STATION.:"
+22 IF $X>19
DO N
IF 'DN
QUIT
WRITE ?19
SET Y=$PIECE(X,U,13)
SET Y=$SELECT(Y="":Y,$DATA(^AUTTLOC(Y,0))#2:$PIECE(^(0),U),1:Y)
SET Y=$SELECT(Y="":Y,$DATA(^DIC(4,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+23 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "---------- TRAVEL ADVANCE -----------"
+24 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "--------- CASH PAYMENT RECEIPT --------"
+25 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "OUTSTANDING..........:"
+26 WRITE ?24
SET Y=$PIECE(X,U,25)
IF Y]""
WRITE $JUSTIFY(Y,8,2)
+27 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "| DATE RECEIVED:"
+28 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "| AMOUNT RECEIVED:"
+29 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "AMOUNT TO BE APPLIED.:"
+30 WRITE ?24
SET Y=$PIECE(X,U,25)
IF Y]""
WRITE $JUSTIFY(Y,8,2)
+31 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "|___________________|___________________"
+32 IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "AMOUNT DUE GOVERNMENT:"
+33 DO EN11^ACRFCLM
KILL DIP
IF DN
KILL Y
+34 IF $GET(ACRADV)>$GET(ACRX)
WRITE $JUSTIFY($FNUMBER(ACRADV-ACRX,"P",2),11)
KILL DIP
IF DN
KILL Y
+35 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "| PAYEE'S SIGNATURE:"
+36 DO PAUSE^ACRFWARN
KILL DIP
IF DN
KILL Y
+37 SET ACRY="PURPOSE OF TRAVEL"
DO JUST^ACRFSSD1
KILL DIP
IF DN
KILL Y
+38 DO ^ACRFCLM
KILL DIP
IF DN
KILL Y
+39 DO EXIT^ACRFCLM
KILL DIP
IF DN
KILL Y
+40 DO ^ACRFPSS
KILL DIP
IF DN
KILL Y
+41 KILL Y
+42 QUIT
HEAD ;
+1 WRITE !,"--------------------------------------------------------------------------------",!!