source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCB1E.m@ 1250

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1PRCB1E ;WISC/PLT-QUARTERLY CARRY FORWARD ; 03/01/96 1:27 PM
2V ;;5.1;IFCAP;**64,72**;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 QUIT ;invalid entry
5 ;
6EN ;quarterly carry forward
7 N PRCA,PRCB,PRCQCD,PRCOPT,PRCRI,PRCDI,PRCDUZ,PRC,PRCDES
8 N A,B,C
9 S PRCQCD=1 ;over lapping days
10Q1 ;station
11 S PRCF("X")="AS" D ^PRCFSITE G:'% EXIT
12 S PRCRI(420)=+PRC("SITE")
13Q2 S B="O^1:Carry forward Outstanding Requests;2:Carry forward balances for all control points;3:Carry forward balances for a single control point"
14 K X,Y S Y(1)="^W ""Enter an option number 1 to 3."""
15 D SC^PRC0A(.X,.Y,"Select Number",B,"")
16 S A=Y K X,Y
17 G EXIT:A=""!(A["^")
18 S PRCOPT=+A
19 I PRCOPT=1 G Q4
20 I "12"[PRCOPT G Q4
21Q3 ;select control point
22 S PRCDI="420;^PRC(420,;"_PRC("SITE")
23 S $P(PRCDI,"~",2)="420.01;"_$P($P(PRCDI,"~"),";",2)_PRCRI(420)_",1,;"
24 S X("S")="I ^(0)-9999"
25 D LOOKUP^PRC0B(.X,.Y,PRCDI,"AEOQS","Select Fund Control Point: ")
26 I Y<0!(X="") S PRCQT="^" G Q2
27 K X S PRCRI(420.01)=+Y,PRC("CP")=$P($P(Y,"^")," ")
28Q4 ;fiscal year - quarter
29 S A=$P($G(^PRC(420,PRC("SITE"),0)),"^",9),A=$$DATE^PRC0C(A,"I")
30 S PRCA=$P(A,"^")_"-"_$P(A,"^",2)_"^"_$P(A,"^",7)_"^"_$P(A,"^",8)
31 S A=$$DATE^PRC0C($P(PRCA,"^",3)+100,"H"),A=$$QTRDATE^PRC0D(+A,$P(A,"^",2))
32 S B="" F C=$P(A,"^",8):1 S:C-3#7'=6&(C-3#7) B=B+1 Q:B=PRCQCD
33 S $P(PRCA,"^",4,5)=$P($$DATE^PRC0C(C-1,"H"),"^",7,8)
34 D EN^DDIOL(" "),EN^DDIOL("The oldest OPEN quarter in file is "_$P(PRCA,"^",1)_".")
35 S E="O^4:6^K:X'?2N.1""-"".1N&(X'?4N.1""-"".1N)!($P(X,""-"",2)<1)!($P(X,""-"",2)>4) X",Y(1)="Enter a 2 or 4 digit year followed by a '-' and quarter #, like 88-3 or 1988-3"
36 D FT^PRC0A(.X,.Y,"For Budget Fiscal Year - Quarter (YY-Q)",E,"")
37 G:X["^"!(X="")!(Y'?2.4N.1"-".1N) Q2
38 S $P(Y,"-")=+$$YEAR^PRC0C($P(Y,"-"))
39 I "1"[PRCOPT,Y]$P(PRCA,"^")!(Y=$P(PRCA,"^")&($H-1<$P(PRCA,"^",5))) S A="You must close quarter "_$P(PRCA,"^")_" first after "_$E($P(PRCA,"^",4),4,5)_"/"_$E($P(PRCA,"^",4),6,7)_"/"_$E($P(PRCA,"^",4),2,3) D EN^DDIOL(A) G Q4
40 I "23"[PRCOPT,Y]$P(PRCA,"^")!(Y=$P(PRCA,"^")) D EN^DDIOL("You may only rerun closed quarters. That is any quarter before "_$P(PRCA,"^")) G Q4
41 I "1996-1"]Y D EN^DDIOL("Carry forward can not be run for any quarters before '96-1'.") G Q4
42 S $P(PRCOPT,"^",2)=Y,$P(PRCOPT,"^",3)=PRCRI(420),$P(PRCOPT,"^",4)=$G(PRCRI(420.01))
43 I $P(PRCOPT,"^",2)["-4",$P(^PRC(411,PRC("SITE"),0),"^",25)'="Y" D EN^DDIOL("The outstanding requests are not carried forward to the new fiscal year.")
44Q5 D YN^PRC0A(.X,.Y,"Ready to Run","O","NO")
45 I X["^"!(X="")!'Y S PRCOPT=$P(PRCOPT,"^") G Q4
46 D CF
47EXIT QUIT
48 ;
49 ;
50CF ;start carry forward
51 N PRCDUZ
52 S PRCDUZ=DUZ
53 I +PRCOPT=1 S ZTDESC="IFCAP Carry Forward Outstanding Requests from Qtr "_$E($P(PRCOPT,"^",2),3,999)
54 I +PRCOPT=2 S ZTDESC="IFCAP Carry Forward Balances for All CP'S from Qtr "_$E($P(PRCOPT,"^",2),3,999)
55 I +PRCOPT=3 S ZTDESC="IFCAP Carry Forward Balances for a Single CP from Qtr "_$E($P(PRCOPT,"^",2),3,999)
56 S PRCDES=ZTDESC
57 S ZTRTN="TMEN^PRCB1E1" F A="PRCOPT","PRCDUZ","PRCDES","DUZ*" S ZTSAVE(A)=""
58 D ^PRCFQ
59 QUIT
Note: See TracBrowser for help on using the repository browser.