source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCFFU41.m@ 1710

Last change on this file since 1710 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 4.3 KB
RevLine 
[613]1PRCFFU41 ;WISC/SJG-FMS DOCUMENT GENERATOR (CONT) ;3/7/95 3:32 PM
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4EN4 ;ENTER DATA INTO STATUS OF FUNDS FILE
5 K DIC("A") S DIC="^PRC(420,",DR="[PRCB STATUS FUNDS]",DIC(0)="AEMNQ" D ^DIC K DIC("A") I Y>0 S DIE=DIC,DA=+Y D ^DIE
6 K %,%X,%Y,D,D0,D1,DA,DD,DIC,DIE,DIX,DO,DQ,DR,DZ,J,K,X,Y Q
7EN5 ;UPDATE ESTIMATED BALANCE FIELD OF CONTROL POINT FILE
8 ;REQUIRES VARIABLE PRC("SITE")
9 I '$D(PRC("SITE")) S PRCF("X")="AS" D ^PRCFSITE G:'% OUT5
10 K DIC("A") W !,$C(7),"REMEMBER, DO NOT ENTER TRANSACTION FOR FUTURE QUARTERS!",!
11X S DIC="^PRC(420,"_PRC("SITE")_",1,",DIC(0)="AEQMNZ" D ^DIC K DIC G:'$T!(X[U) OUT5 I Y<0 W $C(7),!!,"I'M CONFUSED ABOUT WHICH CONTROL POINT YOU WANT, TRY AGAIN. ",!,"USE AN '^' TO QUIT",! G X
12 S PRC("CP")=+Y,PRC("CP",0)=Y(0)
13EN51 W !,"ENTER TRANSACTION AMOUNT: " R X:$S($D(DTIME):DTIME,1:60) Q:X="^" I X'?.1"+".1"-".N1"."2N W !,"ENTER AMOUNT OF TRANSACTION, INCLUDING THE DECIMAL POINT",! G EN51
14 I X<0 S X=-(X)
15 I X'?.N.1".".2N W $C(7),"??" G EN51
16 S X1=X
17R W !,"(I)ncrease or (D)ecrease to balance? D//" R X:$S($D(DTIME):DTIME,1:300) G:'$T!(X["^") OUT5
18 S:X="" X="D" I X["?"!(X'["D"&(X'["I")) W !!,"Enter a <CR> or 'D' to DECREASE the balance in the status, an 'I' to INCREASE",!,"the balance, or an '^' to ABORT the option." G R
19 I X["D" S X1=-(X1)
20 W !,"THE OLD ESTIMATED BALANCE IS $",$J($P(PRC("CP",0),U,8),0,2) K PRCFX S PRCFX=$P(PRC("CP",0),U,8)+X1
21 W !,"THE NEW ESTIMATED BALANCE IS $",$J(PRCFX,0,2),!!
22 S %A="OK TO POST",%B="A 'NO' or '^' will prevent posting action from occurring." S %=1 D ^PRCFYN
23 I %=1 S $P(^PRC(420,PRC("SITE"),1,PRC("CP"),0),U,8)=PRCFX W !,"POSTED",!!
24 E W !,"NO ACTION TAKEN! " S %A=" DO YOU WISH TO RE-ENTER DATA",%B="" S %=1 D ^PRCFYN G:%=1 X G OUT5
25 S DIC("A")="Select Next Control Point Name: " G X
26OUT5 K %,DIC,I,J,K,PRCFX,X,X1,Y,Z Q
27EN7(XA,XB,XC,XD) ; Post FMS Document information to Purchase Order
28 ; XA - Transaction Type, eg MO,SO
29 ; XB - Document Action, eg E,M,X
30 ; XC - Obligation Processing Date
31 ; XD - PAT Number (w/o Station), eg A51234
32EN7A Q:'$D(GECSFMS("DOC")) Q:GECSFMS("DOC")="" Q:PRCFA("SYS")'="FMS"
33 I '$D(PRCFA("PODA")) Q
34 S PO=PRCFA("PODA") I '$D(^PRC(442,+PO,0)) Q
35 S PO(0)=^PRC(442,+PO,0) D NOW^%DTC K %H,%I S (DATE,Y)=% D DD^%DT K PRCFA("CK") I '$D(^PRC(442,+PO,10,0)) S ^PRC(442,+PO,10,0)="^442.09A^0^0"
36 K DD,DO N GETNUM S GETNUM=$P(^PRC(442,+PO,10,0),U,3)
37 F S GETNUM=GETNUM+1 Q:$G(^PRC(442,+PO,10,GETNUM,0))=""
38 S DINUM=GETNUM,DIC(0)="MNL",DLAYGO=442,DIC="^PRC(442,"_+PO_",10,"
39EN7B S:XB=0 XB="E" S:XB=1 XB="M"
40 S XC=$$DATE1^PRCFFU2(XC),X=XA_"."_XB_"."_XC_"."_XD_"."_Y,X=""_X_"" D FILE^DICN K DINUM,DLAYGO,DD,DO Q:Y<1
41 S MESSAGE=""
42EN7C I +PO>0 D
43 .N PRCCSID S PRCCSID=$P(GECSFMS("DOC"),U,3)_"-"_$P(GECSFMS("DOC"),U,4)
44 .I $D(GECSFMS("BAT")) S PRCCSID=PRCCSID_"-"_$P(GECSFMS("BAT"),U,3)
45 .S ^PRC(442,+PO,10,+Y,0)=$P(^PRC(442,+PO,10,+Y,0),U,1)_U_+PRC("PER")_U_U_PRCCSID,PRCFA("PODA")=+PO D:$D(POESIG) ENCODE^PRCHES4(+PO,+Y,+PRC("PER"),.MESSAGE)
46 .S $P(^PRC(442,+PO,10,+Y,0),U,9)=GECSFMS("DA")
47 .I $D(PRCFA("TT")) I PRCFA("TT")="SO"!(PRCFA("TT")="AR"),PRCFA("MP")=21,$P(TRNODE(0),U,2)="A" S $P(^PRC(442,+PO,10,+Y,0),U,11)=TRDA
48 .I $D(PRCFA("TT")) I PRCFA("TT")="SO"!(PRCFA("TT")="AR"),PRCFA("MP")=2,$D(PRCFA("AMEND#")) S $P(^PRC(442,+PO,10,+Y,0),U,10)=PRCFA("AMEND#")
49 .I $D(PRCFA("TT")) I PRCFA("TT")="MO",$D(PRCFA("AMEND#")) S $P(^PRC(442,+PO,10,+Y,0),U,10)=PRCFA("AMEND#")
50EN7D I $D(PRCFA("OBLDATE")) S $P(^PRC(442,+PO,10,+Y,0),U,12)=PRCFA("OBLDATE")
51 I $D(PRCFA("ACCPD")) S $P(^PRC(442,+PO,10,+Y,0),U,13)=$P(PRCFA("ACCPD"),U,3)
52 K MESSAGE,POESIG,DATE
53 Q
54EN71 ;MARK PO AS OBLIGATED
55 ;S PTYPE=+$P(^PRC(442,PRCFA("PODA"),0),"^",2),PTYPE=$S($D(^PRCD(442.5,PTYPE,0)):$P(^(0),"^",4),1:"")
56 ;I PTYPE'["Y" S $P(^PRC(442,PRCFA("PODA"),7),U,1)=$O(^PRCD(442.3,"AC",40,0)) K PTYPE Q
57 ;S FSO=$P(^PRC(442,PRCFA("PODA"),7),U,1),FSO=$P(^PRCD(442.3,FSO,0),"^",3)+15,FSO=$O(^PRCD(442.3,"AC",FSO,0)),$P(^PRC(442,PRCFA("PODA"),7),"^",1)=FSO K FSO
58 Q
59EN72 ;MARK PO AS COMPLETE
60 S FSO=+^PRC(442,PRCFA("PODA"),7),FSO=$P(^PRCD(442.3,FSO,0),"^",3)
61 I FSO=35!(FSO=36),$D(PRCFA("LIQ")),"CF"[PRCFA("LIQ") S X=FSO+5,DA=PRCFA("PODA") D ENF^PRCHSTAT
62 I $D(PRCFA("PARTIAL")) S $P(^PRC(442,PRCFA("PODA"),11,PRCFA("PARTIAL"),0),U,6)="Y"
63 Q
64EN73 G EN73^PRCFAC
65EN731 G EN731^PRCFAC
66EN732 G EN732^PRCFAC
Note: See TracBrowser for help on using the repository browser.