source: FOIAVistA/trunk/r/ENGINEERING-EN/ENFACTE.m@ 677

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1ENFACTE ;(WCIOFO)/SAB-FAP CAPITALIZATION THRESHOLD EDIT ;5/22/2002
2 ;;7.0;ENGINEERING;**63,71**;August 17, 1993
3 ;
4 N ENCMR,ENCSN,ENDA,ENL,ENTSK,X,Y
5 S ENL=$$REPEAT^XLFSTR("-",IOM-1)
6 ;
7ASKEQ ; ask equipment
8 ;S DIC("S")="I $$CHKFA^ENFAUTL(+Y)>0" ; ?screen for reported to FAP
9 W !! D GETEQ^ENUTL G:Y'>0 EXIT S ENDA=+Y
10 S ENCMR=$E($$GET1^DIQ(6914,ENDA,19),1,5)
11 S ENCSN=$$GET1^DIQ(6914,ENDA,18)
12 ;
13 ; display info
14 W !,ENL
15 W !,"ENTRY #: ",ENDA,?24,"CMR: ",ENCMR
16 W ?38,"ASSET VALUE: ",$FN($$GET1^DIQ(6914,ENDA,12),",",2)
17 W !,"CSN: ",ENCSN
18 I ENCSN]"" W " (",$$GET1^DIQ(6914,ENDA,"18:2"),")"
19 W !
20 ;
21 ; lock pseudo node to avoid conflict with equipment edit options
22 ; since field 99 will not be updated by those options
23 L +^ENG(6914,"RC",ENDA):2 I '$T D G ASKEQ
24 . W $C(7)
25 . W !,"Another user is currently editing this item with this option."
26 . W !,"Please try again later."
27 ;
28 ; determine and display current status related to task
29 S ENTSK=$$CHKEXP^ENFACTU(ENDA)
30 I $P(ENTSK,U)=0 D
31 . W !,"This equipment will not be expensed by the task because"
32 . W !," ",$P(ENTSK,U,2)
33 I $P(ENTSK,U)="U" D
34 . W !,"This equipment will not be expensed by the task solely because"
35 . W !," ",$P(ENTSK,U,2)," indicated that it should remain capitalized."
36 I $P(ENTSK,U)=1 D
37 . W !,"This equipment will be expensed by the task."
38 ;
39 ; if item meets critera to expense (or was exempted by user) then edit
40 I $P(ENTSK,U)'=0 D
41 . W !
42 . S DIR(0)="Y",DIR("B")=$S($P(ENTSK,U)="U":"YES",1:"NO")
43 . S DIR("A")="Should this item remain capitalized"
44 . S DIR("?",1)="Enter YES to exempt this equipment item from being expensed"
45 . S DIR("?",2)="by the one-time task that will run on July 24, 2002."
46 . S DIR("?",3)="Enter NO if the item should be expensed by the task."
47 . S DIR("?",4)=" "
48 . S DIR("?")="Enter YES or NO"
49 . D ^DIR K DIR Q:$D(DIRUT)
50 . S DR=""
51 . I Y,$P(ENTSK,U)=1 S DR="99////^S X=DUZ" ; exempts from task
52 . I 'Y,$P(ENTSK,U)="U" S DR="99///@" ; removes exemption
53 . I DR]"" S DA=ENDA,DIE="^ENG(6914," D ^DIE K DIE,DA
54 . K DR
55 ;
56 ; unlock
57 L -^ENG(6914,"RC",ENDA)
58 ;
59 G ASKEQ
60 ;
61EXIT ;
62 K DIROUT,DIRUT,DTOUT,DUOUT
63 Q
64 ;ENFACTE
Note: See TracBrowser for help on using the repository browser.