ACRFXMY ;IHS/OIRM/DSD/THL,AEF - SEND ARMS MESSAGES TO MM; [ 09/26/2005 10:20 AM ]
;;2.1;ADMIN RESOURCE MGT SYSTEM;**5,19**;NOV 05, 2001
;;ROUTINE USED TO PROCESS MAILMAN MESSAGES GENERATED BY VARIOUS ARMS
;;FUNCTIONS
XMY ;EP;
S:$D(ACRAPDA) ACRAPDAX=ACRAPDA
N ACRAPDA
K XMY
S ACRAPDA=0
F S ACRAPDA=$O(^ACRAPVS("AB",ACRDOCDA,ACRAPDA)) Q:'ACRAPDA D
.S ACRDT=$G(^ACRAPVS(ACRAPDA,"DT"))
.S ACR0=$G(^ACRAPVS(ACRAPDA,0))
.Q:$P(ACRDT,U)=""
.I $P(ACRDT,U,2),$P(ACR0,U,6)=$P(^ACRDOC(ACRDOCDA,0),U,13) D XMY1
S XMY($P(^ACROBL(ACRDOCDA,0),U,5))=""
S XMY(DUZ)=""
I ACRAPDAS="D" D
. I $G(ACRAPDAX) Q:$P(^ACRAPVS(ACRAPDAX,0),U,11)
.S DA=ACRDOCDA
.S DIE="^ACROBL("
.S DR="905////D"
.D DIE^ACRFDIC
S:$D(ACRAPDAX) ACRAPDA=ACRAPDAX
K:'$D(ACRAPDAX) ACRAPDA
K ACRAPDAX
D:$D(XMY) MESSAGE
Q
XMY1 S XMY($P(ACRDT,U,2))=""
I $P(ACRDT,U,6),$P(ACRDT,U,6)'=$P(ACRDT,U,2) S XMY($P(ACRDT,U,6))=""
Q
MESSAGE ;EP;
I $G(ACRAPDA) D
.W !!,"One moment please, message being delivered."
.H 2
.S ^ACROBL(ACRDOCDA,"CNG")=$G(^ACRAPVS(ACRAPDA,"CNG"))
.S ^ACROBL(ACRDOCDA,"RSN")=$G(^ACRAPVS(ACRAPDA,"RSN"))
I '$G(ACRAPDA) D
.S DA=ACRDOCDA
.S DIE="^ACROBL("
.S DR="[ACR REASON FOR CHANGE]"
.D DDS^ACRFDIC
.Q:'$D(ACRSCREN)
.K ACRSCREN
.W !
.D DIE^ACRFDIC
S ACRCNG=$G(^ACROBL(ACRDOCDA,"CNG"))
S ACRRSN=$G(^ACROBL(ACRDOCDA,"RSN"))
S ACRDOC0=^ACRDOC(ACRDOCDA,0)
I $G(ACRAPDA) D
. I $P(^ACRAPVS(ACRAPDA,0),U,11) S XMB(1)="TRAVEL ADVANCE for "
S XMB(1)=$G(XMB(1))_"Document no. "_$P(ACRDOC0,U)_" ("_$S($P(ACRDOC0,U,2)]""&($P(ACRDOC0,U)'=$P(ACRDOC0,U,2)):$P(ACRDOC0,U,2)_" - ",1:"")_$P(^ACRDOC(ACRDOCDA,0),U,14)_") ,was "
S XMB(1)=XMB(1)_$S(ACRAPDAS="A":"APPROVED",ACRAPDAS="R":"RETURNED FOR CLARIFICATION",ACRAPDAS="D":"DISAPPROVD",1:"PROCESSED, READ COMMENTS BELOW")_" by "
;S XMB(2)=$P(^VA(200,DUZ,0),U) ;ACR*2.1*19.02 IM16848
S XMB(2)=$$NAME2^ACRFUTL1(DUZ) ;ACR*2.1*19.02 IM16848
S XMB(2)=$P($P(XMB(2),",",2)," ")_" "_$P(XMB(2),",")
S XMB(3)=$S($G(ACRAPDA):$P(^ACRAPVT($P(^ACRAPVS(ACRAPDA,0),U,3),0),U),1:"")
S XMB(3)=$P($P(XMB(3),",",2)," ")_" "_$P(XMB(3),",")
S XMB(2)=XMB(2)_" as the "_XMB(3)
S XMB(3)=" "
S XMB(4)="Information which needs to be changed:"
I ACRCNG]"" D
.N ACRI
.F ACRI=1:1:5 S:$P(ACRCNG,U,ACRI)]"" XMB(ACRI+4)=$P(ACRCNG,U,ACRI)
S XMB(10)=" "
S XMB(11)="Reason for change: "
I ACRRSN]"" D
.N ACRI
.F ACRI=1:1:5 S:$P(ACRRSN,U,ACRI)]"" XMB(ACRI+11)=$P(ACRRSN,U,ACRI)
S XMDUZ=.5
S XMTEXT="XMB("
S XMSUB="REQUEST COMMENT/DISAPPROVAL NOTIFICATION"
S XMB="ACR REQUEST STATUS"
D ^XMD
K ACRAPV,ACRCNG,ACRRSN,XMB,XMDUZ,XMSUB,XMY,XMTEXT
Q
TVAPP ;EP;TO SEND MESSAGE TO TRAVELER WHEN PAYMENT IS CERTIFIED
Q:'$P($G(^ACRDOC(ACRDOCDA,"TO")),U,9)
N ACRDUZ
S ACRDUZ=$P(^ACRDOC(ACRDOCDA,"TO"),U,9)
S XMY(ACRDUZ)=""
S ACRDOC0=^ACRDOC(ACRDOCDA,0)
;S XMB(1)="The Travel Voucher for Travel Order NO. "_$P(ACRDOC0,U)_" ("_$P(ACRDOC0,U,14)_") for "_$P($G(^VA(200,+ACRDUZ,0)),U) ;ACR*2.1*19.02 IM16848
S XMB(1)="The Travel Voucher for Travel Order NO. "_$P(ACRDOC0,U)_" ("_$P(ACRDOC0,U,14)_") for "_$$NAME2^ACRFUTL1(+ACRDUZ) ;ACR*2.1*19.02 IM16848
S Y=$P(^ACRAPVS(ACRAPDA,"DT"),U,4)
X ^DD("DD")
S X=$P(^ACRAPVS(ACRAPDA,"DT"),U,2)
;S XMB(2)="was Certified for Payment on "_Y_" by "_$P($G(^VA(200,+X,0)),U) ;ACR*2.1*19.02 IM16848
;S XMB(3)="Payment should be made to "_$P($G(^VA(200,+ACRDUZ,0)),U) ;ACR*2.1*19.02 IM16848
S XMB(2)="was Certified for Payment on "_Y_" by "_$$NAME2^ACRFUTL1(+X) ;ACR*2.1*19.02 IM16848
S XMB(3)="Payment should be made to "_$$NAME2^ACRFUTL1(+ACRDUZ) ;ACR*2.1*19.02 IM16848
D ^ACRFTOT
S:$G(ACRREIM)]"" XMB(4)="in the amount of "_$FN(ACRREIM,"P,",2)_" on Schedule No.: "_$P($G(^ACRDOC(ACRDOCDA,18)),U,3)
S XMDUZ=.5
S XMTEXT="XMB("
S XMSUB="TRAVEL VOUCHER CERTIFIED FOR PAYMENT"
S XMB="ACR TV CERT FOR PAY"
D ^XMD
Q
TOAPP ;EP;TO SEND MESSAGE TO TRAVELER WHEN PAYMENT IS CERTIFIED
Q:'$P($G(^ACRDOC(ACRDOCDA,"TO")),U,9) S ACRDUZ=$P(^("TO"),U,9)
S XMY(ACRDUZ)=""
S ACRDOC0=^ACRDOC(ACRDOCDA,0)
;S XMB(1)="Travel Order NO. "_$P(ACRDOC0,U)_" ("_$P(ACRDOC0,U,14)_") for"_$P($G(^VA(200,+ACRDUZ,0)),U) ;ACR*2.19*1.02 IM16848
S XMB(1)="Travel Order NO. "_$P(ACRDOC0,U)_" ("_$P(ACRDOC0,U,14)_") for"_$$NAME2^ACRFUTL1(+ACRDUZ) ;ACR*2.1*19.02 IM16848
S Y=$P(^ACRAPVS(ACRAPDA,"DT"),U,4)
X ^DD("DD")
S X=$P(^ACRAPVS(ACRAPDA,"DT"),U,2)
;S XMB(2)="was approved on "_Y_" by "_$P($G(^VA(200,+X,0)),U) ;ACR*2.1*19.02 IM16848
S XMB(2)="was approved on "_Y_" by "_$$NAME2^ACRFUTL1(+X) ;ACR*2.1*19.02 IM16848
S XMDUZ=.5
S XMTEXT="XMB("
S XMSUB="TRAVEL ORDER APPROVED"
S XMB="ACR TO SIGNED"
D ^XMD
Q
POAPP ;EP;TO SEND MESSAGE TO REQUEST INITIATOR WHEN PO IS SIGNED
Q:'$P($G(^ACRDOC(ACRDOCDA,"REQ2")),U,8)
S XMY($P(^ACRDOC(ACRDOCDA,"REQ2"),U,8))=""
S ACRDOC0=^ACRDOC(ACRDOCDA,0)
S XMB(1)="Purchase Order NO. "_$P(ACRDOC0,U,2)_" ("_$P(ACRDOC0,U)_" - "_$P(ACRDOC0,U,14)_")"
S Y=$P(^ACRAPVS(ACRAPDA,"DT"),U,4)
X ^DD("DD")
S X=$P(^ACRAPVS(ACRAPDA,"DT"),U,2)
;S XMB(2)="was approved on "_Y_" by "_$P($G(^VA(200,+X,0)),U) ;ACR*2.1*19.02 IM16848
S XMB(2)="was approved on "_Y_" by "_$$NAME2^ACRFUTL1(+X) ;ACR*2.1*19.02 IM16848
S XMDUZ=.5
S XMTEXT="XMB("
S XMSUB="PO SIGNED"
S XMB="ACR PO SIGNED"
D ^XMD
Q
TRAPP ;EP;TO SEND MESSAGE TO REQUEST INITIATOR WHEN PO IS SIGNED
Q:'$P($G(^ACRDOC(ACRDOCDA,"TRNG")),U,2) S ACRDUZ=$P(^("TRNG"),U,2)
S XMY(ACRDUZ)=""
S ACRDOC0=^ACRDOC(ACRDOCDA,0)
;S XMB(1)="Training Request NO. "_$P(ACRDOC0,U,2)_" ("_$P(ACRDOC0,U)_" - "_$P(ACRDOC0,U,14)_") for "_$P($G(^VA(200,+ACRDUZ,0)),U) ;ACR*2.1*19.02 IM16848
S XMB(1)="Training Request NO. "_$P(ACRDOC0,U,2)_" ("_$P(ACRDOC0,U)_" - "_$P(ACRDOC0,U,14)_") for "_$$NAME2^ACRFUTL1(+ACRDUZ) ;ACR*2.1*19.02 IM16848
S Y=$P(^ACRAPVS(ACRAPDA,"DT"),U,4)
X ^DD("DD")
S X=$P(^ACRAPVS(ACRAPDA,"DT"),U,2)
;S XMB(2)="was approved on "_Y_" by "_$P($G(^VA(200,+X,0)),U) ;ACR*2.1*19.02 IM16848
S XMB(2)="was approved on "_Y_" by "_$$NAME2^ACRFUTL1(+X) ;ACR*2.1*19.02 IM16848
S XMDUZ=.5
S XMTEXT="XMB("
S XMSUB="TRAINING REQUEST SIGNED"
S XMB="ACR TR SIGNED"
D ^XMD
Q
TO25(ACRDOCDA,ACRAPDA) ;EP;TO SEND MESSAGE TO AREA FMO WHEN AMOUNT IS GREATER THAN 2500 ;ACR*2.1*5.15
;ALSO SENDS MESSAGE TO THE TRAVEL VOUCHER AUDITOR
;ENTERS WITH FMS DOCUMENT IEN AND FMS REQUEST CONTROLLER FILE IEN
;
N ACRDUZ,ACRFMO,ACRAMT,ACRTMP,ACRDOC0,ACRNAM,ACRID,XMY
N ACRDOC,X,Y,XMDUZ,XMTEXT,XMSUB
S ACRDUZ=$P($G(^ACRDOC(ACRDOCDA,"TO")),U,9) ; TRAVELER
Q:'ACRDUZ
S ACRAMT=$$TOTAMT^ACRFSSU(ACRDOCDA) ; TOTAL AMOUNT
Q:ACRAMT<2500
S ACRFMO=$P($G(^ACRDOC(ACRDOCDA,"REQ1")),U,13) ; AREA FMO
Q:'ACRFMO
S ACRFMO=$$NAME^ACRFUTL1(ACRFMO)
S XMY(ACRFMO)=""
S ACRTVA=$P($G(^ACRDOC(ACRDOCDA,"TO")),U,24) ;TRAVEL VOUCHER AUDITOR
I ACRTVA]"" D
.S ACRTVA=$$NAME^ACRFUTL1(ACRTVA)
.S XMY(ACRTVA)=""
S ACRDOC0=^ACRDOC(ACRDOCDA,0)
S ACRDOC=$P(ACRDOC0,U)
S ACRNAM=$$NAME^ACRFUTL1(ACRDUZ)
S ACRID=$P(ACRDOC0,U,14) ; DOCUMENT ID
S XMB(1)="Travel Order NO. "_ACRDOC_" ("_ACRID_") for "_ACRNAM
S X=$P(^ACRAPVS(ACRAPDA,"DT"),U,2) ; REQUESTED BY
S ACRNAM=$$NAME^ACRFUTL1(X)
S Y=DT X ^DD("DD")
S XMB(2)="for "_ACRAMT_" was requested on "_Y_" by "_ACRNAM
S XMDUZ=.5
S XMTEXT="XMB("
S XMSUB="TRAVEL ORDER REQ >$2500"
S XMB="ACR TO REQ >2500"
D ^XMD
Q
ACRFXMY ;IHS/OIRM/DSD/THL,AEF - SEND ARMS MESSAGES TO MM; [ 09/26/2005 10:20 AM ]
+1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**5,19**;NOV 05, 2001
+2 ;;ROUTINE USED TO PROCESS MAILMAN MESSAGES GENERATED BY VARIOUS ARMS
+3 ;;FUNCTIONS
XMY ;EP;
+1 IF $DATA(ACRAPDA)
SET ACRAPDAX=ACRAPDA
+2 NEW ACRAPDA
+3 KILL XMY
+4 SET ACRAPDA=0
+5 FOR
SET ACRAPDA=$ORDER(^ACRAPVS("AB",ACRDOCDA,ACRAPDA))
IF 'ACRAPDA
QUIT
Begin DoDot:1
+6 SET ACRDT=$GET(^ACRAPVS(ACRAPDA,"DT"))
+7 SET ACR0=$GET(^ACRAPVS(ACRAPDA,0))
+8 IF $PIECE(ACRDT,U)=""
QUIT
+9 IF $PIECE(ACRDT,U,2)
IF $PIECE(ACR0,U,6)=$PIECE(^ACRDOC(ACRDOCDA,0),U,13)
DO XMY1
End DoDot:1
+10 SET XMY($PIECE(^ACROBL(ACRDOCDA,0),U,5))=""
+11 SET XMY(DUZ)=""
+12 IF ACRAPDAS="D"
Begin DoDot:1
+13 IF $GET(ACRAPDAX)
IF $PIECE(^ACRAPVS(ACRAPDAX,0),U,11)
QUIT
+14 SET DA=ACRDOCDA
+15 SET DIE="^ACROBL("
+16 SET DR="905////D"
+17 DO DIE^ACRFDIC
End DoDot:1
+18 IF $DATA(ACRAPDAX)
SET ACRAPDA=ACRAPDAX
+19 IF '$DATA(ACRAPDAX)
KILL ACRAPDA
+20 KILL ACRAPDAX
+21 IF $DATA(XMY)
DO MESSAGE
+22 QUIT
XMY1 SET XMY($PIECE(ACRDT,U,2))=""
+1 IF $PIECE(ACRDT,U,6)
IF $PIECE(ACRDT,U,6)'=$PIECE(ACRDT,U,2)
SET XMY($PIECE(ACRDT,U,6))=""
+2 QUIT
MESSAGE ;EP;
+1 IF $GET(ACRAPDA)
Begin DoDot:1
+2 WRITE !!,"One moment please, message being delivered."
+3 HANG 2
+4 SET ^ACROBL(ACRDOCDA,"CNG")=$GET(^ACRAPVS(ACRAPDA,"CNG"))
+5 SET ^ACROBL(ACRDOCDA,"RSN")=$GET(^ACRAPVS(ACRAPDA,"RSN"))
End DoDot:1
+6 IF '$GET(ACRAPDA)
Begin DoDot:1
+7 SET DA=ACRDOCDA
+8 SET DIE="^ACROBL("
+9 SET DR="[ACR REASON FOR CHANGE]"
+10 DO DDS^ACRFDIC
+11 IF '$DATA(ACRSCREN)
QUIT
+12 KILL ACRSCREN
+13 WRITE !
+14 DO DIE^ACRFDIC
End DoDot:1
+15 SET ACRCNG=$GET(^ACROBL(ACRDOCDA,"CNG"))
+16 SET ACRRSN=$GET(^ACROBL(ACRDOCDA,"RSN"))
+17 SET ACRDOC0=^ACRDOC(ACRDOCDA,0)
+18 IF $GET(ACRAPDA)
Begin DoDot:1
+19 IF $PIECE(^ACRAPVS(ACRAPDA,0),U,11)
SET XMB(1)="TRAVEL ADVANCE for "
End DoDot:1
+20 SET XMB(1)=$GET(XMB(1))_"Document no. "_$PIECE(ACRDOC0,U)_" ("_$SELECT($PIECE(ACRDOC0,U,2)]""&($PIECE(ACRDOC0,U)'=$PIECE(ACRDOC0,U,2)):$PIECE(ACRDOC0,U,2)_" - ",1:"")_$PIECE(^ACRDOC(ACRDOCDA,0),U,14)_") ,was "
+21 SET XMB(1)=XMB(1)_$SELECT(ACRAPDAS="A":"APPROVED",ACRAPDAS="R":"RETURNED FOR CLARIFICATION",ACRAPDAS="D":"DISAPPROVD",1:"PROCESSED, READ COMMENTS BELOW")_" by "
+22 ;S XMB(2)=$P(^VA(200,DUZ,0),U) ;ACR*2.1*19.02 IM16848
+23 ;ACR*2.1*19.02 IM16848
SET XMB(2)=$$NAME2^ACRFUTL1(DUZ)
+24 SET XMB(2)=$PIECE($PIECE(XMB(2),",",2)," ")_" "_$PIECE(XMB(2),",")
+25 SET XMB(3)=$SELECT($GET(ACRAPDA):$PIECE(^ACRAPVT($PIECE(^ACRAPVS(ACRAPDA,0),U,3),0),U),1:"")
+26 SET XMB(3)=$PIECE($PIECE(XMB(3),",",2)," ")_" "_$PIECE(XMB(3),",")
+27 SET XMB(2)=XMB(2)_" as the "_XMB(3)
+28 SET XMB(3)=" "
+29 SET XMB(4)="Information which needs to be changed:"
+30 IF ACRCNG]""
Begin DoDot:1
+31 NEW ACRI
+32 FOR ACRI=1:1:5
IF $PIECE(ACRCNG,U,ACRI)]""
SET XMB(ACRI+4)=$PIECE(ACRCNG,U,ACRI)
End DoDot:1
+33 SET XMB(10)=" "
+34 SET XMB(11)="Reason for change: "
+35 IF ACRRSN]""
Begin DoDot:1
+36 NEW ACRI
+37 FOR ACRI=1:1:5
IF $PIECE(ACRRSN,U,ACRI)]""
SET XMB(ACRI+11)=$PIECE(ACRRSN,U,ACRI)
End DoDot:1
+38 SET XMDUZ=.5
+39 SET XMTEXT="XMB("
+40 SET XMSUB="REQUEST COMMENT/DISAPPROVAL NOTIFICATION"
+41 SET XMB="ACR REQUEST STATUS"
+42 DO ^XMD
+43 KILL ACRAPV,ACRCNG,ACRRSN,XMB,XMDUZ,XMSUB,XMY,XMTEXT
+44 QUIT
TVAPP ;EP;TO SEND MESSAGE TO TRAVELER WHEN PAYMENT IS CERTIFIED
+1 IF '$PIECE($GET(^ACRDOC(ACRDOCDA,"TO")),U,9)
QUIT
+2 NEW ACRDUZ
+3 SET ACRDUZ=$PIECE(^ACRDOC(ACRDOCDA,"TO"),U,9)
+4 SET XMY(ACRDUZ)=""
+5 SET ACRDOC0=^ACRDOC(ACRDOCDA,0)
+6 ;S XMB(1)="The Travel Voucher for Travel Order NO. "_$P(ACRDOC0,U)_" ("_$P(ACRDOC0,U,14)_") for "_$P($G(^VA(200,+ACRDUZ,0)),U) ;ACR*2.1*19.02 IM16848
+7 ;ACR*2.1*19.02 IM16848
SET XMB(1)="The Travel Voucher for Travel Order NO. "_$PIECE(ACRDOC0,U)_" ("_$PIECE(ACRDOC0,U,14)_") for "_$$NAME2^ACRFUTL1(+ACRDUZ)
+8 SET Y=$PIECE(^ACRAPVS(ACRAPDA,"DT"),U,4)
+9 XECUTE ^DD("DD")
+10 SET X=$PIECE(^ACRAPVS(ACRAPDA,"DT"),U,2)
+11 ;S XMB(2)="was Certified for Payment on "_Y_" by "_$P($G(^VA(200,+X,0)),U) ;ACR*2.1*19.02 IM16848
+12 ;S XMB(3)="Payment should be made to "_$P($G(^VA(200,+ACRDUZ,0)),U) ;ACR*2.1*19.02 IM16848
+13 ;ACR*2.1*19.02 IM16848
SET XMB(2)="was Certified for Payment on "_Y_" by "_$$NAME2^ACRFUTL1(+X)
+14 ;ACR*2.1*19.02 IM16848
SET XMB(3)="Payment should be made to "_$$NAME2^ACRFUTL1(+ACRDUZ)
+15 DO ^ACRFTOT
+16 IF $GET(ACRREIM)]""
SET XMB(4)="in the amount of "_$FNUMBER(ACRREIM,"P,",2)_" on Schedule No.: "_$PIECE($GET(^ACRDOC(ACRDOCDA,18)),U,3)
+17 SET XMDUZ=.5
+18 SET XMTEXT="XMB("
+19 SET XMSUB="TRAVEL VOUCHER CERTIFIED FOR PAYMENT"
+20 SET XMB="ACR TV CERT FOR PAY"
+21 DO ^XMD
+22 QUIT
TOAPP ;EP;TO SEND MESSAGE TO TRAVELER WHEN PAYMENT IS CERTIFIED
+1 IF '$PIECE($GET(^ACRDOC(ACRDOCDA,"TO")),U,9)
QUIT
SET ACRDUZ=$PIECE(^("TO"),U,9)
+2 SET XMY(ACRDUZ)=""
+3 SET ACRDOC0=^ACRDOC(ACRDOCDA,0)
+4 ;S XMB(1)="Travel Order NO. "_$P(ACRDOC0,U)_" ("_$P(ACRDOC0,U,14)_") for"_$P($G(^VA(200,+ACRDUZ,0)),U) ;ACR*2.19*1.02 IM16848
+5 ;ACR*2.1*19.02 IM16848
SET XMB(1)="Travel Order NO. "_$PIECE(ACRDOC0,U)_" ("_$PIECE(ACRDOC0,U,14)_") for"_$$NAME2^ACRFUTL1(+ACRDUZ)
+6 SET Y=$PIECE(^ACRAPVS(ACRAPDA,"DT"),U,4)
+7 XECUTE ^DD("DD")
+8 SET X=$PIECE(^ACRAPVS(ACRAPDA,"DT"),U,2)
+9 ;S XMB(2)="was approved on "_Y_" by "_$P($G(^VA(200,+X,0)),U) ;ACR*2.1*19.02 IM16848
+10 ;ACR*2.1*19.02 IM16848
SET XMB(2)="was approved on "_Y_" by "_$$NAME2^ACRFUTL1(+X)
+11 SET XMDUZ=.5
+12 SET XMTEXT="XMB("
+13 SET XMSUB="TRAVEL ORDER APPROVED"
+14 SET XMB="ACR TO SIGNED"
+15 DO ^XMD
+16 QUIT
POAPP ;EP;TO SEND MESSAGE TO REQUEST INITIATOR WHEN PO IS SIGNED
+1 IF '$PIECE($GET(^ACRDOC(ACRDOCDA,"REQ2")),U,8)
QUIT
+2 SET XMY($PIECE(^ACRDOC(ACRDOCDA,"REQ2"),U,8))=""
+3 SET ACRDOC0=^ACRDOC(ACRDOCDA,0)
+4 SET XMB(1)="Purchase Order NO. "_$PIECE(ACRDOC0,U,2)_" ("_$PIECE(ACRDOC0,U)_" - "_$PIECE(ACRDOC0,U,14)_")"
+5 SET Y=$PIECE(^ACRAPVS(ACRAPDA,"DT"),U,4)
+6 XECUTE ^DD("DD")
+7 SET X=$PIECE(^ACRAPVS(ACRAPDA,"DT"),U,2)
+8 ;S XMB(2)="was approved on "_Y_" by "_$P($G(^VA(200,+X,0)),U) ;ACR*2.1*19.02 IM16848
+9 ;ACR*2.1*19.02 IM16848
SET XMB(2)="was approved on "_Y_" by "_$$NAME2^ACRFUTL1(+X)
+10 SET XMDUZ=.5
+11 SET XMTEXT="XMB("
+12 SET XMSUB="PO SIGNED"
+13 SET XMB="ACR PO SIGNED"
+14 DO ^XMD
+15 QUIT
TRAPP ;EP;TO SEND MESSAGE TO REQUEST INITIATOR WHEN PO IS SIGNED
+1 IF '$PIECE($GET(^ACRDOC(ACRDOCDA,"TRNG")),U,2)
QUIT
SET ACRDUZ=$PIECE(^("TRNG"),U,2)
+2 SET XMY(ACRDUZ)=""
+3 SET ACRDOC0=^ACRDOC(ACRDOCDA,0)
+4 ;S XMB(1)="Training Request NO. "_$P(ACRDOC0,U,2)_" ("_$P(ACRDOC0,U)_" - "_$P(ACRDOC0,U,14)_") for "_$P($G(^VA(200,+ACRDUZ,0)),U) ;ACR*2.1*19.02 IM16848
+5 ;ACR*2.1*19.02 IM16848
SET XMB(1)="Training Request NO. "_$PIECE(ACRDOC0,U,2)_" ("_$PIECE(ACRDOC0,U)_" - "_$PIECE(ACRDOC0,U,14)_") for "_$$NAME2^ACRFUTL1(+ACRDUZ)
+6 SET Y=$PIECE(^ACRAPVS(ACRAPDA,"DT"),U,4)
+7 XECUTE ^DD("DD")
+8 SET X=$PIECE(^ACRAPVS(ACRAPDA,"DT"),U,2)
+9 ;S XMB(2)="was approved on "_Y_" by "_$P($G(^VA(200,+X,0)),U) ;ACR*2.1*19.02 IM16848
+10 ;ACR*2.1*19.02 IM16848
SET XMB(2)="was approved on "_Y_" by "_$$NAME2^ACRFUTL1(+X)
+11 SET XMDUZ=.5
+12 SET XMTEXT="XMB("
+13 SET XMSUB="TRAINING REQUEST SIGNED"
+14 SET XMB="ACR TR SIGNED"
+15 DO ^XMD
+16 QUIT
TO25(ACRDOCDA,ACRAPDA) ;EP;TO SEND MESSAGE TO AREA FMO WHEN AMOUNT IS GREATER THAN 2500 ;ACR*2.1*5.15
+1 ;ALSO SENDS MESSAGE TO THE TRAVEL VOUCHER AUDITOR
+2 ;ENTERS WITH FMS DOCUMENT IEN AND FMS REQUEST CONTROLLER FILE IEN
+3 ;
+4 NEW ACRDUZ,ACRFMO,ACRAMT,ACRTMP,ACRDOC0,ACRNAM,ACRID,XMY
+5 NEW ACRDOC,X,Y,XMDUZ,XMTEXT,XMSUB
+6 ; TRAVELER
SET ACRDUZ=$PIECE($GET(^ACRDOC(ACRDOCDA,"TO")),U,9)
+7 IF 'ACRDUZ
QUIT
+8 ; TOTAL AMOUNT
SET ACRAMT=$$TOTAMT^ACRFSSU(ACRDOCDA)
+9 IF ACRAMT<2500
QUIT
+10 ; AREA FMO
SET ACRFMO=$PIECE($GET(^ACRDOC(ACRDOCDA,"REQ1")),U,13)
+11 IF 'ACRFMO
QUIT
+12 SET ACRFMO=$$NAME^ACRFUTL1(ACRFMO)
+13 SET XMY(ACRFMO)=""
+14 ;TRAVEL VOUCHER AUDITOR
SET ACRTVA=$PIECE($GET(^ACRDOC(ACRDOCDA,"TO")),U,24)
+15 IF ACRTVA]""
Begin DoDot:1
+16 SET ACRTVA=$$NAME^ACRFUTL1(ACRTVA)
+17 SET XMY(ACRTVA)=""
End DoDot:1
+18 SET ACRDOC0=^ACRDOC(ACRDOCDA,0)
+19 SET ACRDOC=$PIECE(ACRDOC0,U)
+20 SET ACRNAM=$$NAME^ACRFUTL1(ACRDUZ)
+21 ; DOCUMENT ID
SET ACRID=$PIECE(ACRDOC0,U,14)
+22 SET XMB(1)="Travel Order NO. "_ACRDOC_" ("_ACRID_") for "_ACRNAM
+23 ; REQUESTED BY
SET X=$PIECE(^ACRAPVS(ACRAPDA,"DT"),U,2)
+24 SET ACRNAM=$$NAME^ACRFUTL1(X)
+25 SET Y=DT
XECUTE ^DD("DD")
+26 SET XMB(2)="for "_ACRAMT_" was requested on "_Y_" by "_ACRNAM
+27 SET XMDUZ=.5
+28 SET XMTEXT="XMB("
+29 SET XMSUB="TRAVEL ORDER REQ >$2500"
+30 SET XMB="ACR TO REQ >2500"
+31 DO ^XMD
+32 QUIT