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

ACRFCSI.m

Go to the documentation of this file.
ACRFCSI ;IHS/OIRM/DSD/THL,AEF - UTILITY TO DISPLAY NEXT PERSON TO SIGN DOCUMENT; [ 09/23/2005   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**19**;NOV 05, 2001
 ;;UTILITY TO DISPLAY NEXT PERSON TO SIGN DOCUMENT
EN D EN1
EXIT K ACRIN
 Q
EN1 ;EP;TO DISPLAY NEXT PERSON TO SIGN DOCUMENT
 N ACRX,ACRAPDA,ACRINDV,ACRDOCDA
 S ACRDOCDA=+ACR(ACRI)
 S ACRREFDA=$P(^ACRDOC(ACRDOCDA,0),U,13)
 S ACRREF=$P(^AUTTDOCR(ACRREFDA,0),U)
 D EN2
 W !?8,ACRINDV
 I $D(ACR(ACRI+ACR10)) D
 .S ACRDOCDA=+ACR(ACRI+ACR10)
 .S ACRREFDA=$P(^ACRDOC(ACRDOCDA,0),U,13)
 .S ACRREF=$P(^AUTTDOCR(ACRREFDA,0),U)
 .D EN2
 .W ?48,ACRINDV
 Q
EN2 ;DETERMINE NEXT PERSON TO SIGN DOCUMENT
 S ACRX=0
 S ACRINDV=""
 I '$D(^ACRAPVS("AORDR",ACRDOCDA)) D  Q
 .S ACRINDV=$S($E($G(^ACROBL(ACRDOCDA,"APV")))'="D":"NOT SUBMITTED FOR APPROVAL",1:"HAS BEEN DISAPPROVED")
 I ACRINDV="","^103^349^326^210^600^"[(U_ACRREF_U),$P($G(^ACROBL(ACRDOCDA,"APV")),U,8)]"" S ACRAPV=^("APV") D  Q
 .S ACRINDV=$S(ACRREF=103:"PURCHASE ORDER",ACRREF=349:"CONTRACT",ACRREF=326:"TRIBAL CONTRACT",ACRREF=210:"FEDSTRIP",ACRREF=600:"TRAVEL VOUCHER")_$S($P(ACRAPV,U,8)="A":" APPROVED",1:"DISAPPROVED")
 I "^103^349^326^210^"[(U_ACRREF_U),+$G(^ACRDOC(ACRDOCDA,"PA")) D  Q
 .N X
 .;S X=$P(^VA(200,+^ACRDOC(ACRDOCDA,"PA"),0),U)  ;ACR*2.1*19.02 IM16848
 .S X=$$NAME2^ACRFUTL1(+^ACRDOC(ACRDOCDA,"PA"))  ;ACR*2.1*19.02 IM16848
 .S ACRINDV="PO ASSIGNED TO "_$E($P(X,",",2))_" "_$P(X,",")
 I ACRINDV="" D
 .F  S ACRX=$O(^ACRAPVS("AORDR",ACRDOCDA,ACRX)) Q:'ACRX!(ACRINDV]"")  D
 ..S ACRAPDA=0
 ..F  S ACRAPDA=$O(^ACRAPVS("AORDR",ACRDOCDA,ACRX,ACRAPDA)) Q:'ACRAPDA!(ACRINDV]"")  D
 ...I $D(^ACRAPVS(ACRAPDA,"DT")),$P(^("DT"),U)="",$P(^("DT"),U,2),$D(^VA(200,$P(^ACRAPVS(ACRAPDA,"DT"),U,2),0)) D
 ....N X
 ....S X=$P(^ACRAPVS(ACRAPDA,"DT"),U,2),ACRIN=$P(^("DT"),U,3)
 ....;S X=$P(^VA(200,X,0),U)  ;ACR*2.1*19.02 IM16848
 ....S X=$$NAME2^ACRFUTL1(X)  ;ACR*2.1*19.02 IM16848
 ....S ACRINDV=$E($P(X,",",2))_" "_$P(X,",")
 ....S:ACRIN]"" ACRINDV=ACRINDV_" "_$E(ACRIN,4,5)_"/"_$E(ACRIN,6,7)_"@"_$E($P(ACRIN,".",2),1,4)
 ...I ACRINDV="","^103^349^326^210^600^"[(U_ACRREF_U) S ACRINDV=$S(ACRREF=103:"PURCHASE ORDER",ACRREF=349:"CONTRACT",ACRREF=326:"TRIBAL CONTRACT",ACRREF=210:"FEDSTRIP",ACRREF=600:"TRAVEL VOUCHER")_" PENDING"
 Q