ENPL5C ;(WIRMFO)/LKG,SAB-FYFP REPORT: EQUIPMENT PAGE ;5/15/96
;;7.0;ENGINEERING;**11,23,28**;Aug 17, 1993
EQP ; Equipment Over $250K Page
N ENC,ENDA,ENI,ENPN,ENPR,ENYR,ENY
D HD
F ENPR="LE","MA","MI","MM","NR" D Q:END
. S ENC(ENPR)=0
. I $Y+8>IOSL D FT Q:END D HD
. D HDP
. S ENYR=""
. F S ENYR=$O(^TMP($J,"E",ENPR,ENYR)) Q:ENYR="" D Q:END
. . S ENPN=""
. . F S ENPN=$O(^TMP($J,"E",ENPR,ENYR,ENPN)) Q:ENPN="" D Q:END
. . . S ENDA=$P(^TMP($J,"E",ENPR,ENYR,ENPN),U)
. . . S ENI=0
. . . F S ENI=$O(^ENG("PROJ",ENDA,25,ENI)) Q:'ENI D Q:END
. . . . I $Y+7>IOSL D FT Q:END D HD,HDP W " (continued)"
. . . . S ENY=$G(^ENG("PROJ",ENDA,25,ENI,0)) Q:ENY=""
. . . . S ENC("LINE")=$P(ENY,U,2)*$P(ENY,U,3)+500\1000
. . . . W !,?5,$P(ENPN,"-",2,3)
. . . . W ?15,$E($P($G(^ENG("PROJ",ENDA,0)),U,3),1,30)
. . . . W ?51,ENYR,?68,$P(ENY,U),?101,$P(ENY,U,4)
. . . . W ?107,$J($P(ENY,U,2),3),?113,"$",$J($FN(ENC("LINE"),","),7)
. . . . S ENC(ENPR)=ENC(ENPR)+ENC("LINE")
. W !,?5,"TOTAL",?113,"$",$J($FN(ENC(ENPR),","),7)
;F ENI=$Y+6:1:IOSL W !
F ENI=$Y+6:1:$S(IOSL>254:$Y+9,1:IOSL) W ! ; for long page length
I ENFYB=0!(ENFYE="F") D
. W !,?5,"Note: Equipment not included for projects in "
. W:ENFYB=0 "current year (",ENFY,")"
. I ENFYB=0,ENFYE="F" W " or "
. W:ENFYE="F" "future years (>",ENFY+5,")"
. W "."
D FT
Q
HD ; Page Header
D FYFPHD^ENPL5A
W !,?55,"EQUIPMENT OVER $250K LIST"
W !!,?5,"PROJ #",?15,"TITLE",?48,"FUNDING YR"
W ?68,"EQUIPMENT NAME",?100,"ADD/",?107,"QTY",?113,"TOT COST"
W !,?48,"CONST/RENT",?100,"REPL",?113,"(in $000)"
Q
HDP ; Program Header
W !!,?5,$$EXTERNAL^DILFD(6925,155,"",ENPR)," PROJECTS:"
Q
FT ; Page Footer
S ENPG=ENPG+1 W !!,?64,"Page ",ENPG,?100,ENRDT
I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR S:'Y END=1
Q
WP ; part of detail page output
W !!,?5,"SHORT DESCRIPTION:"
K ^UTILITY($J,"W") S DIWL=27,DIWR=116,DIWF="W|",ENI=0
F S ENI=$O(^ENG("PROJ",ENDA,17,ENI)) Q:'ENI S X=$G(^(ENI,0)) D ^DIWP
D:$O(^ENG("PROJ",ENDA,17,0)) ^DIWW K DIWL,DIWR,DIWF
W !,?5,"SHORT JUSTIFICATION:"
K ^UTILITY($J,"W") S DIWL=27,DIWR=116,DIWF="W|",ENI=0
F S ENI=$O(^ENG("PROJ",ENDA,26,ENI)) Q:'ENI S X=$G(^(ENI,0)) D ^DIWP
D:$O(^ENG("PROJ",ENDA,26,0)) ^DIWW K ^UTILITY($J,"W"),DIWL,DIWR,DIWF
Q
;ENPL5C
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPL5C 2325 printed Nov 22, 2024@17:04:56 Page 2
ENPL5C ;(WIRMFO)/LKG,SAB-FYFP REPORT: EQUIPMENT PAGE ;5/15/96
+1 ;;7.0;ENGINEERING;**11,23,28**;Aug 17, 1993
EQP ; Equipment Over $250K Page
+1 NEW ENC,ENDA,ENI,ENPN,ENPR,ENYR,ENY
+2 DO HD
+3 FOR ENPR="LE","MA","MI","MM","NR"
Begin DoDot:1
+4 SET ENC(ENPR)=0
+5 IF $Y+8>IOSL
DO FT
if END
QUIT
DO HD
+6 DO HDP
+7 SET ENYR=""
+8 FOR
SET ENYR=$ORDER(^TMP($JOB,"E",ENPR,ENYR))
if ENYR=""
QUIT
Begin DoDot:2
+9 SET ENPN=""
+10 FOR
SET ENPN=$ORDER(^TMP($JOB,"E",ENPR,ENYR,ENPN))
if ENPN=""
QUIT
Begin DoDot:3
+11 SET ENDA=$PIECE(^TMP($JOB,"E",ENPR,ENYR,ENPN),U)
+12 SET ENI=0
+13 FOR
SET ENI=$ORDER(^ENG("PROJ",ENDA,25,ENI))
if 'ENI
QUIT
Begin DoDot:4
+14 IF $Y+7>IOSL
DO FT
if END
QUIT
DO HD
DO HDP
WRITE " (continued)"
+15 SET ENY=$GET(^ENG("PROJ",ENDA,25,ENI,0))
if ENY=""
QUIT
+16 SET ENC("LINE")=$PIECE(ENY,U,2)*$PIECE(ENY,U,3)+500\1000
+17 WRITE !,?5,$PIECE(ENPN,"-",2,3)
+18 WRITE ?15,$EXTRACT($PIECE($GET(^ENG("PROJ",ENDA,0)),U,3),1,30)
+19 WRITE ?51,ENYR,?68,$PIECE(ENY,U),?101,$PIECE(ENY,U,4)
+20 WRITE ?107,$JUSTIFY($PIECE(ENY,U,2),3),?113,"$",$JUSTIFY($FNUMBER(ENC("LINE"),","),7)
+21 SET ENC(ENPR)=ENC(ENPR)+ENC("LINE")
End DoDot:4
if END
QUIT
End DoDot:3
if END
QUIT
End DoDot:2
if END
QUIT
+22 WRITE !,?5,"TOTAL",?113,"$",$JUSTIFY($FNUMBER(ENC(ENPR),","),7)
End DoDot:1
if END
QUIT
+23 ;F ENI=$Y+6:1:IOSL W !
+24 ; for long page length
FOR ENI=$Y+6:1:$SELECT(IOSL>254:$Y+9,1:IOSL)
WRITE !
+25 IF ENFYB=0!(ENFYE="F")
Begin DoDot:1
+26 WRITE !,?5,"Note: Equipment not included for projects in "
+27 if ENFYB=0
WRITE "current year (",ENFY,")"
+28 IF ENFYB=0
IF ENFYE="F"
WRITE " or "
+29 if ENFYE="F"
WRITE "future years (>",ENFY+5,")"
+30 WRITE "."
End DoDot:1
+31 DO FT
+32 QUIT
HD ; Page Header
+1 DO FYFPHD^ENPL5A
+2 WRITE !,?55,"EQUIPMENT OVER $250K LIST"
+3 WRITE !!,?5,"PROJ #",?15,"TITLE",?48,"FUNDING YR"
+4 WRITE ?68,"EQUIPMENT NAME",?100,"ADD/",?107,"QTY",?113,"TOT COST"
+5 WRITE !,?48,"CONST/RENT",?100,"REPL",?113,"(in $000)"
+6 QUIT
HDP ; Program Header
+1 WRITE !!,?5,$$EXTERNAL^DILFD(6925,155,"",ENPR)," PROJECTS:"
+2 QUIT
FT ; Page Footer
+1 SET ENPG=ENPG+1
WRITE !!,?64,"Page ",ENPG,?100,ENRDT
+2 IF $EXTRACT(IOST,1,2)="C-"
SET DIR(0)="E"
DO ^DIR
KILL DIR
if 'Y
SET END=1
+3 QUIT
WP ; part of detail page output
+1 WRITE !!,?5,"SHORT DESCRIPTION:"
+2 KILL ^UTILITY($JOB,"W")
SET DIWL=27
SET DIWR=116
SET DIWF="W|"
SET ENI=0
+3 FOR
SET ENI=$ORDER(^ENG("PROJ",ENDA,17,ENI))
if 'ENI
QUIT
SET X=$GET(^(ENI,0))
DO ^DIWP
+4 if $ORDER(^ENG("PROJ",ENDA,17,0))
DO ^DIWW
KILL DIWL,DIWR,DIWF
+5 WRITE !,?5,"SHORT JUSTIFICATION:"
+6 KILL ^UTILITY($JOB,"W")
SET DIWL=27
SET DIWR=116
SET DIWF="W|"
SET ENI=0
+7 FOR
SET ENI=$ORDER(^ENG("PROJ",ENDA,26,ENI))
if 'ENI
QUIT
SET X=$GET(^(ENI,0))
DO ^DIWP
+8 if $ORDER(^ENG("PROJ",ENDA,26,0))
DO ^DIWW
KILL ^UTILITY($JOB,"W"),DIWL,DIWR,DIWF
+9 QUIT
+10 ;ENPL5C