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

ACRFSS4.m

Go to the documentation of this file.
ACRFSS4 ;IHS/OIRM/DSD/THL,AEF - EDIT TRAVEL VOUCHER;  [ 01/31/2007  7:35 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**5,22**;NOV 05, 2001
 ;;CONTINUATION OF ACRFSS
EN N ACRY,ACRJ
 D EXITSS4^ACRFSSA
 F  D EN1 Q:$D(ACRQUIT)!$D(ACROUT)
 I '$D(ACRREV),'$D(ACRPRT),ACRREF=130,$P(^ACRDOC(ACRDOCDA,"TO"),U,19)="Y" D TA^ACRFSSA1
 I $D(ACRCHANG) S ACRSCHK="" D APPROVE^ACRFSCHK,PAUSE^ACRFWARN K ACRCHANG,ACRSCHK
EXIT D EXITSS4^ACRFSSA
 Q
EN1 D DISPLAY^ACRFSS42
 Q:$D(ACRQUIT)!$D(ACROUT)
 I $D(ACRPRT) S ACRQUIT="" Q
 I $D(ACRREV) D PAUSE^ACRFWARN S ACRQUIT="" Q
 N X,Y
 S (X,Y)=0
 F  S X=$O(^ACRSS("J",ACRDOCDA,X)) Q:'X  S Y=Y+$P($G(^ACRSS(X,"DT")),U,4)
 I Y,$G(ACRREF)'=600 D CHECK^ACRFWARN
 Q:$D(ACROUT)
 I Y,$$REQTP^ACRFSSU(ACRDOCDA)["CREDIT CARD" D   ;ACR*2.1*5.17
 .;I Y>2500 D CHECKCC^ACRFWARN(Y)                 ;ACR*2.1*5.17 ;ACR*2.1*22.06 IM23064
 .I Y>3000 D CHECKCC^ACRFWARN(Y)       ;ACR*2.1*22.06 IM23064
 Q:$D(ACROUT)   ;ACR*2.1*5.17
 S ACRFIRST=$P(^ACRDOC(ACRDOCDA,"TO"),U,14)
 S ACRLAST=$P(^ACRDOC(ACRDOCDA,"TO"),U,15)
 I $G(ACRJ)=0 D ADD^ACRFSS41 G EN1
 S DIR(0)="SO^1:Edit Travel Day;2:Add Travel Days;3:Delete Travel Days"
 S DIR("A")="Which Option ===> "
 D DIR^ACRFDIC
 Q:$D(ACROUT)
 I Y=1 D EDIT^ACRFSS41 K ACRQUIT Q
 I Y=2 D ADD^ACRFSS41 I $D(ACRQUIT)!$D(ACROUT) K ACRQUIT Q
 I Y=3 D DELETE^ACRFSS41 K ACRQUIT Q
 D CME
 I $P(^ACRDOC(ACRDOCDA,"TO"),U,22)=1 D ATM
 ;IF TRAVEL ADVANCE NOT REQUESTED DELETE ANY TA AMOUNT AND OTA ENTRY
 I '$D(ACRREV),'$D(ACRPRT),$P(^ACRDOC(ACRDOCDA,"TO"),U,19)'="Y" D
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR="130160///@"
 .W !
 .D DIE^ACRFDIC
 .S DA=ACRDOCDA
 .S DIK="^ACROTA("
 .D DIK^ACRFDIC
 I $D(^ACRAL("E",ACRDOCDA)) S ACRQUIT="" Q
 S DIR(0)="YO"
 S DIR("A")="Add/Edit FLIGHT INFO"
 S DIR("B")="NO"
 W !
 D DIR^ACRFDIC
 I Y'=1 S ACRQUIT=""
 E  D ^ACRFSS5
 Q
ATM ;CALCULATE ATM SERVICE CHARGE
 Q:$P(^ACRDOC(ACRDOCDA,"TO"),U,22)'=1
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR="130177Amount of ATM advance "_$S(ACRREF=600:"taken....",1:"requested")
 W !
 D DIE^ACRFDIC
 I ACRREF'=600,$D(ACRATM),$P($G(^ACROBL(ACRDOCDA,"APV")),U)'="A" D
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR="130158////"_ACRATM
 .D DIE^ACRFDIC
 S ACR4P=$P(^ACRDOC(ACRDOCDA,"TO"),U,26)
 S ACR4P=$FN(ACR4P,"P",2)
 S ACR4P=$TR(ACR4P," ","")
 Q
DEPART ;EP;TO INDICATE IF THIS IS THE DEPART DATE
 Q:'$D(^ACRTV(+$G(DA),"DT"))!'$D(^ACRTV(+$G(DA),0))
 N Y
 S Y=^ACRTV(DA,"DT")
 S ACRDFR=$P(Y,U,18)
 S ACRAAT=$P(Y,U,19)
 I ACRYN="LEAVE",$P(Y,U,2)]"" S ACRYN=1 Q
 I ACRYN="ARRIVE",$P(Y,U,3)]"" S ACRYN=1 Q
 S Y=$P(Y,U)
 W !!,$S(Y<(DT+1):"Did",1:"Will")," you "
 X ^DD("DD")
 W:ACRYN="LEAVE" "DEPART FROM"
 W:ACRYN="ARRIVE" "ARRIVE BACK AT"
 W " your home or permanent duty station"
 W !,"on ",Y
 N %
 S %=2
 D YN^DICN
 S ACRYN=%
 W !
 Q
TAXI ;EP;TO ENTER THE ROUNDTRIP TAXI FARE FROM HOME TO AIRPORT
 N DA
 S DA=$P($G(^ACRDOC(ACRDOCDA,"TO")),U,9)
 S DIE="^ACRAU("
 S DR="9ROUNDTRIP taxi fare"
 Q:'DA
 Q:$P($G(^ACRAU(DA,1)),U,9)
 W !!,"Enter the average ROUNDTRIP taxi fare from the traveler's home"
 W !,"to the nearest airport"
 W !
 D:DA DIE^ACRFDIC
 Q
RECEIPTS ;EP;TO DETERMINE IF RECEIPTS ARE REQUIRED FOR PROCESSING THIS
 ;TRAVEL VOUCHER
 W !!,"Are RECEIPTS required"
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR=".28in order to process this voucher"_$S($P(^ACRDOC(ACRDOCDA,0),U,28)=0:"//NO",1:"//YES")
 D DIE^ACRFDIC
 Q
CME ;INDICATE MAXIMUM AMOUNT FOR CONTINUING EDUCATION
 W !!,"(For Continuing Education Travel/Training ONLY"
 W !," enter MAXIMUM government contribution.)"
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR="148370Cost to government Not to Exceed"
 W !
 D DIE^ACRFDIC
 Q