source: FOIAVistA/trunk/r/ENGINEERING-EN/ENFAR5.m@ 1607

Last change on this file since 1607 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1ENFAR5 ;WIRMFO/SAB-FIXED ASSET RPT, VOUCHER SUMMARY; 4/7/97
2 ;;7.0;ENGINEERING;**29,39**;Aug 17, 1993
3 ; Voucher Summary of FAP Documents for Station during Accounting Period
4EN ;
5 ; ask STATION
6 S DIR(0)="F^3:5",DIR("A")="STATION NUMBER"
7 S DIR("B")=$$GET1^DIQ(6910,"1,",1)
8 D ^DIR K DIR G:$D(DIRUT) EXIT
9 S ENSNR=Y
10 ; ask start date
11 S DIR(0)="D^::EX",DIR("A")="Start Date"
12 S ENDT("Y")=$E(DT,1,3),ENDT("M")=$E(DT,4,5)
13 S ENDTS=$S(ENDT("M")="01":(ENDT("Y")-1)_"12",1:ENDT("Y")_$E("00",1,2-$L(ENDT("M")-1))_(ENDT("M")-1))_"01"
14 S DIR("B")=$$FMTE^XLFDT(ENDTS,"2D")
15 D ^DIR K DIR G:$D(DIRUT) EXIT
16 S ENDTS=Y
17ASKDTE ; ask end date
18 S DIR(0)="D^::EX",DIR("A")="End Date"
19 S ENDTE=$$EOM^ENUTL(ENDTS)
20 S DIR("B")=$$FMTE^XLFDT(ENDTE,"2D")
21 D ^DIR K DIR G:$D(DIRUT) EXIT
22 I Y<ENDTS W $C(7),!,"End date must be after start date!",! G ASKDTE
23 S ENDTE=Y
24 ; ask device
25 S %ZIS="QM" D ^%ZIS G:POP EXIT
26 I $D(IO("Q")) D G EXIT
27 . S ZTRTN="QEN^ENFAR5",ZTDESC="Voucher Summary for Station"
28 . F X="ENSNR","ENDTS","ENDTE" S ZTSAVE(X)=""
29 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
30QEN ; queued entry
31 U IO
32 ; determine 2 months for which balances should be reported
33 S ENDT("Y")=$E(ENDTS,1,3),ENDT("M")=$E(ENDTS,4,5)
34 S ENDTM1=$S(ENDT("M")="01":(ENDT("Y")-1)_"12",1:ENDT("Y")_$E("00",1,2-$L(ENDT("M")-1))_(ENDT("M")-1))_"00"
35 S ENDTM2=$E(ENDTE,1,5)_"00"
36 ;
37 D GETDATA^ENFAR5A
38 D GETBAL^ENFAR5B
39 D PRINT^ENFAR5B
40 D ^%ZISC
41EXIT I $D(ZTQUEUED) S ZTREQ="@"
42 K DIR,DIROUT,DIRUT,DIWF,DIWL,DTOUT,DUOUT,X,Y
43 K ^TMP($J),ENAMT,ENBAL,ENBAL1,ENBAL2,END,ENDA,ENDT,ENDTE
44 K ENDTM1,ENDTM2,ENDTR,ENDTS,ENFAY3,ENFILE,ENFUND,ENFUNDNW
45 K ENI,ENIEN,ENL,ENPG,ENNOTE,ENSGL,ENSNR,ENT,ENY,ENY0,ENY1
46 Q
47 ;ENFAR5
Note: See TracBrowser for help on using the repository browser.