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

ACRFETD.m

Go to the documentation of this file.
ACRFETD ;IHS/OIRM/DSD/THL,AEF - EDIT TRAVEL DAY; [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;ROUTINE TO ALLOW EDIT OF TRAVEL DAYS
EN D FIELDS
 F  D EN1 Q:$D(ACRQUIT)
EXIT K ACRX,ACRTV0,ACRTV1,ACRTVDT,ACRFLDS,ACRY,ACR,ACRTVDSC,ACRTVRCJ,ACRJ
 Q
EN1 ;
 D DISP
 S DIR(0)="LO^1:22"
 S DIR("A")="      Edit which fields"
 D DIR^ACRFDIC
 I +Y<1 S ACRQUIT="" Q
 S ACRFLDS=ACRY
 W !
 F J=1:1 S ACRX=$P(ACRFLDS,",",J) Q:ACRX=""  D DIE
 Q
DIE ;
 S DA=ACRTVDA
 S DIE="^ACRTV("
 S DR=ACR("DR",ACRX)
 I $E(DR)'="[",DR'["T" S DR=DR_"T"
 D DIE^ACRFDIC
 Q
DISP ;DISPLAY TRAVEL DAY INFO
 D GATHER
 W @IOF
 W !?17,@ACRON,"DAILY TRAVEL INFORMATION",@ACROF
 W !,"1. DATE........: ",$G(ACR(1))
 W ?40,"11. HOTEL.......: ",$G(ACR(11))
 W !,"2. DEPART TIME.: ",$G(ACR(2))
 W ?40,"12. CONFIRMATN #: ",$G(ACR(12))
 W !,"3. DEPART FROM.: ",$G(ACR(3))
 W ?40,"13. RENTAL CAR..: ",$G(ACR(13))
 W !,"4. ARRIVE TIME.: ",$G(ACR(4))
 W ?40,"14. CONFIRMATN #: ",$G(ACR(14))
 W !,"5. ARRIVE AT...: ",$G(ACR(5))
 W ?40,"15. CAR EXPENSE.: ",$G(ACR(15))
 W !,"6. DUTY STATION: ",$G(ACR(6))
 W ?40,"16. PERDIEM/LDG.: ",$G(ACR(16))
 W !,"7. MILES-AIRPRT: ",$G(ACR(7))
 W ?40,"17. POV MILES...: ",$G(ACR(17))
 W !,"8. MILEAGE RATE: ",$G(ACR(8))
 W ?40,"18. POV MLS RATE: ",$G(ACR(18))
 W !,"9. HOME PHONE..: ",$G(ACR(9))
 W ?40,"19. TAXI/SHUTTLE: ",$G(ACR(19))
 W !,"10.OTHER EXPENS: ",$G(ACR(10))
 W ?40,"20. AIRPORT PARK: ",$G(ACR(20))
 W !,"   EXPLAIN OTHER EXPENSES: "
 S ACRX=$P(ACRTVDT,U,17)_U_$P(ACRTV1,U,1,3)
 D D1
 W !,"21.DETAIL DESCRIPTION: "
 S ACRX=ACR(21)
 D D1
 W !,"22.RENTAL CAR JUSTIFICATION: "
 S ACRX=ACR(22)
 D D1
 W !,"--------------------------------------------------------------------------------"
 Q
D1 ;
 S ACRX=$TR(ACRX,"^"," ")
 W !?5
 F ACRJ=1:1 S X=$P(ACRX," ",ACRJ) Q:$P(ACRX," ",ACRJ,99)=""  W:$X+$L(X)>78 !?5 W X," "
 Q
GATHER ;GATHER TRAVEL DAY INFO
 N X,Y
 S ACRTV0=$G(^ACRTV(ACRTVDA,0))
 S ACRTVDT=$G(^ACRTV(ACRTVDA,"DT"))
 S ACRTV1=$G(^ACRTV(ACRTVDA,1))
 S ACRTVDSC=$G(^ACRTV(ACRTVDA,"DESC"))
 S ACRTVRCJ=$G(^ACRTV(ACRTVDA,"RCJ"))
 S Y=$P(ACRTVDT,U)
 X ^DD("DD")
 S ACR(1)=$P(Y,",")
 S X=$P(ACRTV0,U,4)
 S X=$P($P($P(^DD(9002193.5,.04,0),U,3),(X_":"),2),";")
 S ACR(1)=ACR(1)_"-"_$E(X,1,15)
 S Y=$P(ACRTVDT,U,2)
 X ^DD("DD")
 S ACR(2)=$P(Y,"@",2)
 S (ACR(3),ACR(5))=""
 S (ACRDFR,X)=$P(ACRTVDT,U,18)
 I X D
 .S X=X_":"
 .S X=$P($P($P(^DD(9002193.5,2.5,0),U,3),X,2),";")
 .S ACR(3)=$S(ACR(2)]"":X,1:"")
 S Y=$P(ACRTVDT,U,3)
 X ^DD("DD")
 S ACR(4)=$P(Y,"@",2)
 S (ACRAAT,X)=$P(ACRTVDT,U,19)
 I X D
 .S X=X_":"
 .S X=$P($P($P(^DD(9002193.5,3.5,0),U,3),X,2),";")
 .S ACR(5)=X
 S X=$P(ACRTVDT,U,4)
 S ACR(6)=$E($P($G(^ACRPD(+X,0)),U),1,20)
 S ACR(7)=$P(ACRTVDT,U,7)
 S ACR(8)=$P(ACRTVDT,U,20)
 S ACR(9)=$P(ACRTVDT,U,9)
 S ACR(10)=$P(ACRTVDT,U,10)
 S X=$P(ACRTVDT,U,11)
 S ACR(11)=$E($P($G(^ACRHOTEL(+X,0)),U),1,20)
 S ACR(12)=$P(ACRTVDT,U,12)
 S X=$P(ACRTVDT,U,13),ACR(13)=$P($G(^ACRRCOMP(+X,0)),U)
 S ACR(14)=$P(ACRTVDT,U,14)
 S ACR(15)=$P(ACRTVDT,U,15)
 S ACR(16)=$TR($P(ACRTVDT,U,5,6),"^","/")
 S ACR(17)=$P(ACRTVDT,U,21)
 S ACR(18)=$P(ACRTVDT,U,23)
 S ACR(19)=$P(ACRTVDT,U,8)
 S ACR(20)=$P(ACRTVDT,U,22)
 S ACR(21)=ACRTVDSC
 S ACR(22)=ACRTVRCJ
 Q
FIELDS ;SET FIELDS TO BE EDITED
 S ACR("DR",1)="1T;.04T"
 S ACR("DR",2)="[ACR DEPART]"
 S ACR("DR",3)=2.5
 S ACR("DR",4)="[ACR ARRIVE]"
 S ACR("DR",5)=3.5
 S ACR("DR",6)=4
 S ACR("DR",7)="7T;7.5T;31T"
 S ACR("DR",8)=7.5
 S ACR("DR",9)=9
 S ACR("DR",10)="[ACR EXPLAIN OTHER EXPENSE]"
 S ACR("DR",11)=11
 S ACR("DR",12)=12
 S ACR("DR",13)="[ACR RENTAL CAR]"
 S ACR("DR",14)=14
 S ACR("DR",15)=15
 S ACR("DR",16)="5T;6T"
 S ACR("DR",17)=30
 S ACR("DR",18)=32
 S ACR("DR",19)="8T;29T"
 S ACR("DR",20)=31
 S ACR("DR",21)="[ACR DETAILED DESC]"
 S ACR("DR",22)="[ACR RENTAL CAR JUST]"
 Q