1 | ENEQNX5 ;(WASH ISC)/DH-Manual Update of Equipment Inventory ;9.26.97
|
---|
2 | ;;7.0;ENGINEERING;**35,43**;Aug 17, 1993
|
---|
3 | EN ;Update NX Inventory (Single record mode)
|
---|
4 | DIC W @IOF,!! D GETEQ^ENUTL G:Y'>0 EXIT S DA=+Y
|
---|
5 | I '$D(^ENG(6914,DA)) S ENMSG="RECORD NOT FOUND.",ENMSG(0,1)="Suspect database degrade." D XCPTN^ENEQNX1 G DIC
|
---|
6 | S EN(2)=$S($D(^ENG(6914,DA,2)):^(2),1:""),EN(3)=$S($D(^(3)):^(3),1:"") S ENLOC=$P(EN(3),U,5),ENOLDLOC=$P(EN(3),U,8),ENINVDT=$P(EN(2),U,13) I ENINVDT]"" S Y=ENINVDT X ^DD("DD") S ENINVDT=Y
|
---|
7 | I ENLOC=+ENLOC,$D(^ENG("SP",ENLOC,0)) S ENLOC=$P(^(0),U)
|
---|
8 | W !!,"Entry Number: ",DA S ENPMN=$P(EN(3),U,6) I ENPMN]"" W ?30,"PM Number: ",ENPMN
|
---|
9 | W !,?5,"Location: ",ENLOC,?30,"Previous location: ",ENOLDLOC
|
---|
10 | W !,?5,"Last inventoried: ",ENINVDT
|
---|
11 | CNFRM W !!,"Do you wish to update this record" S %=1 D YN^DICN G:%=0 CNFRM G:%'=1 DIC
|
---|
12 | S DIE="^ENG(6914,",DR="24;23///^S X=""T""" D ^DIE
|
---|
13 | G DIC
|
---|
14 | ;
|
---|
15 | UPDT(DA,ENDT,ENLOC) ; Update PHYSICAL INVENTORY DATE
|
---|
16 | ;
|
---|
17 | ; DA => IEN to Equipment File (not returned)
|
---|
18 | ; ENDT => Date (internal format)
|
---|
19 | ; ENLOC => Location from Work Order (internal format)
|
---|
20 | ; Called by work order routines, mainly PM close-out
|
---|
21 | ;
|
---|
22 | Q:DA']"" Q:'$D(^ENG(6914,DA,0))
|
---|
23 | N CURNT,DIE,DR
|
---|
24 | S CURNT=$P($G(^ENG(6914,DA,2)),U,13)
|
---|
25 | S DIE="^ENG(6914,"
|
---|
26 | I ENDT>CURNT D
|
---|
27 | . S DR="23///^S X=ENDT" D ^DIE
|
---|
28 | . I ENLOC]"",$D(^ENG("SP",ENLOC,0)),ENLOC'=$P($G(^ENG(6914,DA,3)),U,5) S DR="24////^S X=ENLOC" D ^DIE
|
---|
29 | K DA
|
---|
30 | Q
|
---|
31 | ;
|
---|
32 | EXIT K EN,ENLOC,ENOLDLOC,ENINVDT,DA,ENPMN
|
---|
33 | Q
|
---|
34 | ;ENEQNX5
|
---|