[613] | 1 | ENFAR6 ;WIRMFO/SAB-FIXED ASSET RPT, EQUIP NOT REPORTED TO FAP; 7/19/96
|
---|
| 2 | ;;7.0;ENGINEERING;**29,33**;Aug 17, 1993
|
---|
| 3 | ; List of Capitalized NX Equipment which has not been reported to FAP
|
---|
| 4 | EN ; The option which calls this routine should normally be queued
|
---|
| 5 | ; to print weekly via TaskManager.
|
---|
| 6 | I $D(ZTQUEUED) G QEN ; no user input when automatically queued
|
---|
| 7 | ; ask device
|
---|
| 8 | W !!,"This report searches the entire equipment file and may take some"
|
---|
| 9 | W !,"time to complete. Consider queuing this report to run after-hours."
|
---|
| 10 | S %ZIS="QM" D ^%ZIS G:POP EXIT
|
---|
| 11 | I $D(IO("Q")) D G EXIT
|
---|
| 12 | . S ZTRTN="QEN^ENFAR6"
|
---|
| 13 | . S ZTDESC="Capitalized NX Equip. Not Reported to FAP"
|
---|
| 14 | . D ^%ZTLOAD,HOME^%ZIS K ZTSK
|
---|
| 15 | QEN ; queued entry
|
---|
| 16 | U IO
|
---|
| 17 | S ENPG=0 D NOW^%DTC S Y=% D DD^%DT S ENDT=Y
|
---|
| 18 | S ENL="",$P(ENL,"-",IOM)=""
|
---|
| 19 | D HD
|
---|
| 20 | S (ENC,END,ENT)=0
|
---|
| 21 | S ENSND=$$GET1^DIQ(6910,"1,",1) S:ENSND="" ENSND="Unk" ; default station
|
---|
| 22 | ; loop thru equipment file
|
---|
| 23 | S ENDA=0 F S ENDA=$O(^ENG(6914,ENDA)) Q:'ENDA D Q:END
|
---|
| 24 | . S ENC=ENC+1
|
---|
| 25 | . I '(ENC#500),$D(ZTQUEUED),$$S^%ZTLOAD S ZTSTOP=1,END=1 Q
|
---|
| 26 | . Q:$P($G(^ENG(6914,ENDA,8)),U,2)'=1 ; not capitalized
|
---|
| 27 | . Q:$P($G(^ENG(6914,ENDA,3)),U,11)]"" ; disposition date exists
|
---|
| 28 | . Q:$P($G(^ENG(6914,ENDA,0)),U,4)'="NX" ; not NX
|
---|
| 29 | . Q:+$$CHKFA^ENFAUTL(ENDA) ; already reported to FAP
|
---|
| 30 | . ; should have been reported and wasn't
|
---|
| 31 | . I $Y+4>IOSL D HD Q:END
|
---|
| 32 | . S ENT=ENT+1
|
---|
| 33 | . S ENAQDT=$$GET1^DIQ(6914,ENDA,13)
|
---|
| 34 | . S ENVALUE=$$GET1^DIQ(6914,ENDA,12)
|
---|
| 35 | . S ENFUND=$$GET1^DIQ(6914,ENDA,62)
|
---|
| 36 | . S ENSGL=$$GET1^DIQ(6914,ENDA,38)
|
---|
| 37 | . S ENCSN=$$GET1^DIQ(6914,ENDA,18)
|
---|
| 38 | . S ENCMR=$$GET1^DIQ(6914,ENDA,19)
|
---|
| 39 | . S ENSN=$P($G(^ENG(6914,ENDA,9)),U,5) S:ENSN="" ENSN=ENSND
|
---|
| 40 | . W !,ENDA,?11,ENAQDT,?24,$J("$"_$FN(ENVALUE,",",2),14),?40,ENSN
|
---|
| 41 | . W ?48,ENFUND,?55,ENSGL,?61,ENCSN,?74,ENCMR
|
---|
| 42 | I END W !!,"REPORT STOPPED AT USER REQUEST"
|
---|
| 43 | E D
|
---|
| 44 | . I ENT=0 W !!,"All capitalized NX equipment has been reported to Fixed Assets."
|
---|
| 45 | . I ENT>0 W !!,ENT," capitalized NX equipment entries have not been reported to Fixed Assets."
|
---|
| 46 | . I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR
|
---|
| 47 | D ^%ZISC
|
---|
| 48 | EXIT I $D(ZTQUEUED) S ZTREQ="@"
|
---|
| 49 | K DIR,DIROUT,DIRUT,DIWF,DIWL,DTOUT,DUOUT,X,Y
|
---|
| 50 | K ENAQDT,ENC,ENCMR,ENCSN,ENDA,ENFUND,ENSGL,ENSN,ENSND,ENT,ENVALUE
|
---|
| 51 | K END,ENDT,ENL,ENPG
|
---|
| 52 | Q
|
---|
| 53 | HD ; header
|
---|
| 54 | I $D(ZTQUEUED),$$S^%ZTLOAD S ZTSTOP=1,END=1 Q
|
---|
| 55 | I $E(IOST,1,2)="C-",ENPG S DIR(0)="E" D ^DIR K DIR I 'Y S END=1 Q
|
---|
| 56 | I $E(IOST,1,2)="C-"!ENPG W @IOF
|
---|
| 57 | S ENPG=ENPG+1
|
---|
| 58 | W !,"CAPITALIZED NX EQUIP. NOT REPORTED TO FAP"
|
---|
| 59 | W ?49,ENDT,?72,"page ",ENPG
|
---|
| 60 | W !!,"ENTRY#",?11,"ACQ. DATE",?24,"ASSET VALUE",?40,"STATION"
|
---|
| 61 | W ?48,"FUND",?55,"SGL",?61,"CSN",?74,"CMR"
|
---|
| 62 | W !,$E(ENL,1,10),?11,$E(ENL,1,12),?24,$E(ENL,1,14),?40,$E(ENL,1,7)
|
---|
| 63 | W ?48,$E(ENL,1,6),?55,$E(ENL,1,4),?61,$E(ENL,1,11),?74,$E(ENL,1,5)
|
---|
| 64 | Q
|
---|
| 65 | ;ENFAR6
|
---|