ACRFEAL ;IHS/OIRM/DSD/THL,AEF - EDIT AIRLINE FLIGHT; [ 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,ACRAL0,ACRAL1,ACRALDT,ACRFLDS,ACRY,ACR
Q
EN1 ;
D DISP
S DIR(0)="LO^1:11"
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=ACRDA
S DIE="^ACRAL("
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,"AIRLINE FLIGHT INFORMATION",@ACROF
W !,"1. DATE ISSUED.: ",$G(ACR(1))
W !,"2. AIRLINE COMP: ",$G(ACR(2))
W !,"3. CONTRCT FARE: ",$G(ACR(3))
W !,"4. FLIGHT COST.: ",$G(ACR(4))
W !,"5. GTR NO......: ",$G(ACR(5))
W !,"6. FLIGHT NO...: ",$G(ACR(6))
W !,"7. DEPART TIME.: ",$G(ACR(7))
W !,"8. DEPART FROM.: ",$G(ACR(8))
W !,"9. ARRIVE TIME.: ",$G(ACR(9))
W !,"10.ARRIVE IN...: ",$G(ACR(10))
W !,"11.SEAT ASSIGN.: ",$G(ACR(11))
W !,"--------------------------------------------------------------------------------"
Q
GATHER ;GATHER TRAVEL DAY INFO
S ACRAL0=$G(^ACRAL(ACRDA,0))
S ACRALDT=$G(^ACRAL(ACRDA,"DT"))
S Y=$P(ACRALDT,U)
X ^DD("DD")
S ACR(1)=Y
S ACR(2)=$P($G(^ACRACOMP(+$P(ACRALDT,U,2),0)),U)
S ACR(3)=$P(ACRALDT,U,11)
S ACR(4)=$FN($P(ACRALDT,U,9),"P,",2)
S ACR(5)=$P(ACRALDT,U,10)
S ACR(6)=$P(ACRALDT,U,3)
S Y=$P(ACRALDT,U,4)
X ^DD("DD")
S ACR(7)=Y
S ACR(8)=$P(ACRALDT,U,5)
I ACR(8) S ACR(8)=$P($G(^ACRPD(ACR(8),0)),U)
S Y=$P(ACRALDT,U,6)
X ^DD("DD")
S ACR(9)=Y
S ACR(10)=$P(ACRALDT,U,7)
I ACR(10) S ACR(10)=$P($G(^ACRPD(ACR(10),0)),U)
S ACR(11)=$P(ACRALDT,U,8)
Q
FIELDS ;SET FIELDS TO BE EDITED
S ACR("DR",1)=1
S ACR("DR",2)=2
S ACR("DR",3)=11
S ACR("DR",4)=9
S ACR("DR",5)=10
S ACR("DR",6)=3
S ACR("DR",7)=4
S ACR("DR",8)=5
S ACR("DR",9)=6
S ACR("DR",10)=7
S ACR("DR",11)=8
Q
ACRFEAL ;IHS/OIRM/DSD/THL,AEF - EDIT AIRLINE FLIGHT; [ 11/01/2001 9:44 AM ]
+1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
+2 ;;ROUTINE TO ALLOW EDIT OF TRAVEL DAYS
EN DO FIELDS
+1 FOR
DO EN1
IF $DATA(ACRQUIT)
QUIT
EXIT KILL ACRX,ACRAL0,ACRAL1,ACRALDT,ACRFLDS,ACRY,ACR
+1 QUIT
EN1 ;
+1 DO DISP
+2 SET DIR(0)="LO^1:11"
+3 SET DIR("A")=" Edit which fields"
+4 DO DIR^ACRFDIC
+5 IF +Y<1
SET ACRQUIT=""
QUIT
+6 SET ACRFLDS=ACRY
+7 WRITE !
+8 FOR J=1:1
SET ACRX=$PIECE(ACRFLDS,",",J)
IF ACRX=""
QUIT
DO DIE
+9 QUIT
DIE ;
+1 SET DA=ACRDA
+2 SET DIE="^ACRAL("
+3 SET DR=ACR("DR",ACRX)
+4 IF $EXTRACT(DR)'="["
IF DR'["T"
SET DR=DR_"T"
+5 DO DIE^ACRFDIC
+6 QUIT
DISP ;DISPLAY TRAVEL DAY INFO
+1 DO GATHER
+2 WRITE @IOF
+3 WRITE !?17,@ACRON,"AIRLINE FLIGHT INFORMATION",@ACROF
+4 WRITE !,"1. DATE ISSUED.: ",$GET(ACR(1))
+5 WRITE !,"2. AIRLINE COMP: ",$GET(ACR(2))
+6 WRITE !,"3. CONTRCT FARE: ",$GET(ACR(3))
+7 WRITE !,"4. FLIGHT COST.: ",$GET(ACR(4))
+8 WRITE !,"5. GTR NO......: ",$GET(ACR(5))
+9 WRITE !,"6. FLIGHT NO...: ",$GET(ACR(6))
+10 WRITE !,"7. DEPART TIME.: ",$GET(ACR(7))
+11 WRITE !,"8. DEPART FROM.: ",$GET(ACR(8))
+12 WRITE !,"9. ARRIVE TIME.: ",$GET(ACR(9))
+13 WRITE !,"10.ARRIVE IN...: ",$GET(ACR(10))
+14 WRITE !,"11.SEAT ASSIGN.: ",$GET(ACR(11))
+15 WRITE !,"--------------------------------------------------------------------------------"
+16 QUIT
GATHER ;GATHER TRAVEL DAY INFO
+1 SET ACRAL0=$GET(^ACRAL(ACRDA,0))
+2 SET ACRALDT=$GET(^ACRAL(ACRDA,"DT"))
+3 SET Y=$PIECE(ACRALDT,U)
+4 XECUTE ^DD("DD")
+5 SET ACR(1)=Y
+6 SET ACR(2)=$PIECE($GET(^ACRACOMP(+$PIECE(ACRALDT,U,2),0)),U)
+7 SET ACR(3)=$PIECE(ACRALDT,U,11)
+8 SET ACR(4)=$FNUMBER($PIECE(ACRALDT,U,9),"P,",2)
+9 SET ACR(5)=$PIECE(ACRALDT,U,10)
+10 SET ACR(6)=$PIECE(ACRALDT,U,3)
+11 SET Y=$PIECE(ACRALDT,U,4)
+12 XECUTE ^DD("DD")
+13 SET ACR(7)=Y
+14 SET ACR(8)=$PIECE(ACRALDT,U,5)
+15 IF ACR(8)
SET ACR(8)=$PIECE($GET(^ACRPD(ACR(8),0)),U)
+16 SET Y=$PIECE(ACRALDT,U,6)
+17 XECUTE ^DD("DD")
+18 SET ACR(9)=Y
+19 SET ACR(10)=$PIECE(ACRALDT,U,7)
+20 IF ACR(10)
SET ACR(10)=$PIECE($GET(^ACRPD(ACR(10),0)),U)
+21 SET ACR(11)=$PIECE(ACRALDT,U,8)
+22 QUIT
FIELDS ;SET FIELDS TO BE EDITED
+1 SET ACR("DR",1)=1
+2 SET ACR("DR",2)=2
+3 SET ACR("DR",3)=11
+4 SET ACR("DR",4)=9
+5 SET ACR("DR",5)=10
+6 SET ACR("DR",6)=3
+7 SET ACR("DR",7)=4
+8 SET ACR("DR",8)=5
+9 SET ACR("DR",9)=6
+10 SET ACR("DR",10)=7
+11 SET ACR("DR",11)=8
+12 QUIT