ENXTIPS ;WIRMFO/SAB-Patch Post-init (EN*7*38) ;10/21/96
;;7.0;ENGINEERING;**38**;Aug 17, 1993
N ENDA,ENEQ,ENY
; move asset value from FD turn-in documents to new Orig. Asset Value
; loop thru FD Documents
D BMES^XPDUTL(" Populate ORIGINAL ASSET VALUE from FD-T Documents...")
S ENDA=0 F S ENDA=$O(^ENG(6915.5,ENDA)) Q:'ENDA D
. S ENY=$G(^ENG(6915.5,ENDA,100))
. Q:$P(ENY,U)'="T" ; not for turn-in
. Q:$P(ENY,U,2)'>0 ; no asset value recorded
. S ENEQ=$P($G(^ENG(6915.5,ENDA,0)),U) Q:'ENEQ ; missing equipment IEN
. ; update original asset value when blank
. I $P($G(^ENG(6914,ENEQ,3)),U,15)="" S $P(^(3),U,15)=$P(ENY,U,2)
D MES^XPDUTL(" Completed post-init.")
Q
;ENXTIPS
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENXTIPS 709 printed Dec 13, 2024@01:57:06 Page 2
ENXTIPS ;WIRMFO/SAB-Patch Post-init (EN*7*38) ;10/21/96
+1 ;;7.0;ENGINEERING;**38**;Aug 17, 1993
+2 NEW ENDA,ENEQ,ENY
+3 ; move asset value from FD turn-in documents to new Orig. Asset Value
+4 ; loop thru FD Documents
+5 DO BMES^XPDUTL(" Populate ORIGINAL ASSET VALUE from FD-T Documents...")
+6 SET ENDA=0
FOR
SET ENDA=$ORDER(^ENG(6915.5,ENDA))
if 'ENDA
QUIT
Begin DoDot:1
+7 SET ENY=$GET(^ENG(6915.5,ENDA,100))
+8 ; not for turn-in
if $PIECE(ENY,U)'="T"
QUIT
+9 ; no asset value recorded
if $PIECE(ENY,U,2)'>0
QUIT
+10 ; missing equipment IEN
SET ENEQ=$PIECE($GET(^ENG(6915.5,ENDA,0)),U)
if 'ENEQ
QUIT
+11 ; update original asset value when blank
+12 IF $PIECE($GET(^ENG(6914,ENEQ,3)),U,15)=""
SET $PIECE(^(3),U,15)=$PIECE(ENY,U,2)
End DoDot:1
+13 DO MES^XPDUTL(" Completed post-init.")
+14 QUIT
+15 ;ENXTIPS