1 | ENWOP ;(WASH ISC)/DLM/DH-Work Order Print ;4.7.97
|
---|
2 | ;;7.0;ENGINEERING;**21,35**;Aug 17, 1993
|
---|
3 | ; Expects ENSHKEY,ENBY
|
---|
4 | ; ENSRT if ENBY="LOC"
|
---|
5 | EN N SPC
|
---|
6 | N IOINLOW,IOINHI D ZIS^ENUTL S ENPG=0
|
---|
7 | S %DT="T",X="N" D ^%DT S ENTOD=Y X ^DD("DD") S ENTOD("E")=Y W:$E(IOST,1,2)="C-" @IOF
|
---|
8 | ONE I '$D(ENSHKEY("ALL")) D
|
---|
9 | . S ENDNX="",ENQUIT=0
|
---|
10 | . I $O(^ENG(6920,"AINC",ENSHKEY,ENDNX))'>0 D Q
|
---|
11 | .. S ENQUIT=1
|
---|
12 | .. W !!,"There are no incomplete work orders for the ",$P(^DIC(6922,ENSHKEY,0),U)," shop."
|
---|
13 | .. I $E(IOST,1,2)="C-" W !!,"Press <RETURN> to continue..." R X:DTIME
|
---|
14 | . F Q:ENQUIT!($O(^ENG(6920,"AINC",ENSHKEY,ENDNX))'>0) D
|
---|
15 | .. D HDR
|
---|
16 | .. S ENDNX1=ENDNX ;I $D(XRTL) D T0^%ZOSV
|
---|
17 | .. D FDAT^ENWOP3 ;I $D(XRT0) S XRTN=$T(+0) D T1^%ZOSV
|
---|
18 | .. I ENWONX=0,ENPG=1 W !!,"There are no incomplete work orders that meet the search criteria",!,"in the ",$P(^DIC(6922,ENSHKEY,0),U)," Shop."
|
---|
19 | .. I $E(IOST,1,2)="C-" D
|
---|
20 | ... I ENWONX=0 W !!,"Press <RETURN> to continue..."
|
---|
21 | ... E D
|
---|
22 | .... I 'ENQUIT W !,"'^' TO EXIT; 1 TO ",ENWONX," FOR EXPANDED DISPLAY: MORE// "
|
---|
23 | .... E W !,"1 TO ",ENWONX," FOR EXPANDED DISPLAY: EXIT//"
|
---|
24 | ... R X:DTIME
|
---|
25 | ... I X?1.2N,$D(ENWONX(X)) S DA=ENWONX(X) D EXPAND
|
---|
26 | ... I $E($G(X))="^" S ENQUIT=1
|
---|
27 | ALL I $D(ENSHKEY("ALL")) D
|
---|
28 | . N ENSHKEY S ENABORT=0
|
---|
29 | . F ENSHKEY=0:0 S ENSHKEY=$O(^DIC(6922,ENSHKEY)) Q:ENABORT!(ENSHKEY'>0) D
|
---|
30 | .. S ENDNX="",ENQUIT=0 I IO'=IO(0) U IO(0) W "." U IO
|
---|
31 | .. F Q:ENQUIT!($O(^ENG(6920,"AINC",ENSHKEY,ENDNX))'>0) D
|
---|
32 | ... D HDR
|
---|
33 | ... S ENDNX1=ENDNX D FDAT^ENWOP3
|
---|
34 | ... I ENWONX=0,ENDNX1="" W !!,"There are no incomplete work orders that meet the search criteria",!,"in the ",$P(^DIC(6922,ENSHKEY,0),U)," Shop."
|
---|
35 | ... I $E(IOST,1,2)="C-",ENQUIT D Q
|
---|
36 | .... I ENWONX=0 W !!,"'^' TO EXIT; <RETURN> FOR NEXT SHOP: NEXT SHOP//"
|
---|
37 | .... E W !,"'^' TO EXIT; 1 TO ",ENWONX," FOR EXPANDED DISPLAY: NEXT SHOP//"
|
---|
38 | .... R X:DTIME
|
---|
39 | .... I X?1.2N,$D(ENWONX(X)) S DA=ENWONX(X) D EXPAND
|
---|
40 | .... I $E($G(X))="^" S ENABORT=1
|
---|
41 | ... I $E(IOST,1,2)="C-",'ENQUIT D
|
---|
42 | .... W !,"'^' FOR NEXT SHOP; '^^' TO EXIT; 1 TO ",ENWONX," FOR EXPANDED DISPLAY: MORE//"
|
---|
43 | .... R X:DTIME
|
---|
44 | .... I X?1.2N,$D(ENWONX(X)) S DA=ENWONX(X) D EXPAND
|
---|
45 | .... I $E($G(X))="^" S ENQUIT=1
|
---|
46 | .... I $E($G(X),1,2)="^^" S ENABORT=1
|
---|
47 | G EXIT
|
---|
48 | ;
|
---|
49 | HDR W:$E(IOST,1,2)="C-" IOINHI W:ENPG @IOF S ENPG=ENPG+1
|
---|
50 | W "INCOMPLETE WORK ORDERS ("_$P(^DIC(6922,ENSHKEY,0),U)_") "_ENTOD("E")_" Page "_ENPG
|
---|
51 | W !,"WORK ORDER",?18,"REQ DATE",?27,"LOCATION",?43,"EQUIP ID#",?54,"CONTACT",?68,"PRI.",?73,"STAT"
|
---|
52 | W !," EMPL ASSIGNED",?22,"TASK DESCRIPTION"
|
---|
53 | W !?2,"ACC #",?20,"S/P",?27,"VENDOR",?51,"P.O. #",?59,"EST.DEL.",?69,"DEL.COMP."
|
---|
54 | K X S $P(X,"-",79)="-" W !,X,!
|
---|
55 | D CLEAN
|
---|
56 | S ENY=5
|
---|
57 | Q
|
---|
58 | ;
|
---|
59 | EXPAND ;Screen display work order
|
---|
60 | S ENDNX=ENDNX1,ENPG=ENPG-1,ENQUIT=0
|
---|
61 | D EDIT1^ENWOD
|
---|
62 | W @IOF
|
---|
63 | Q
|
---|
64 | ;
|
---|
65 | CLEAN K X,ENWONX S ENWONX=0 W:$E(IOST,1,2)="C-" IOINLOW
|
---|
66 | Q
|
---|
67 | EXIT ;
|
---|
68 | K ENDNX,ENWONX,ENTOD,ENPG,ENQUIT,ENABORT,ENY,ENWO,ENDSTAT
|
---|
69 | W @IOF
|
---|
70 | S:$D(ZTQUEUED) ZTREQ="@"
|
---|
71 | K ENWOR,ENRDA,ENLOC,ENRBE,ENRQR,ENPRI,ENTEC,ENDPR,ENSTAT
|
---|
72 | K ENPMI,ENAC,DA,ENEQ,ENDNX1,ENSRT
|
---|
73 | K ENSHKEY("ALL")
|
---|
74 | Q
|
---|
75 | ;ENWOP
|
---|