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

ACRFPO3.m

Go to the documentation of this file.
ACRFPO3 ;IHS/OIRM/DSD/THL,AEF - PURCHASE ORDER PROCESSING - CONT;  [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;CONTINUATION OF ACRFPO
LOOKUP ;EP;LOOKUP UTILITY FOR REQUISITION/PURCHASE ORDERS
 W @IOF
 W !?21,$S($D(ACRCANCL):"DOCUMENT",'$D(ACRREQST):"PURCHASE ORDER",$D(ACRCALL):"CALL AGAINST A BPA",1:"REQUISITION")," LOOKUP UTILITY"
 S DIC="^ACRDOC("
 S DIC(0)="AEMQZ"
 S DIC("A")=$S('$D(ACRCANCL):"Requisition/PO NO.: ",1:"Document NO.:  "),ZTRTN="^ACRFQ"
 S D="B^C^G^J^FS^O^PVEN"
 S:'$D(ACRREQST) D="C^B^G^J^FS^O^PVEN"
 I '$D(DIC("S")) D
 .S:'$D(ACRREQST) DIC("S")="S ACRREF=$P(^ACRDOC(+Y,0),U,13),ACRREF=$P(^AUTTDOCR(ACRREF,0),U) I ""^103^349^326^210^""[(U_ACRREF_U)!(ACRREF=116&($P(^ACRDOC(+Y,0),U,4)=35)),$P($G(^ACROBL(+Y,""APV"")),U,8)="""""
 .S:$D(ACRREQST) DIC("S")="S ACRREFDA=$P(^ACRDOC(+Y,0),U,13),ACRREF=$P($G(^AUTTDOCR(+ACRREFDA,0)),U) I ""^103^116^204^349^326^210^""[(U_ACRREF_U)"
 .S:$D(ACRCALL) DIC("S")="I $P(^ACRDOC(+Y,0),U,19)"
 I $D(ACRCANCL) D
 .S DIC("S")="I $$OBL^ACRFEA(+Y),$D(^ACRDOC(+Y,0)) K ACRQUIT N ACRX S ACRX=^(0),ACRREF=$P(ACRX,U,13),ACROBLAP=$G(^ACROBL(+Y,""APV"")) S ACRREF=$P($G(^AUTTDOCR(+ACRREF,0)),U)"
 .S DIC("S")=DIC("S")_" I $E(ACROBLAP)=""A"",'$P(ACROBLAP,U,11),""^103^349^326^204^210^130^600^148^""[(U_ACRREF_U)!(ACRREF=116&($P(ACRX,U,4)=35)!($P(ACRX,U,12)))"
 I $D(ACRCNCYO) D
 .S DIC("S")="K ACR S ACR($P($G(^ACRDOC(+Y,""REQ2"")),U,8))="""",ACR($P($G(^(""TO"")),U,9))="""",ACRAPV=$E($G(^ACROBL(+Y,""APV""))),ACR($P(^(0),U,5))="""" I ACRAPV="""",$D(ACR(DUZ))#2"
 K ACRCNCYO
 S:$D(ACRRR)#2 DIC("S")=DIC("S")_" I $P($G(^ACROBL(+Y,""APV"")),U,6),$D(^ACRRR(""AC"",+Y))"
 S:$D(ACRFEDS) DIC("S")=DIC("S")_" I $D(^ACRDOC(+Y,3)),$P(^(3),U,13)"
 W !!
 D MIX^ACRFDIC
 I +Y<1!$D(ACRQUIT)!$D(ACROUT) S ACRQUIT="" Q
 S ACRDOCDA=+Y
 D SETDOC^ACRFEA1
 I $P(^ACRDOC(ACRDOCDA,0),U,19) D
 .S ACRREQST=""
 .S ACRREF=116
 .S ACRRTN="^ACROBL"
 S ACRREFX=$S('$D(ACRREQST):103,1:116)
 I '$D(ACRREQST) S ACRREFX=$P(^ACRDOC(ACRDOCDA,0),U,13),ACRREFX=$P(^AUTTDOCR(ACRREFX,0),U) S:ACRREFX=210 ACRREFX=103
 ;I ACRREF=116,$P(ACRDOC0,U,4)=35!$P(ACRDOC0,U,12)!$P(ACRDOC0,U,19) S ACRREFX=116,ACRREQST=""
 ;I $P(ACRDOC0,U,4)=35!$P(ACRDOC0,U,12)!$P(ACRDOC0,U,19) S ACRREFX=116,ACRREQST=""
 I $P(ACRDOC0,U,4)=35!$P(ACRDOC0,U,19) S ACRREFX=116,ACRREQST=""
 S:ACRREFX=210 ACRREFX=103
 Q
CHKLIST ;EP;EDIT SMALL PURCHASE CHECK LIST
 D PCLIST
 I '$D(^ACRSPCL("B",ACRDOCDA)) D  I 1
 .S X=ACRDOCDA
 .S DIC="^ACRSPCL("
 .S DIC(0)="L"
 .D FILE^ACRFDIC
 .S DA=+Y
 E  S DA=$O(^ACRSPCL("B",ACRDOCDA,0))
 Q:'DA
 S DR="[ACR SP CHECKLIST]"
 S DIE="^ACRSPCL("
 W !
 D DDS^ACRFDIC
 Q:'$D(ACRSCREN)
 K ACRSCREN
 D DIE^ACRFDIC
 Q
PCLIST ;EP;TO PRINT SMALL PURCHASE CHECK LIST
 S D0=ACRDOCDA
 S D0=$O(^ACRSPCL("B",D0,0))
 Q:'D0
 S (ACRRTN,ZTRTN)="PCL^ACRFPO3"
 S ZTDESC="SMALL PURCHASE CHECKLIST"
 D ^ACRFZIS
 Q
PCL ;EP;
 K DXS,DIP
 D ^ACRSPCL
 Q