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

ACRFDTP2.m

Go to the documentation of this file.
ACRFDTP2 ;IHS/OIRM/DSD/THL,AEF - SET VARIABLES AND DISPLAY FINANCIAL DATA-ROUTINE 2;  [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;CONTINUATION OF ACRFDTP
 ;;SET VARIABLES AND DISPLAY FINANCIAL DATA
EN ;EP;
 Q:$D(ACRTRN)
 S ACRFDNY=ACRY
 S (ACRFD,ACRDISDA,ACRFDNDA)=DA
 S ACRFDX=@ACRGREF@(DA,0)
 S ACRFTOT=$P(ACRFDX,U,10)
 S ACRFDX=$P(ACRFDX,U)
 D TOT^ACRFDTP5
 ;;ACRFD=DFN OF THE ENTRY
 ;;ACRDISDA      "
 ;;ACRFDNDA      "
 ;;ACRFDX=TOTAL IN THE DISTRIBUTION
 ;;ACRGREF=GLOBAL NODE OF FUNDS SELECTED
 ;;ACRFTOT=TOTAL DISTRIBUTED
 D AMEND^ACRFDTP5
 S ACRFDNAM=ACRFDX
 S ACRFDNDD=ACRFDX-ACRFTOT
 ;;ACRFDNAM=TOTAL IN THE DISTRIBUTION
 ;;ACRDNDD=UNDISTRIBUTED FUNDS
 S ACRFDNPD=$P($S(ACRFDX>0:ACRFTOT/ACRFDX*100,ACRFTOT>0:100,1:0),".")
 S:ACRFDNPD<0 ACRFDNPD=0
 S ACRFDNPD=ACRFDNPD_"%"
 ;;ACRFDNPD=PERCENT OF DISTRIBUTED
 S ACRFRM=$P($S(ACRFDX>0:((ACRFDX-ACRFTOT)/ACRFDX)*100,ACRFDX>0:100,1:0),".")
 S:ACRFRM<0 ACRFRM=0
 S ACRFRM=ACRFRM_"%"
 ;;ACRFRM=PERCENT OF REMAINING
 S ACRFDNDT=$G(@ACRGREF@(DA,"DT"))
 ;;ACRFDNDT=VARIALBE CONTAINING ADDITIONAL INFO ON THE DISTRIBUTION
 S ACRFDNFY=$S($P(ACRFDNDT,U)]"":$P(ACRFDNDT,U),1:"")
 S ACRFDNQ=$S($P(ACRFDNDT,U,2)]"":$P(ACRFDNDT,U,2),1:"")
 S ACRFDNRC=$S($P(ACRFDNDT,U,3)]"":$P(ACRFDNDT,U,3),1:"")
 ;;ACRFDNFY=FISCAL YEAR
 ;;ACRFDNQ=QUARTER
 ;;ACRFDNRC=RECURRING OR NON-RECURRING
 S:ACRFDNRC]"" ACRFDNRC=$S($E(ACRFDNRC)="R":"RECURRING",1:"NON-RECRNG")
 S ACRAPPDA=$S($P(ACRFDNDT,U,4)]"":$P(ACRFDNDT,U,4),1:"")
 ;;ACRAPPDA=DFN OF THE APPROPRIATION
 S:ACRAPPDA]"" ACRFDNAP=$P(^AUTTPRO(ACRAPPDA,0),U)
 ;;ACRFDNAP=APPROPRIATION NUMBER
 I ACRENTR1'["APP" D  I 1
 .S ACRALWDA=$S($P(ACRFDNDT,U,5)]"":$P(ACRFDNDT,U,5),1:"")
 .S:ACRALWDA ACRFDNAL=$P(^AUTTALLW(ACRALWDA,0),U)
 E  S ACRFDNAL=""
 ;;ACRALWDA=DFN OF THE ALLOWANCE
 ;;ACRFDNAL=ALLOWANCE NUMBER
 I ACRENTR1'["APP"&(ACRENTR1'["ALW") D  I 1
 .S ACRSSADA=$S($P(ACRFDNDT,U,8)]"":$P(ACRFDNDT,U,8),1:"")
 .S:ACRSSADA ACRFDNSA=$P(^AUTTSSA(ACRSSADA,0),U)
 E  S ACRFDNSA=""
 ;;ACRSSADA=DFN OF THE SUB-SUB-ACTIVITY
 ;;ACRFDNSA=SUB-SUB-ACTIVITY
 I ACRENTR1'["APP"&(ACRENTR1'["ALW") D  I 1
 .S ACRFDNCA=$S($P(ACRFDNDT,U,9)]"":$P(ACRFDNDT,U,9),1:"")
 .I ACRFDNCA D
 ..S ACRFDNCA=$P(^AUTTCAN(ACRFDNCA,0),U)
 ..S ACRLCODE=$E(ACRFDNCA,4,5)
 E  S ACRFDNCA=""
 ;;ACRFDNCA=CAN NUMBER
 I $D(@ACRGREF@(DA,"BA")) S ACRFDNAC=@ACRGREF@(DA,"BA")
 E  S ACRFDNAC="0^0^0"
 ;;ACRFDNAC=VARIABLE CONTAINS SUMMARY OF FUNDS BALANCE
 S ACRFDNRQ=$S($P(ACRFDNAC,U,2)]"":$P(ACRFDNAC,U,2),1:0)
 ;;ACRFDNRQ=TOTAL REQUESTED
 S ACRFDNSP=$S($P(ACRFDNAC,U,3)]"":$P(ACRFDNAC,U,3),1:0)
 ;;ACRFDNSP=TOTAL SPENT
 S ACRFDNOB=$S($P(ACRFDNAC,U,5)]"":$P(ACRFDNAC,U,5),1:0)
 ;;ACRFDNOB=TOTAL OBLIGATED
 S ACRFDNBA=ACRFDX-ACRFDNSP
 S ACRFDNUR=ACRFDX-ACRFDNRQ
 S ACRFDNUO=ACRFDX-ACRFDNOB
 ;;ACRFDNBA=TOTAL IN ACCOUNT-TOTAL SPENT
 ;;ACRFDNUR=TOTAL IN ACCOUNT-TOTAL UNREQUESTED
 ;;ACRFDNUO=TOTAL IN ACCOUNT-TOTAL OBLIGATED
 D EOY^ACRFEOY
 S ACRYRM=ACRYRM_"%"
 ;;ACRYRM=PERCENT OF CURRENT FISCAL YEAR REMAINING
 Q
