[613] | 1 | PRCB1C ;WISC/PLT-FMS documents Inquiry/Regenerate Rejected SA/ST/AT ; 08/16/95 1:45 PM
|
---|
| 2 | V ;;5.1;IFCAP;;Oct 20, 2000
|
---|
| 3 | ;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
| 4 | QUIT ;invalid entry
|
---|
| 5 | ;
|
---|
| 6 | EN ;FMS doc inquiry
|
---|
| 7 | D EN^PRC0E("SA:Suballowance;ST:Suballowance Transfer;AT:Allowance Transfer^FMS Budget Document ID: ","D INQ^PRCB1C")
|
---|
| 8 | QUIT
|
---|
| 9 | INQ ;dispaly dcocument data
|
---|
| 10 | N A,B,PRCFC,PRCTX,PRCRI
|
---|
| 11 | S PRCTX=$P(X,"^",2),PRCRI(2100.1)=$P(X,"^",4)
|
---|
| 12 | S PRCFC=$TR($G(GECSDATA(2100.1,PRCRI(2100.1),26,"E")),"/","^")
|
---|
| 13 | S $P(PRCFC,"^",6)=$FN($P(PRCFC,"^",6),"",2)
|
---|
| 14 | D:PRCFC]""
|
---|
| 15 | . S A=$$DT^PRC0B2(+PRCFC,"I"),$P(PRCFC,"^",1)=$P(A,"^",5)
|
---|
| 16 | . D @("INQ"_PRCTX)
|
---|
| 17 | QUIT
|
---|
| 18 | ;
|
---|
| 19 | ;
|
---|
| 20 | INQSA ;display SA
|
---|
| 21 | F B=1,11,10,2:1:7,9 D EN^DDIOL($J($P("FMS Txn Date^Doc Year^Quarter^Station #^FCP #^$Amount^BBFY^^FMS Action^FY Acctg Per^FMS Acctg Per","^",B),13)_": "_$P(PRCFC,"^",B))
|
---|
| 22 | QUIT
|
---|
| 23 | ;
|
---|
| 24 | INQST ;dispaly ST
|
---|
| 25 | INQAT ;dispalt AT
|
---|
| 26 | F B=1,11,10,2:1:8 D EN^DDIOL($J($P("FMS Txn Date^Doc Year^Quarter^Station #^From FCP #^$Amount^BBFY^To FCP#^^FY Acctg Per^FMS Acctg Per","^",B),13)_": "_$P(PRCFC,"^",B))
|
---|
| 27 | QUIT
|
---|
| 28 | ;
|
---|
| 29 | ;PRCA data ^1=txn type;txn type...,^2=select document text, ^3=status
|
---|
| 30 | EN1 ;rejected FMS document process
|
---|
| 31 | N PRC,PRCA,PRCRI,PRCID,PRCTX,PRCF,PRCFC,PRCLACT
|
---|
| 32 | D EN^PRC0E("SA:Suballowance;ST:Suballowance Transfer;AT:Allowance Transfer^FMS Rejected Budget Document ID: ^~E~R~T~~","D INQ^PRCB1C,EN2^PRCB1C")
|
---|
| 33 | QUIT
|
---|
| 34 | ;
|
---|
| 35 | EN2 ;File process rejected fms doc
|
---|
| 36 | N PRCRI,PRCTX,PRCID,PRCFC,PRCFDT,PRCFAC,PRCAP,PRCFP
|
---|
| 37 | S PRCTX=$P(X,"^",2),PRCID=$P(X,"^",3),PRCRI(2100.1)=$P(X,"^",4)
|
---|
| 38 | D EN^DDIOL(" ")
|
---|
| 39 | D DATA^GECSSGET(PRCID,0)
|
---|
| 40 | S PRCFC=GECSDATA(2100.1,PRCRI(2100.1),26,"E") K GECSDATA
|
---|
| 41 | S PRCFDT=$P(PRCFC,"^"),PRCFAC=$P(PRCFC,"/",9)
|
---|
| 42 | Q11 S Y(1)="Enter a date you want to send documents to FMS in format: MM/DD/YY"
|
---|
| 43 | S A=$$DT^PRC0B2("T","E"),A=$P(A,"^",5)
|
---|
| 44 | D DT^PRC0A(.X,.Y,"FMS Transaction Date","",A)
|
---|
| 45 | QUIT:Y=""!(Y["^")
|
---|
| 46 | I Y#100=0 W " Enter precise date!" G Q11
|
---|
| 47 | S Y=$$DT^PRC0B2(Y,"I")
|
---|
| 48 | W " (",$P(Y,"^",5),")"
|
---|
| 49 | S PRCFDT=+Y,PRCAP=$P($$DT^PRC0B2($E(Y,1,5)_"00","I"),"^",5)
|
---|
| 50 | Q115 S Y(1)="Enter a calender (not fiscal year) accounting period in format: MM/YY."
|
---|
| 51 | S Y(2)="NOTE: a closed FMS accounting period will cause documents to be rejected."
|
---|
| 52 | D DT^PRC0A(.X,.Y,"Accounting Period (MM/YY)","O",PRCAP)
|
---|
| 53 | I X=""!(X["^") G Q11
|
---|
| 54 | G:Y<0 Q115
|
---|
| 55 | I Y#100'=0 W " Enter nonth/year only!" G Q115
|
---|
| 56 | S Y=$$DT^PRC0B2(Y,"I")
|
---|
| 57 | W " (",$P(Y,"^",5),")"
|
---|
| 58 | S PRCFP=$P(Y,"^",5),X=$$DATE^PRC0C(+Y,"I"),PRCFP=$P(X,"^",9)_$E(X,3,4)_"/"_PRCFP
|
---|
| 59 | G:PRCTX'="SA" Q13
|
---|
| 60 | Q12 ;D SC^PRC0A(.X,.Y,"Select FMS Action Code","B^A:Add New Suballowance;C:Inc/Dec Suballowance",PRCFAC)
|
---|
| 61 | ;G Q11:Y=""!(Y["^")
|
---|
| 62 | S Y="C"
|
---|
| 63 | S PRCFAC=Y
|
---|
| 64 | Q13 K X,Y D YN^PRC0A(.X,.Y,"Ready To File Regenerated FMS Document","","NO")
|
---|
| 65 | G:Y["^" Q11
|
---|
| 66 | I Y=1 D
|
---|
| 67 | . D:PRCFC]"" @PRCTX,EN^DDIOL("<Filed>")
|
---|
| 68 | QUIT
|
---|
| 69 | ;
|
---|
| 70 | EXIT K X,Y
|
---|
| 71 | QUIT
|
---|
| 72 | ;
|
---|
| 73 | SA I PRCFAC="A" D FMSSAL(PRCFC,-1)
|
---|
| 74 | I PRCFAC="C" D FMSSAL(PRCFC,1)
|
---|
| 75 | S $P(PRCFC,"/")=PRCFDT,PRCFC=$P(PRCFC,"/",1,8),$P(PRCFC,"/",9)=PRCFP
|
---|
| 76 | D SA^PRCB8A(.X,$TR(PRCFC,"/","^"),PRCRI(2100.1)_"^"_$P(PRCID,"-",2,999))
|
---|
| 77 | QUIT
|
---|
| 78 | ;
|
---|
| 79 | ST S $P(PRCFC,"/")=PRCFDT,PRCFC=$P(PRCFC,"/",1,8),$P(PRCFC,"/",9)=PRCFP
|
---|
| 80 | D ST^PRCB8A1(.X,$TR(PRCFC,"/","^"),PRCRI(2100.1)_"^"_$P(PRCID,"-",2,999))
|
---|
| 81 | QUIT
|
---|
| 82 | ;
|
---|
| 83 | AT S $P(PRCFC,"/")=PRCFDT,PRCFC=$P(PRCFC,"/",1,8),$P(PRCFC,"/",9)=PRCFP
|
---|
| 84 | D AT^PRCB8A2(.X,$TR(PRCFC,"/","^"),PRCRI(2100.1)_"^"_$P(PRCID,"-",2,999))
|
---|
| 85 | QUIT
|
---|
| 86 | ;
|
---|
| 87 | ;A=file 2100.1 ri, B=status
|
---|
| 88 | SAREJ(A,B) ;DCT process rejected sa subroutine
|
---|
| 89 | N GECSDATA,PRCRI,PRCID,PRCFC,PRCDDT,PRCY,PRCQ,PRCSITE,PRCAMT,PRCY
|
---|
| 90 | QUIT:B'="R"
|
---|
| 91 | D DATA^GECSSGET(A,0) QUIT:'$G(GECSDATA)
|
---|
| 92 | S PRCRI(2100.1)=GECSDATA,PRCID=GECSDATA(2100.1,PRCRI(2100.1),.01,"E")
|
---|
| 93 | S PRCFC=GECSDATA(2100.1,PRCRI(2100.1),26,"E")
|
---|
| 94 | K GECSDATA
|
---|
| 95 | D:$P(PRCFC,"/",9)="A" FMSSAL(PRCFC,-1)
|
---|
| 96 | QUIT
|
---|
| 97 | ;
|
---|
| 98 | ;PRCFC=SA document string, PRCA=1 if add, -1 if delete
|
---|
| 99 | FMSSAL(PRCFC,PRCA) ;add/delete entry in file 420.141
|
---|
| 100 | N PRCRI,PRCQ,PRCSITE,PRCAMT,PRCY,PRCF
|
---|
| 101 | N A,B
|
---|
| 102 | S PRCFC=$TR($P(PRCFC,"/",1,8),"/","^")
|
---|
| 103 | S PRCY=$P(PRCFC,"^",2),PRCQ=$P(PRCFC,"^",3)
|
---|
| 104 | S PRCSITE=+$P(PRCFC,"^",4),PRCRI(420.01)=+$P(PRCFC,"^",5),PRCAMT=$P(PRCFC,"^",6)
|
---|
| 105 | S PRCY=$$YEAR^PRC0C(PRCY)
|
---|
| 106 | S PRCF=$$ACC^PRC0C(PRCSITE,PRCRI(420.01)_"^"_$E(PRCY,3,4)_"^"_$P(PRCFC,"^",7))
|
---|
| 107 | S A=$$FMSACC^PRC0D(PRCSITE,PRCF)
|
---|
| 108 | S B=$$FIRST^PRC0B1("^PRCD(420.141,""B"","""_A_""",",0)
|
---|
| 109 | I PRCA=-1,B D DELETE^PRC0B1(.X,";^PRCD(420.141,;"_B)
|
---|
| 110 | I PRCA=1,'B S B=$$A420D141^PRC0F(A,PRCRI(420.01))
|
---|
| 111 | QUIT
|
---|
| 112 | ;
|
---|