Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ENFACTE

ENFACTE.m

Go to the documentation of this file.
  1. ENFACTE ;(WCIOFO)/SAB-FAP CAPITALIZATION THRESHOLD EDIT ;5/22/2002
  1. ;;7.0;ENGINEERING;**63,71**;August 17, 1993
  1. ;
  1. N ENCMR,ENCSN,ENDA,ENL,ENTSK,X,Y
  1. S ENL=$$REPEAT^XLFSTR("-",IOM-1)
  1. ;
  1. ASKEQ ; ask equipment
  1. ;S DIC("S")="I $$CHKFA^ENFAUTL(+Y)>0" ; ?screen for reported to FAP
  1. W !! D GETEQ^ENUTL G:Y'>0 EXIT S ENDA=+Y
  1. S ENCMR=$E($$GET1^DIQ(6914,ENDA,19),1,5)
  1. S ENCSN=$$GET1^DIQ(6914,ENDA,18)
  1. ;
  1. ; display info
  1. W !,ENL
  1. W !,"ENTRY #: ",ENDA,?24,"CMR: ",ENCMR
  1. W ?38,"ASSET VALUE: ",$FN($$GET1^DIQ(6914,ENDA,12),",",2)
  1. W !,"CSN: ",ENCSN
  1. I ENCSN]"" W " (",$$GET1^DIQ(6914,ENDA,"18:2"),")"
  1. W !
  1. ;
  1. ; lock pseudo node to avoid conflict with equipment edit options
  1. ; since field 99 will not be updated by those options
  1. L +^ENG(6914,"RC",ENDA):2 I '$T D G ASKEQ
  1. . W $C(7)
  1. . W !,"Another user is currently editing this item with this option."
  1. . W !,"Please try again later."
  1. ;
  1. ; determine and display current status related to task
  1. S ENTSK=$$CHKEXP^ENFACTU(ENDA)
  1. I $P(ENTSK,U)=0 D
  1. . W !,"This equipment will not be expensed by the task because"
  1. . W !," ",$P(ENTSK,U,2)
  1. I $P(ENTSK,U)="U" D
  1. . W !,"This equipment will not be expensed by the task solely because"
  1. . W !," ",$P(ENTSK,U,2)," indicated that it should remain capitalized."
  1. I $P(ENTSK,U)=1 D
  1. . W !,"This equipment will be expensed by the task."
  1. ;
  1. ; if item meets critera to expense (or was exempted by user) then edit
  1. I $P(ENTSK,U)'=0 D
  1. . W !
  1. . S DIR(0)="Y",DIR("B")=$S($P(ENTSK,U)="U":"YES",1:"NO")
  1. . S DIR("A")="Should this item remain capitalized"
  1. . S DIR("?",1)="Enter YES to exempt this equipment item from being expensed"
  1. . S DIR("?",2)="by the one-time task that will run on July 24, 2002."
  1. . S DIR("?",3)="Enter NO if the item should be expensed by the task."
  1. . S DIR("?",4)=" "
  1. . S DIR("?")="Enter YES or NO"
  1. . D ^DIR K DIR Q:$D(DIRUT)
  1. . S DR=""
  1. . I Y,$P(ENTSK,U)=1 S DR="99////^S X=DUZ" ; exempts from task
  1. . I 'Y,$P(ENTSK,U)="U" S DR="99///@" ; removes exemption
  1. . I DR]"" S DA=ENDA,DIE="^ENG(6914," D ^DIE K DIE,DA
  1. . K DR
  1. ;
  1. ; unlock
  1. L -^ENG(6914,"RC",ENDA)
  1. ;
  1. G ASKEQ
  1. ;
  1. EXIT ;
  1. K DIROUT,DIRUT,DTOUT,DUOUT
  1. Q
  1. ;ENFACTE