source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENFARC2.m@ 862

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

initial load of WorldVistAEHR

File size: 5.9 KB
RevLine 
[613]1ENFARC2 ;WIRMFO/SAB-FIXED ASSET RPT, TRANSACTION REGISTER (CONT); 12/16/1998
2 ;;7.0;ENGINEERING;**39,60**;Aug 17, 1993
3 Q
4 ;This routine contains detail prints for FAP Document types
5 ;It is called from ENFARC1 and ENFAR9 - needs at 6+ blank lines
6 ; Input
7 ; END - flag; true when quit
8 ; ENDA("F?") - ien of document being printed
9 ; ENDA("FA") - ien of FA document associated with the ENDA("F?")
10 ; ENDA("EQ") - ien of the equipment entry for ENDA("F?")
11 ; ENTAG("HD") - (optional) line TAG for page header
12 ; ENTAG("HDC") - (optional) line tag for page header continued note
13 ; ENTAG("FT") - (optional) lien tag for page footer
14 ; Output
15 ; END - flag; true when quit
16 ;
17F2 ; print FA details (5 lines)
18 N ENX,ENY3
19 S ENY3=$G(^ENG(6915.2,ENDA("F?"),3))
20 S ENX=$P(ENY3,U,15)
21 S ENX(0)=$S(ENX]"":$O(^ENCSN(6917,"B",ENX,0)),1:"")
22 S ENX("D")=$S(ENX(0):$P($G(^ENCSN(6917,ENX(0),0)),U,3),1:"")
23 ; if called by Document History - display fund since it is not
24 ; shown on a column
25 I $G(ENTAG("HD"))["ENFAR9" W ?4,"FUND: ",$P(ENY3,U,10)
26 W ?25,"CSN: ",ENX W:ENX("D")]"" " (",ENX("D"),")"
27 ; if xarea available then display it, otherwise display location
28 I $P(ENY3,U,31)]"" W !,?4,"CMR: ",$P(ENY3,U,31)
29 E W !,?4,"NATIONAL EIL: ",$P(ENY3,U,8)
30 W ?25,"COST CENTER: ",$P(ENY3,U,28)
31 S ENX=$P(ENY3,U,19)
32 W ?48,"ACQ METH: ",$$EXTERNAL^DILFD(6914,20.1,"",ENX)
33 W !,?4,"ACQ DATE: ",$P(ENY3,U,17),"/",$P(ENY3,U,18),"/",$E($P(ENY3,U,16),3,4)
34 W ?25,"LE: ",$P(ENY3,U,24)
35 W ?48,"REPL DATE: ",$P(ENY3,U,22),"/",$P(ENY3,U,23),"/",$E($P(ENY3,U,21),3,4)
36 W !,?4,"BOC: ",$P(ENY3,U,14),?25,"A/O: ",$P(ENY3,U,11)
37 S ENX=$P($G(^ENG(6915.2,ENDA("F?"),7)),U,2)
38 W ?48,"EQUITY ACCOUNT: ",$$EXTERNAL^DILFD(6914,64,"",ENX)
39 W !,?4,"P.O.#: " W:ENDA("EQ") $P($G(^ENG(6914,ENDA("EQ"),2)),U,2)
40 Q
41F3 ; print FB details (2 lines)
42 N ENX,ENY3
43 S ENY3=$G(^ENG(6915.3,ENDA("F?"),3))
44 W ?25,"DESCRIPTION: ",$P(ENY3,U,8)
45 W !,?4,"P.O.#: " W:ENDA("EQ") $P($G(^ENG(6914,ENDA("EQ"),2)),U,2)
46 W ?25,"ACQ DATE: ",$P(ENY3,U,10),"/",$P(ENY3,U,11),"/",$E($P(ENY3,U,9),3,4)
47 S ENX=$P(ENY3,U,12)
48 W ?48,"ACQ METH: ",$$EXTERNAL^DILFD(6914,20.1,"",ENX)
49 Q
50F4 ; print FC details (1-9 lines)
51 N EN,ENX,ENY3,ENY4,ENY100
52 W ?25,"P.O.#: " W:ENDA("EQ") $P($G(^ENG(6914,ENDA("EQ"),2)),U,2)
53 D FCPVAL^ENFARC3(6915.4,ENDA("F?"),ENDA("FA"))
54 S ENY3=$G(^ENG(6915.4,ENDA("F?"),3))
55 S ENY4=$G(^ENG(6915.4,ENDA("F?"),4))
56 S ENY100=$G(^ENG(6915.4,ENDA("F?"),100))
57 I $P(ENY3,U,11)]"",$P(ENY3,U,11)'=EN(30) D Q:END
58 . I $Y+7>IOSL D FT,HD Q:END D HDC
59 . W !,?4,$S($P(ENY3,U,8)="00":"CSN",1:"DESCRIPTION")," CHANGED"
60 . W ?25,"OLD: ",EN(30)
61 . I $P(ENY3,U,8)="00" D ; show CSN brief desc
62 . . S ENX(0)=$S(EN(30)]"":$O(^ENCSN(6917,"B",EN(30),0)),1:"")
63 . . S ENX("D")=$S(ENX(0):$P($G(^ENCSN(6917,ENX(0),0)),U,3),1:"")
64 . . W:ENX("D")]"" " (",ENX("D"),")"
65 . W !,?25,"NEW: ",$P(ENY3,U,11)
66 . I $P(ENY3,U,8)="00" D ; show CSN brief desc
67 . . S ENX(0)=$S($P(ENY3,U,11)]"":$O(^ENCSN(6917,"B",$P(ENY3,U,11),0)),1:"")
68 . . S ENX("D")=$S(ENX(0):$P($G(^ENCSN(6917,ENX(0),0)),U,3),1:"")
69 . . W:ENX("D")]"" " (",ENX("D"),")"
70 I $P(ENY3,U,10)]"",$P(ENY3,U,10)'=EN(29) D Q:END
71 . I $Y+6>IOSL D FT,HD Q:END D HDC
72 . W !,?4,"NATIONAL EIL CHANGED "
73 . W ?25,"OLD: ",EN(29),?53,"NEW: ",$P(ENY3,U,10)
74 I $P(ENY3,U,15)]"",$P(ENY3,U,15)'=EN(34) D Q:END
75 . I $Y+6>IOSL D FT,HD Q:END D HDC
76 . W !,?4,"ACQ METHOD CHANGED "
77 . W ?25,"OLD: ",$$EXTERNAL^DILFD(6914,20.1,"",EN(34))
78 . W ?53,"NEW: ",$$EXTERNAL^DILFD(6914,20.1,"",$P(ENY3,U,15))
79 I $P(ENY100,U,6)]"",$P(ENY100,U,6)'=EN(105) D Q:END
80 . I $Y+6>IOSL D FT,HD Q:END D HDC
81 . W !,?4,"ACQ DATE CHANGED "
82 . W ?25,"OLD: ",$$FMTE^XLFDT(EN(105))
83 . W ?53,"NEW: ",$$FMTE^XLFDT($P(ENY100,U,6))
84 I $P(ENY4,U,3)]"",$P(ENY4,U,3)'=EN(37) D Q:END
85 . I $Y+6>IOSL D FT,HD Q:END D HDC
86 . W !,?4,"USEFUL LIFE CHANGED "
87 . W ?25,"OLD: ",EN(37),?53,"NEW: ",$P(ENY4,U,3)
88 I $P(ENY100,U,7)]"",$P(ENY100,U,7)'=EN(106) D Q:END
89 . I $Y+6>IOSL D FT,HD Q:END D HDC
90 . W !,?4,"REPL DATE CHANGED "
91 . W ?25,"OLD: ",$$FMTE^XLFDT(EN(106))
92 . W ?53,"NEW: ",$$FMTE^XLFDT($P(ENY100,U,7))
93 I $P(ENY4,U,6)]"",$P(ENY4,U,6)'=$P(ENY100,U,4) D Q:END
94 . I $Y+6>IOSL D FT,HD Q:END D HDC
95 . W !,?4,"ASSET VALUE CHANGED "
96 . W ?25,"OLD: ",$P(ENY100,U,4),?53,"NEW: ",$P(ENY4,U,6)
97 Q
98F5 ; print FD details (2 lines)
99 N ENTY,ENY5
100 S ENY5=$G(^ENG(6915.5,ENDA("F?"),5))
101 S ENTY=$P($G(^ENG(6915.5,ENDA("F?"),100)),U)
102 W ?25,$S(ENTY="T":"TURN-IN",1:"DISP")," DATE: "
103 W $P(ENY5,U,6),"/",$P(ENY5,U,7),"/",$E($P(ENY5,U,5),3,4)
104 W ?49,"DISP AUTHORITY: ",$P(ENY5,U,9)
105 Q:ENTY="T"
106 W !,?4,"SELLING PRICE: ",$P(ENY5,U,8)
107 W ?34,"DISP METHOD: ",$$GET1^DIQ(6915.5,ENDA("F?"),"103:1")
108 Q
109F6 ; print FR details (0-5 lines)
110 N EN,ENY3
111 D FRPVAL^ENFARC3(6915.6,ENDA("F?"),ENDA("FA"))
112 S ENY3=$G(^ENG(6915.6,ENDA("F?"),3))
113 I $P(ENY3,U,9)]"",$P(ENY3,U,9)'=EN(28) D Q:END
114 . I $Y+6>IOSL D FT,HD Q:END D HDC
115 . W !,?4,"FUND CHANGED ",?25,"OLD: ",EN(28),?53,"NEW: ",$P(ENY3,U,9)
116 I $P(ENY3,U,10)]"",$P(ENY3,U,10)'=EN(29) D Q:END
117 . I $Y+6>IOSL D FT,HD Q:END D HDC
118 . W !,?4,"A/O CHANGED ",?25,"OLD: ",EN(29),?53,"NEW: ",$P(ENY3,U,10)
119 I $P(ENY3,U,13)]"",$P(ENY3,U,13)'=EN(32) D Q:END
120 . I $Y+6>IOSL D FT,HD Q:END D HDC
121 . W !,?4,"BOC CHANGED ",?25,"OLD: ",EN(32),?53,"NEW: ",$P(ENY3,U,13)
122 I $P(ENY3,U,18)]"",$P(ENY3,U,18)'=EN(37) D Q:END
123 . I $Y+6>IOSL D FT,HD Q:END D HDC
124 . W !,?4,"CMR CHANGED "
125 . W ?25,"OLD: ",EN(37),?53,"NEW: ",$P(ENY3,U,18)
126 ; only check location when we don't have xarea (cmr)
127 I $P(ENY3,U,18)="",$P(ENY3,U,14)]"",$P(ENY3,U,14)'=EN(33) D Q:END
128 . I $Y+6>IOSL D FT,HD Q:END D HDC
129 . W !,?4,"NATIONAL EIL CHANGED "
130 . W ?25,"OLD: ",EN(33),?53,"NEW: ",$P(ENY3,U,14)
131 I $P(ENY3,U,15)]"",$P(ENY3,U,15)'=EN(34) D Q:END
132 . I $Y+6>IOSL D FT,HD Q:END D HDC
133 . W !,?4,"COST CENTER CHANGED "
134 . W ?25,"OLD: ",EN(34),?53,"NEW: ",$P(ENY3,U,15)
135 Q
136 ;
137HD ; call page header
138 I $G(ENTAG("HD"))]"" D @ENTAG("HD")
139 Q
140HDC ; call page header continued
141 I $G(ENTAG("HDC"))]"" D @ENTAG("HDC")
142 Q
143FT ; call page footer
144 I $G(ENTAG("FT"))]"" D @ENTAG("FT")
145 Q
146 ;ENFARC2
Note: See TracBrowser for help on using the repository browser.