SUBHEAD ;EP;TO DISPLAY FINANCIAL DATA
 I $D(ACRDISDA) D  Q
 .S DA=ACRDISDA
 .N ACRGREF,ACRY
 .D SET
 .D EN
 .D SUBHEAD1
SUBHEAD1 I $D(ACRNODIS) K ACRNODIS Q
 ;;ACRNODIS CONTROLS DISPLAY OR NO DISPLAY OF DISTRIBUTION
 W !!?10,"Selected ",ACRFDNY
 W ?$X+3,"(Number ",@ACRON,ACRFDNDA,@ACROF,")"
 I $D(ACRFD0),$P(ACRFD0,U,12)]"" W ?$X+2,$P(ACRFD0,U,12)
SUBSET ;EP;
 S ACRFDNQT=$S(ACRFDNQ=1:"  FIRST",ACRFDNQ=2:" SECOND",ACRFDNQ=3:"  THIRD",1:" FOURTH")
 ;;ACRFDQT=FISCAL YEAR QUARTER
 ;;THE NEXT SET OF VARIABLES (ACR0-ACR17) ARE USED FOR DISPLAY OF
 ;;DISTRIBUTION
 S ACR0="!,""ALLOWANCE:"",@ACRON,$J($FN(ACRFDX,""P"",0),11),@ACROF"
 S ACR14="!,""% UNCOMTD:"",@ACRON,$J(ACRFRM,11),@ACROF"
 S ACR141="?$X+1,""% DSTBD:"",@ACRON,$J(ACRFDNPD,11),@ACROF"
 S ACR15="?$X+1,""%FY RMG:"",@ACRON,$J(ACRYRM,11),@ACROF"
 S ACR1="?$X+1,""DISTRBD:"",@ACRON,$J($FN(ACRFTOT,""P"",0),11),@ACROF"
 S ACR2="!,""COMMITTED:"",@ACRON,$J($FN(ACRFDNRQ,""P"",0),11),@ACROF"
 S ACR16="?$X+1,""OBLGATD:"",@ACRON,$J($FN(ACRFDNOB,""P"",0),11),@ACROF"
 S ACR3="?$X+1,""  SPENT:"",@ACRON,$J($FN(ACRFDNSP,""P"",0),11),@ACROF"
 S ACR4="?$X+1,""UNDSTRD:"",@ACRON,$J($FN(ACRFDNDD,""P"",0),11),@ACROF"
 S ACR5="!,""UNCOMMTTD:"",@ACRON,$J($FN(ACRFDNUR,""P"",0),11),@ACROF"
 S ACR17="?$X+1,""UNOBLTD:"",@ACRON,$J($FN(ACRFDNUO,""P"",0),11),@ACROF"
 S ACR6="?$X+1,""UNSPENT:"",@ACRON,$J($FN(ACRFDNBA,""P"",0),11),@ACROF"
 S ACR8="!?2,""QUARTER:"",@ACRON,$J(ACRFDNQT,11),@ACROF"
 S ACR9="?$X+1,$J(""FY:"",8),@ACRON,$J(ACRFDNFY,11),@ACROF"
 S ACR10="?$X+1,$J(""RECURRG:"",8),@ACRON,$J(ACRFDNRC,11),@ACROF"
 I $G(ACRFDNAP)]"" S ACR11="!,""APPROP NO:"",@ACRON,$J(ACRFDNAP,11),@ACROF"
 E  S ACR11="!?$X"
 I $G(ACRFDNAL)]"" S ACR12="?$X+1,$J(""ALLOWNC:"",8),@ACRON,$J(ACRFDNAL,11),@ACROF"
 E  S ACR12="?$X"
 I $G(ACRFDNSA)]"" S ACR13="?$X+1,$J(""SUB-SUB:"",8),@ACRON,$J(ACRFDNSA,11),@ACROF"
 E  S ACR13="?$X"
 I '$D(ACRDISDX) F ACRI=ACR0,ACR1,ACR4,ACR14,ACR141,ACR15,ACR2,ACR16,ACR3,ACR5,ACR17,ACR6,ACR11,ACR12,ACR13 W @ACRI
 Q
SET S ACRGREF=$P($P(ACRDATA1,";;",3),"(")
 S (ACRY,ACRTYPS)=$P(ACRDATA1,";;",2)
 ;ACRGREF GLOBAL NODE OF FUNDS SELECTED
 Q