source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRC5B7.m@ 701

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

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1PRC5B7 ;WISC/PLT-IFCAP post install routine defined in package file ;10/31/94 3:40 PM
2V ;;5.0;IFCAP;**27**;4/21/95
3 ;
4 ;invoke by the post initial installation field of package file.
5EN ;
6 D EN^DDIOL("IFCAP V5 RECONVERT FND/CPF-DOCUMENT STARTS at "_$$NOW^PRC5A)
7 D FND^PRC5B1 ;convert fms FND document (add fund code in file 420.3)
8 ;RESET FND-DOC CONVERTED START/ENDING TIME TO BE NIL
9 D
10 . N PRCRI
11 . S PRCRI(420.92)=""
12 . F S PRCRI(420.92)=$O(^PRCU(420.92,"B","CPF",PRCRI(420.92))) Q:'PRCRI(420.92) S PRCA=^PRCU(420.92,PRCRI(420.92),0),$P(PRCA,"^",5,6)="^",^(0)=PRCA
13 . QUIT
14 D CPF^PRC5B1 ;convert fms CPF document (fill-in fms field for file 420)
15 D EN^DDIOL("IFCAP V5 RECONVERT FND/CPF-DOCUMENT ENDS at "_$$NOW^PRC5A)
16 QUIT
17 ;
18START(PRCAFC) ;restart 442 conversion with options
19 ;PRCAFC=1 if mo/so only and deleting fcp yearly accounting elements
20 ; =2 if not including mo/so
21 ; =3 if mo/so only
22 ; ='ALL' if reconvert all (including mo/so)
23 ;deleting fcp yearly accounting elements
24 D:PRCAFC=1!(PRCAFC="ALL") FCPFY,EN^PRC5B7A
25 QUIT
26 ;
27FCPFY ;delete all fcp fiscal yearly accounting elements
28 N PRCRI,PRCY
29 S PRCRI(420)=0 F S PRCRI(420)=$O(^PRC(420,PRCRI(420))) Q:'PRCRI(420) D
30 . S PRCRI(420.01)=0
31 . F S PRCRI(420.01)=$O(^PRC(420,PRCRI(420),1,PRCRI(420.01))) Q:'PRCRI(420.01) D
32 .. S PRCFY=11
33 .. F S PRCFY=$O(^PRC(420,PRCRI(420),1,PRCRI(420.01),4,PRCFY)) Q:'PRCFY I $D(^(PRCFY,2)) K ^(2)
34 .. QUIT
35 . QUIT
36 QUIT
37 ;
38 ;
39CONVALL ;convert all 442 and generate mo/so
40 S PRCAFC="ALL"
41 QUIT
42 ;
43NEWMOSO ;build mo/so and delete fcp yearly accounting elements
44 S PRCAFC=1
45 QUIT
46 QUIT
47 ;
48BOC ;reconvert boc with no mo/so
49 S PRCAFC=2
50 QUIT
51 ;
52REMOSO ;rebuild mo/so only without deleting fcp yearly account elements
53 S PRCAFC=3
54 QUIT
55 ;
56SPFCP() ;checkactive supply/general post fcp accounting elements
57 N PRCRI,PRCA,A
58 S PRCA="" D EN^DDIOL(" ")
59 S PRCRI(420)=0 F S PRCRI(420)=$O(^PRC(420,"AD",1,PRCRI(420))) Q:'PRCRI(420) D
60 . S A=$O(^PRC(420,PRCRI(420),1,"C","GPFS FMS CONVERSION",0))
61 . I A,'$D(^PRC(420,PRCRI(420),1,A,5)) S A=""
62 . S PRCRI(420.01)=0 F S PRCRI(420.01)=$O(^PRC(420,"AD",1,PRCRI(420),PRCRI(420.01))) QUIT:'PRCRI(420.01) I '$P($G(^PRC(420,PRCRI(420),1,PRCRI(420.01),0)),"^",19),'A S PRCA="*" W PRCRI(420),"-",PRCRI(420.01)," "
63 I PRCA["*" D EN^DDIOL("The above 'station-fcp' GENERAL POST fund control points have active status and the dummy 'GPFS FMS CONVERSION' has no ACCOUNTING ELEMENTS")
64 D EN^DDIOL(" ")
65 S PRCRI(420)=0 F S PRCRI(420)=$O(^PRC(420,"AD",2,PRCRI(420))) Q:'PRCRI(420) D
66 . S PRCRI(420.01)=0 F S PRCRI(420.01)=$O(^PRC(420,"AD",2,PRCRI(420),PRCRI(420.01))) QUIT:'PRCRI(420.01) I '$P($G(^PRC(420,PRCRI(420),1,PRCRI(420.01),0)),"^",19),'$D(^(5)) S:PRCA'["#" PRCA=PRCA_"#" W PRCRI(420),"-",PRCRI(420.01)," "
67 . I PRCA["#" D EN^DDIOL("The above 'station-fcp' SUPPLY FUND control points have active status and have no ACCOUNTING ELEMENTS.")
68 I PRCA]"" D EN^DDIOL("You must correct this before you run option 3 or 4.")
69 QUIT PRCA
70 ;
71CEIL96 ;reset 1 to 4 qtr code sheet released? field from PRC5B
72 N PRCRI,PRCA,PRCB,PRCC
73 N A
74 S PRCRI(420)=0 F S PRCRI(420)=$O(^PRC(420,PRCRI(420))) QUIT:'PRCRI(420) D
75 . S PRCA=PRCRI(420)_"-"_96,PRCB=PRCA F S PRCB=$O(^PRCF(421,"B",PRCB)) QUIT:PRCB-PRCA!'PRCB S PRCRI(421)=$O(^(PRCB,"")) I PRCRI(421),$P(PRCB,"-",3) D:$D(^PRCF(421,PRCRI(421),0))
76 .. S PRCC=^PRCF(421,PRCRI(421),0),A=$P(PRCC,"^",2),A=$P(A," ")
77 .. S PRCC=$$BBFY^PRCSUT(PRCRI(420),$P(PRCB,"-",2),A,1)
78 .. S $P(^PRCF(421,PRCRI(421),0),"^",23)=PRCC-1700_"0000"
79 .. I $D(^PRCF(421,PRCRI(421),4)) F PRCC=1:1:4 S $P(^(4),"^",PRCC)=""
80 .. QUIT
81 . QUIT
82 QUIT
Note: See TracBrowser for help on using the repository browser.