Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ACRFPRC9

ACRFPRC9.m

Go to the documentation of this file.
ACRFPRC9 ;IHS/OIRM/DSD/THL,AEF - REVIEW DOCUMENTS FOR APPROVAL WHEN ENTERING KERNEL;  [09/22/2005 11:18 AM]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**3,19**;NOV 05, 2001
 ;;ROUTINE TO ALLOW USER TO SIGN PENDING DOCUMENTS
EN D ACRREV^ACRFPRCS
 Q
EDIT ;EP;
 D ^ACRFDISA
 Q:'$G(ACRAPDA)
 K ACRRR
 S ACRDOCDT=$G(^ACRDOC(ACRDOCDA,"DT")),ACRATTCH=$G(^ACRDOC(ACRDOCDA,3)),ACRATTCH=$P(ACRATTCH,U,9)
 I ACRATTCH>0 D ATTACH^ACRFPRC2
 I $P(ACRDOCDT,U,10)=ACRAPDA D
 .D APDA^ACRFDISA Q
 .N DXS,DIP,DC,DN
 .S D0=ACRAPDA
 .W !!
 .D ^ACRPCNG
 .N DXS,DIP,DC,DN
 .W !!
 .D ^ACRPRSP
 .Q
 S:$P(^ACRAPVS(ACRAPDA,0),U,3)=41 ACRRR="",ACRREFX=499
 I $P(^ACRAPVS(ACRAPDA,0),U,3)=9,$P($G(^ACRAPVS(ACRAPDA,"DT")),U,5)="Y" S ACRTVAL=""
 S DIR(0)="SO^1:Review Document Summary;2:Review Entire Document;3:Skip Document Review"
 S DIR("A")="Type of Review"
 S DIR("B")="Review Document Summary"
 W !
 D DIR^ACRFDIC
 Q:$D(ACRQUIT)!$D(ACROUT)!('$G(Y))
 Q:Y=3
 S:Y=1 ACRPSUM=""
 I $P(^ACRAPVS(ACRAPDA,0),U,11) D  Q
 .D TAFORM^ACRFTA
DISPLAY Q:'$D(^TMP("ACRDATA",$J,ACRDUZ,ACRJJ))
 S ACRREFX=$P(^TMP("ACRDATA",$J,ACRDUZ,ACRJJ),U,2)
 I $P($G(^ACRAPVS(+ACRAPDA,0)),U,4)=99 S ACRREFX=$S(ACRREF=103!(ACRREF=349)!(ACRREF=326)!(ACRREF=210):116,ACRREF=600:130,1:ACRREF)
 S ACRREQST=""
 S:$P(^ACRAPVS(ACRAPDA,0),U,3)=41 ACRRR="",ACRREFX=499
 N ACRDATA
 I '$D(ACRRR)#2 D REQ^ACRFQ I 1
 E  D
 .D DISPLAY^ACRFRR1
 .D PAUSE^ACRFWARN
 K ACRREQST
 I $P(^ACRAPVS(ACRAPDA,0),U,3)=1,$P(^ACRDOC(ACRDOCDA,0),U,16) D
 .S D0=$P(^ACRDOC(ACRDOCDA,0),U,16)
 .D SPSUM^ACRFPRCS
 Q
DELETE ;EP;IF DOCUMENT DISAPPROVED, GIVE OFFICIAL OPPORTUNITY TO DELETE THE
 ;DOCUMENT AND RETURN FUNDS TO THE DEPARTMENT ACCOUNT
 D EN3^ACRFDEL
 Q
W ;EP;WRITE DUPLICATE SIGNATURE WARNING
 W !!,*7,*7,"You cannot sign as both ",ACRAPVS,$S("^8^9^21^37^38^39^43^45^"'[(U_ACRAPVT_U):" OFFICIAL",1:"")
 W !,"Another individual with ",$P(ACRAPVS," ")," OFFICIAL authority must sign."
 D PAUSE^ACRFWARN
 S ACRQUIT=""
 Q
CHANGE ;EP;ADD MESSAGE FOR REQUESTED CHANGE
 D NOW^%DTC
 S:'$D(^ACRAPVS(ACRAPDA,1,0)) ^ACRAPVS(ACRAPDA,1,0)="^9002190.01DA"
 S DA(1)=ACRAPDA
 S X=%
 S DIC="^ACRAPVS("_ACRAPDA_",1,"
 S DIC(0)="L"
 S DIC("DR")=".02////"_DUZ
 D FILE^ACRFDIC
 S ^ACRAPVS(ACRAPDA,1,+Y,"CNG")=^ACRAPVS(ACRAPDA,"CNG")
 S ^ACRAPVS(ACRAPDA,1,+Y,"RSN")=^ACRAPVS(ACRAPDA,"RSN")
 Q
 W @IOF
 W !!,"Select DOCUMENT to REVIEW",$S('$D(ACRCSI):" for APPROVAL",1:""),":"
 W !!?2,"NO."
 W ?7,"DOCUMENT NO."
 W ?24,"IDENTIFIER"
 W ?40,"|  NO."
 W ?48,"DOCUMENT NO."
 W ?65,"IDENTIFIER"
 W !,"------"
 W ?7,"----------------"
 W ?24,"---------------"
 W ?40,"|------"
 W ?48,"----------------"
 W ?65,"---------------"
 Q
TE ;EP;TO NOTIFY ARMS USER THAT THEY HAVE A TRAVEL VOUCHER OR
 ;TRAINING EVALUATION TO COMPLETE
 S ACRDOCDA=0
 K ACRQUIT ;ACR*2.1*3.43
 F  S ACRDOCDA=$O(^ACRDOC("F",DUZ,ACRDOCDA)) Q:'ACRDOCDA!$D(ACROUT)  D
 .I $P($G(^ACROBL(ACRDOCDA,"APV")),U)="A",$P(^("APV"),U,8)="A",'$P($G(^ACRTVAL(ACRDOCDA,0)),U,4) D TEMESS
 I $D(ACRQUIT) K ACRQUIT Q   ;ACR*2.1*3.43
 S ACRDOCDA=0
 F  S ACRDOCDA=$O(^ACRDOC("N",DUZ,ACRDOCDA)) Q:'ACRDOCDA!$D(ACROUT)  D
 .I $P(^ACRDOC(ACRDOCDA,0),U,13)=133,DT>$P($G(^ACRDOC(ACRDOCDA,"TO")),U,15),$E($G(^ACROBL(ACRDOCDA,"APV")))="A",$P(^ACROBL(ACRDOCDA,0),U,6)>2951001 D
 ..K ACRQUIT
 ..S ACRAPDA=0
 ..;EXCLUDE SIGNED VOUCHER ENTRIES                   ;ACR*2.1*19.01  IM17918
 ..;F  S ACRAPDA=$O(^ACRAPVS("AB",ACRDOCDA,ACRAPDA)) Q:'ACRAPDA  I $P($G(^ACRAPVS(ACRAPDA,0)),U,6)=133 S ACRQUIT="" Q  ;ACR*2.1*19.01  IM17918
 ..F  S ACRAPDA=$O(^ACRAPVS("AB",ACRDOCDA,ACRAPDA)) Q:'ACRAPDA  D  Q:$D(ACRQUIT)  ;ACR*2.1*19.01  IM17918
 ...I $P($G(^ACRAPVS(ACRAPDA,0)),U,6)=133,$P(^ACRAPVS(ACRAPDA,"DT"),U,4)]"" S ACRQUIT=""  ;ACR*2.1*19.01  IM17918
 ..I $D(ACRQUIT) K ACRQUIT Q
 ..K ACRQUIT
 ..D TVMESS
 Q
TEMESS ;NOTICE MESSAGE THAT TRAINING EVALUATION IS NOT COMPLETE
 Q:$P($G(^ACRDOC(ACRDOCDA,"TRNG")),U,12)>DT
 Q:$P($G(^ACROBL(ACRDOCDA,"APV")),U)'="A"
 W @IOF
 W *7,*7
 W !!?20,"NOTICE     NOTICE     NOTICE     NOTICE"
 W !!!,"The EVALUATION for TRAINING REQUEST ",$P(^ACRDOC(ACRDOCDA,0),U)," must be completed IMMEDIATELY."
 N ACRTRNG
 S ACRTRNG=$G(^ACRDOC(ACRDOCDA,"TRNG"))
 W !!?10,"COURSE TITLE: ",$P(ACRTRNG,U,18)
 W !?10,"FROM........: "
 S Y=$P(ACRTRNG,U,11)
 X ^DD("DD")
 W Y
 W !?10,"TO..........: "
 S Y=$P(ACRTRNG,U,12)
 X ^DD("DD")
 W Y
 D TR2^ACRFTO
 Q
TVMESS ;NOTICE MESSAGE THAT TRAVEL VOUCHER IS NOT COMPLETE
 Q:$P($G(^ACRDOC(ACRDOCDA,"TO")),U,15)>DT
 W @IOF
 W *7,*7
 W !!?20,"NOTICE     NOTICE     NOTICE     NOTICE"
 W !!!,"TRAVEL VOUCHER ",$P(^ACRDOC(ACRDOCDA,0),U)," (DEPT ACCT ID NO.: ",$P(^(0),U,6)," must be completed IMMEDIATELY."
 S ACRTO=$G(^ACRDOC(ACRDOCDA,"TO"))
 S ACRPDDA=$O(^ACRDOC(ACRDOCDA,9,0))
 S ACRPDDA=+$G(^ACRDOC(ACRDOCDA,9,+ACRPDDA,0))
 S ACRPD=$S(ACRPDDA:$P($G(^ACRPD(ACRPDDA,0)),U),1:"DESTINATION NOT STATED")
 W !!?10,"TRAVEL TO: ",ACRPD
 W !?10,"FROM.....: "
 S Y=$P(ACRTO,U,14)
 X ^DD("DD")
 W Y
 W !?10,"TO.......: "
 S Y=$P(ACRTO,U,15)
 X ^DD("DD")
 W Y
 W !!,"Use 'TV' - Complete Travel Voucher to complete this voucher as soon as possible."
 W !,"This Travel Voucher can be found in DEPARTMENT ACCOUNT ID NO. ",$P(^ACRDOC(ACRDOCDA,0),U,6)
 D PAUSE^ACRFWARN
 K ACRQUIT
 Q
 S DIR(0)="YO"
 S DIR("A")="Do you want to complete the TRAVEL VOUCHER now"
 S DIR("B")="YES"
 W !
 D DIR^ACRFDIC
 Q:$G(Y)'=1
 S ACRENTRY="OBLAMT"
 D SETDOC^ACRFEA1
 D ^ACRFEA41
 Q