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

ACRFTV.m

Go to the documentation of this file.
ACRFTV ;IHS/OIRM/DSD/THL,AEF - TRAVEL REPORT;   [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;ROUTINE TO PRINT TRAVEL REPORT
EN F  D SELECT Q:$D(ACRQUIT)!$D(ACROUT)
EXIT ;EP
 K ACR,ACR1,ACR2,ACR3,ACR4,ACR5,ACR6,ACR0,ACROBJ,ACROBJ0,ACRDTAIL,ACRDOC,ACRDOC0,ACRREQ2,ACRTVT,ACRDTL1,ACRBOTH,ACRZZDA,ACRZDA,ACRY,ACRAAT,ACRAPT,ACRDAYS,ACRDFR,ACREMP,ACRENTR1,ACRENTR2,ACRENTRY,ACREXPL,ACRFR,ACRJ,ACRJI,ACRNUM,ACRQUIT
 K ACRRCJ,ACRRTN,ACRSOF,ACRSOFT,ACRSOFX,ACRTM,ACRTO,ACRTVDA,ACRTYPS,ACRBEGIN,ACREND,ACRTRAV,ACR7,ACR9,ACRALWDA,ACRDEPT,ACROCDA,ACRDT,ACRFY,ACRI,ACROBL,ACRREF,ACRREQ,ACRSPENT,ACRSPT,ACRSSA,ACRSSADA,ACRDOCDA,ACRX,ACR11,ACRREQT,ACROBLT,ACRSPTT
 K ACRPURP,ACRINCMP,ACRSIGS,ACRSIGT,ACRBEG,ACRLOC,ACRTV0,ACRTVDT,ACROUT,ACR12,ACR13,ACR14,ACRCAN,ACR21,ACRPD,ACRTVTX,ACRXREF,ACRDPTDA,ACRPAGE
 K ^TMP("ACRTV",$J)
 Q
SELECT D ^XBKVAR S IOP="HOME" D ^%ZIS D HOME^ACRFMENU
 D EXIT
 W @IOF
 W !?10,"Travel Report"
 S DIR(0)="SO^1:Purchasing Office;2:Department;3:Department Account;4:Common Accounting Number;5:Sub-Allowance;6:Allowance;7:Individual Traveler;8:TDY Duty Station;9:Rental Car Used;10:Actual Expenses Claimed;11:Non-Contract Carrier Used"
 S DIR("A")="Which type of report"
 D DIR^ACRFDIC
 I $D(ACRQUIT)!$D(ACROUT)!("11023456789"'[+Y) Q
 S ACRTVT=$S(Y=1:"PO",Y=2:"TDEPT",Y=3:"F",Y=4:"CAN",Y=5:"G",Y=6:"H",Y=7:"D",Y=8:"LOC",Y=9:"RC",Y=10:"AE",Y=11:"NCC",1:"")
 Q:ACRTVT=""
 I ACRTVT="CAN" D CAN^ACRFTV1 Q:$D(ACRQUIT)!$D(ACROUT)  G ZIS
 I ACRTVT="TDEPT"!(ACRTVT="PO") D DEPT^ACRFTV1 Q:$D(ACRQUIT)!$D(ACROUT)  G ZIS
 I ACRTVT="LOC" D LOCATION Q:$D(ACRQUIT)!$D(ACROUT)  G ZIS
 I "^RC^AE^NCC^"[(U_ACRTVT_U) G ZIS
 S ACRENTR1=$S(ACRTVT="F":"LOCBAMT",ACRTVT="G":"ALCAMT",ACRTVT="H":"ALLAMT",1:"")
 S ACRENTRY=$S(ACRTVT="F":"ALCAMT",ACRTVT="G":"ALLAMT",ACRTVT="H":"APPAMT",1:""),(ACRSOF,ACRSOFX,ACRSOFT)=""
 I ACRTVT'="D" D ENTRY^ACRFDTP I '$D(ACRZDA) K ACRQUIT Q
 I ACRTVT="F" D C1^ACRFTV1 Q:$D(ACRQUIT)!$D(ACROUT)
 I ACRTVT="D" D TRAVELER Q:$L(ACRTRAV)<2
ZIS D DETAIL
 I $D(ACRQUIT)!$D(ACROUT) K ACRQUIT Q
 D INCOMP
 Q:$D(ACRQUIT)!$D(ACROUT)
 D:$D(ACRDTAIL) SIGS
 Q:$D(ACRQUIT)!$D(ACROUT)
 D INVITE:ACRTVT'="D"
 Q:$D(ACROUT)!$D(ACRQUIT)
 W !
 D DATES^ACRFDATE
 Q:$D(ACROUT)!$D(ACRQUIT)!'$G(ACRBEGIN)!'$G(ACREND)
 S ACRRTN="SS^ACRFTV2"
 S ZTDESC="TRAVEL REPORT"
 D ^ACRFZIS
 K ACRQUIT
 Q
DETAIL ;EP;
 K ACRDTAIL,ACRBOTH,ACRDTL1
 S DIR(0)="SO^1:Summary;2:Detailed Report;3:Both"
 S DIR("A")="Which one"
 W !
 D DIR^ACRFDIC
 I $D(ACRQUIT)!$D(ACROUT) Q
 I Y=1 K ACRDTAIL
 E  S ACRDTAIL=""
 I Y=3 S ACRBOTH=""
 S DIR(0)="YO"
 S DIR("A")="List by Object Code"
 S DIR("B")="NO"
 W !
 D DIR^ACRFDIC
 Q:$D(ACROUT)!$D(ACRQUIT)
 S ACRDTL1=+Y
 Q
TRAVELER ;EP;TO SELECT AND PRINT TRAVEL REPORT FOR INDIVIDUAL TRAVELER
 S ACRTRAV=U
 F ACRJ=1:1 D TRAV1 Q:$D(ACRQUIT)
 K ACRQUIT
 Q
TRAV1 S DIC="^VA(200,"
 S DIC(0)="AEMQZ"
 S DIC("A")=$S(ACRJ=1:"Traveler's Name: ",1:"Select another Traveler: ")
 W !
 D DIC^ACRFDIC
 I '$D(Y) S ACRQUIT="" Q
 I +Y<1 S ACRQUIT="" Q
 S ACRTRAV=ACRTRAV_+Y_U
 Q
LOCATION ;SELECT TRAVEL LOCATION
 S DIC="^ACRPD("
 S DIC(0)="AEMQZ"
 S DIC("A")="Select TDY Location: "
 W !
 D DIC^ACRFDIC
 I '$D(Y) S ACRQUIT="" Q
 I +$G(Y)<1 S ACRQUIT="" Q
 S ACRLOC=+Y
 Q
INCOMP ;EP;TO PRINT LIST OF TO'S FOR WHCIH TV IS NOT COMPLETE
 S DIR(0)="YO"
 S DIR("A",1)="Include ONLY Travel Orders"
 S DIR("A")="for which the Travel Voucher is not complete"
 S DIR("B")="NO"
 W !
 D DIR^ACRFDIC
 S:$G(ACRY)=1 ACRINCMP=""
 Q
SIGS ;EP;TO PRINT SIGNATURE DETAILS FOR TRAVEL VOUCHER
 S DIR(0)="YO"
 S DIR("A")="Include SIGNATURE DETAILS"
 S DIR("B")="NO"
 S DIR("?",1)="If you select 'Y' for YES, the dates of Travel Voucher signatures"
 S DIR("?")="and days between signatures will be included."
 W !
 D DIR^ACRFDIC
 S:$G(ACRY)=1 ACRSIGS=""
 Q
SIGT ;EP;TO PRINT SIGNATURE TOTAL SUMMARY
 W !!,"AVERAGE NUMBER OF DAYS TO PROCESS TRAVEL VOUCHERS"
 W !,"BY TYPE OF SIGNATRUE:"
 F ACRI=1:1:6 D
 .S ACR=$G(ACRSIGT(ACRI)),ACRD=$P(ACR,U,2),ACR=+ACR
 .W:ACRI=1 !?7,"TO TRAVELER..: "
 .W:ACRI=2 !?7,"TRAVELER SIG.: "
 .I ACRD]"" D
 ..W:ACRI=3 !?7,"RECOMMEND SIG: "
 ..W:ACRI=4 !?7,"APPROVER SIG.: "
 .W:ACRI=5 !?7,"AUDITOR SIG..: "
 .W:ACRI=6 !?7,"CERTIFIER SIG: "
 .I ACR,ACRD/ACR>0 W $J($FN(ACRD/ACR,"P",0),5)
 Q
INVITE ;SELECT REPORT FOR TRAVELERS FROM OUTSIDE THE AREA ONLY
 S DIR(0)="YO"
 S DIR("A")="Report for OUTSIDE travelers ONLY"
 S DIR("B")="NO"
 W !
 D DIR^ACRFDIC
 K ACRINVIT
 Q:+Y'=1
 S ACRINVIT=""
 I '$O(^ACRSYS(1)) S ACRADA=1 Q
AREA ;EP;
 S DIC="^ACRSYS("
 S DIC(0)="AEMQZ"
 S DIC("A")="Report for which AREA: "
 W !
 D DIC^ACRFDIC
 I +Y>0 S ACRADA=+Y
 E  S ACRQUIT=""
 Q