source: FOIAVistA/trunk/r/ENGINEERING-EN/ENFARA.m@ 1328

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1ENFARA ;WIRMFO/SAB-FIXED ASSET RPT, ADJUSTMENT VOUCHER ;6/30/97
2 ;;7.0;ENGINEERING;**39**;Aug 17, 1993
3 ; Adjustment Vouchers during Selected Period
4 ; This report can be scheduled for automatic queuing.
5EN ;
6 ; set start date to yesterday
7 S ENDTS=$$FMADD^XLFDT($P(DT,"."),"-1")
8 ; ask start date when interactive
9 I '$D(ZTQUEUED) D G:$D(DIRUT) EXIT
10 . S DIR(0)="D^::EX",DIR("A")="Start Date",DIR("B")="T-1"
11 . D ^DIR K DIR S ENDTS=Y
12 ; set end date equal to start date
13 S ENDTE=ENDTS
14 ; ask end date when interactive
15 I '$D(ZTQUEUED) D G:$D(DIRUT) EXIT
16 . S DIR(0)="D^::EX",DIR("A")="End Date",DIR("B")=$$FMTE^XLFDT(ENDTS,"D")
17 . D ^DIR K DIR S ENDTE=Y
18 I ENDTE<ENDTS W $C(7),!,"End date can't be prior to start date!",! G EN
19 ; set sort by user to NO
20 S ENSRT("U")=0
21 ; ask sort by user when interactive
22 I '$D(ZTQUEUED) D G:$D(DIRUT) EXIT
23 . S DIR(0)="Y",DIR("B")="NO"
24 . S DIR("A")="Sort by person that created the Adj. Voucher"
25 . D ^DIR K DIR S ENSRT("U")=Y
26 I '$D(ZTQUEUED),ENSRT("U") D G:ENSRT("U",0)="" EXIT
27 . S ENSRT("U",0)=""
28 . S DIR(0)="Y"
29 . S DIR("A")="Include all users",DIR("B")="YES"
30 . D ^DIR K DIR Q:$G(DIRUT)
31 . I Y S ENSRT("U",0)="*",ENSRT("U",0,"E")="ALL USERS"
32 . E D
33 . . S DIC="^VA(200,",DIC(0)="AQEM"
34 . . S DIC("B")=$$GET1^DIQ(200,DUZ,.01)
35 . . D ^DIC K DIC Q:Y<1
36 . . S ENSRT("U",0)=+Y,ENSRT("U",0,"E")=$$GET1^DIQ(200,+Y,.01)
37 ; ask device when interactive
38 I '$D(ZTQUEUED) S %ZIS="QM" D ^%ZIS G:POP EXIT I $D(IO("Q")) D G EXIT
39 . S ZTRTN="QEN^ENFARA1",ZTDESC="Adjustment Voucher Report"
40 . F X="ENDTS","ENDTE","ENSRT(" S ZTSAVE(X)=""
41 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
42 D QEN^ENFARA1
43EXIT ;
44 K DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
45 K ENDTE,ENDTS,ENSRT
46 Q
47 ;ENFARA
Note: See TracBrowser for help on using the repository browser.