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

ACRFSS44.m

Go to the documentation of this file.
ACRFSS44 ;IHS/OIRM/DSD/THL,AEF - EDIT TRAVEL VOUCHER - CONT; [ 05/10/2005  12:34 PM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**17**;NOV 05, 2001
 ;;CONTINUATION OF ACRFSS42
DP1 ;EP;
 N ACRTXEX
 ;S ACRTV=ACRTVDA_U_^ACRTV(ACRTVDA,0)       ; ACR*2.1*17.04  IM17076
 ;S ACRTV1=^ACRTV(ACRTVDA,"DT")             ; ACR*2.1*17.04  IM17076
 ;S ACRTVDAY=+^ACRTV(ACRTVDA,0)             ; ACR*2.1*17.04  IM17076
 S ACRTV=ACRTVDA_U_$G(^ACRTV(ACRTVDA,0))    ; ACR*2.1*17.04  IM17076
 S ACRTV1=$G(^ACRTV(ACRTVDA,"DT"))          ; ACR*2.1*17.04  IM17076
 S ACRTVDAY=+$G(^ACRTV(ACRTVDA,0))          ; ACR*2.1*17.04  IM17076
 S ACRDESC=$G(^ACRTV(ACRTVDA,"DESC"))
 S X=$G(^ACRTV(ACRTVDA,1))
 S ACRTXEX=$P(X,U,4)
 S X=$P(X,U,1,3)
 S X=$TR(X,U," ")
 S ACRTVEP=X
 I ACRTVDAY'=ACRJ D
 .S DA=ACRTVDA
 .S DIE="^ACRTV("
 .S DR=".01///"_ACRJ
 .D DIE^ACRFDIC
 S ^TMP("ACRTV",$J,ACRJ)=ACRTV
 S ACRTVDAT=$E($P($P(ACRTV1,U),","),4,7)
 S Y=$P(ACRTV1,U,2)
 X ^DD("DD")
 S ACRTVLV=$P(Y,"@",2)
 S ACRTVLV=$P(ACRTVLV,":")_$P(ACRTVLV,":",2)
 S Y=$P(ACRTV1,U,3)
 X ^DD("DD")
 S ACRTVAR=$P(Y,"@",2)
 S ACRTVAR=$P(ACRTVAR,":")_$P(ACRTVAR,":",2)
 S ACRTVCIT=$S('$P(ACRTV1,U,4):"NOT SPECIFIED",'$D(^ACRPD($P(ACRTV1,U,4),0)):"NOT SPECIFIED",1:$E($P(^ACRPD($P(ACRTV1,U,4),0),U),1,7))
 S ACRTVPD=$P(ACRTV1,U,5)
 S:$P(ACRTV1,U,20)>0 ACRMRR=$P(ACRTV1,U,20)
 I $P(ACRTV1,U,23)>0 D
 .S ACRPMRR=$P(ACRTV1,U,23)
 .S ACRAIRP=$P(ACRTV1,U,22)
 S ACRTVLDG=$P(ACRTV1,U,6)
 S ACRTVMLS=$P(ACRTV1,U,7)
 S ACRTVPML=$P(ACRTV1,U,21)
 S ACRTVMR=ACRTVMLS*ACRMRR+(ACRTVPML*ACRPMRR)
 S ACRTVTAX=$P(ACRTV1,U,8)
 S ACRTVPHN=$P(ACRTV1,U,9)
 S ACRTVOTH=$P(ACRTV1,U,10)
 S ACRTVEXP=$P(ACRTV1,U,17)
 S ACRTVRC=$P(ACRTV1,U,15)
 S:ACRTVEP]"" ACRTVEXP=ACRTVEXP_" "_ACRTVEP
 S ACRTVRCC=$P(ACRTV1,U,13)
 I ACRTVRCC,$D(^ACRRCOMP(ACRTVRCC,0)) S ACRTVRCC=$P(^(0),U)
 W !,ACRJ
 W ?3,ACRTVDAT
 W ?8,ACRTVLV
 W ?13,ACRTVAR
 W ?18,ACRTVCIT
 W ?26,$J($FN(ACRTVPD,"P",2),8)
 W ?36,$J($FN(ACRTVLDG,"P",2),8)
 I ACRTVMLS]"" W ?46,$J(ACRTVMLS,3),"*",ACRMRR
 E  I ACRTVPML]"" W ?46,$J(ACRTVPML,3),"*",ACRPMRR
 W ?54,$J($FN(ACRTVTAX,"P",2),7)
 W ?63,$J($FN(ACRTVPHN,"P",2),7)
 W ?72,$J($FN(ACRTVOTH,"P",2),7)
 I ACRTVMLS]"",ACRTVPML]"" W !?46,$J(ACRTVPML,3),"*",ACRPMRR
 I ACRDESC]"" D
 .W !?3
 .N ACRI
 .S ACRDESC=$TR(ACRDESC,U," ")
 .F ACRI=1:1 W $P(ACRDESC," ",ACRI)," " W:$L($P(ACRDESC," ",ACRI+1))+$X>75 !?3 Q:$P(ACRDESC," ",ACRI+1,99)=""
 I $P(ACRTV,U,5)>1!(($P(ACRTV,U,5)>0)&(+ACRTV1<$P(^ACRDOC(ACRDOCDA,"TO"),U,14)!(+ACRTV1>$P(^("TO"),U,15)))) D
 .W !?3,"TRAVEL STATUS:  ",$P($P($P(^DD(9002193.5,.04,0),U,3),$P(ACRTV,U,5)_":",2),";")
 I $P(ACRTV1,U,18)>0 D
 .W !?3,"DEPART FROM:  ",$P($P($P(^DD(9002193.5,2.5,0),U,3),$P(ACRTV1,U,18)_":",2),";")
 I $P(ACRTV1,U,19)>0 D
 .W !?3,"RETURN TO:  ",$P($P($P(^DD(9002193.5,3.5,0),U,3),$P(ACRTV1,U,19)_":",2),";")
 I $P(ACRTV1,U,22)>0 D
 .W !?3,"AIRPORT PARKING:  "
 .W ?72,$J($FN($P(ACRTV1,U,22),"P",2),7)
 K ACRDESC
 I ACRTVEXP]"" D
 .N ACRI,X
 .S X=ACRTVEXP
 .F ACRI=1:1 S ACRX=$E(ACRTVEXP,ACRI) Q:ACRX=""!(ACRX?1AN)  I ACRX'?1AN S X=$E(ACRTVEXP,ACRI+1,99999)
 .S ACRTVEXP=X
 .Q:X=""
 .W !?3,"OTHER EXPENSE: "
 .F ACRI=1:1 Q:$P(ACRTVEXP," ",ACRI,99)=""  D
 ..W $P(ACRTVEXP," ",ACRI)," "
 ..W:$L($P(ACRTVEXP," ",ACRI+1))+$X>75 !?18
 I ACRTXEX]"" D
 .W !?3,"EXPLAIN TAXI: ",ACRTXEX
 I ACRTVRCC]"" D
 .W !?3,"RENTAL CAR COMPANY:  ",ACRTVRCC
 .W ?45,"EXPENSE:"
 .W ?53,$J($FN(ACRTVRC,"P,",2),7)
 I $P(ACRTV1,U,11),$G(ACRHOT)'=$P(ACRTV1,U,11) D
 .S ACRHOT=$P(ACRTV1,U,11)
 .Q:'ACRHOT
 .N X,Y
 .S X=$G(^ACRHOTEL(ACRHOT,0))
 .S Y=$P(X,U,2)
 .S X=$P(X,U)
 .W !?3
 .I Y="U"!(Y="") S Y="U" W "UNKNOW WHETHER "
 .W X," "
 .W $S(Y=0:"DOES NOT MEET",1:"MEETS")
 .W " GSA FIRE SAFETY CODES."
 I $E($G(IOST),1,2)="C-",IOSL-8<$Y D
 .S DIR(0)="YO"
 .S DIR("A")="Display Remaining Days"
 .S DIR("B")="YES"
 .W !
 .D DIR^ACRFDIC
 .S:Y'=1 ACRQUIT=""
 .K ACROUT
 .D:'$D(ACRQUIT) HEADSS4^ACRFSSD1
 I $E($G(IOST),1,2)="P-",IOSL-4<$Y W @IOF D HEADSS4^ACRFSSD1
 Q