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

ACRFEA2.m

Go to the documentation of this file.
ACRFEA2 ;IHS/OIRM/DSD/THL,AEF - EDIT FINANCIAL DATA;  [ 09/23/2005   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**19**;NOV 05, 2001
 ;;CONTINUATION OF ACRFEA
EDIE ;EP;TO EDIT DOCUMENT
 I '$D(ACRNEW)&'$D(ACRNEWOB) D  Q:$D(ACRQUIT)!$D(ACROUT)
 .S:'$D(DIR("A")) DIR("A")="            Edit this data? "
 .D OUT
 I $G(ACRY)=1 D EDIE1
 Q
EDIE1 ;EP;
 S DA=ACRZDA
 S DIE=ACRDIE
 S DR=ACRDR
 S DIE("NO^")="NO"
 I ACRENTRY["OBLAMT" D
 .K DIE("NO^")
 .S ACRCAN=$P(^ACROBL(ACRDOCDA,0),U,4)
 .S DA=ACRDOCDA
 .S DIE="^ACROBL("
 .S DR=$P(ACRENTRY,";;",5)
 .S:ACRREF=130!(ACRREF=600) DR="[ACR TRAVEL INFO]"
 W !
 D DDS^ACRFDIC
 G:'$D(ACRSCREN) EDIEOUT
 K ACRSCREN
 D DIE^ACRFDIC
EDIEOUT S:ACRENTRY["OBLAMT" ACRCAN=$P(^AUTTCAN(ACRCAN,0),U)
 Q
OUT ;EP;FOR FAST OUT CHOICE
 S DIR(0)="SOA^1:YES;2:NO;3:OUT"
 S:'$D(DIR("B")) DIR("B")="NO"
 D DIR^ACRFDIC
 Q:$D(ACRQUIT)!$D(ACROUT)
 S ACRY=+Y
 I ACRY=3 S (ACRQUIT,ACROUT)=""
 I ACRY=2 S ACRQUIT=""
 Q
DIC1 ;EP;
 K ACRNEW
 D ADD
 Q:$D(ACRQUIT)
 S DIC=ACRDIC
 S DIC(0)=ACRDIC(0)
 S DIC("A")=ACRDIC("A")
 S D=ACRD
 W !
 I $D(ACRNEW),$G(ACRZDA) S Y=ACRZDA,$P(ACRYY,U,3)=1,X=ACRZDA,Y(0,0)=@(ACRDIC_ACRZDA_",0)")
 E  D
 .I ACRDIC["ACRLOCB",ACRDIC(0)["L" W !,"(NON-Personnel Amount ONLY)"
 .D DIC^ACRFDIC
 .S ACRYY=Y
 .Q:+Y<1
 .Q:$P(Y,U,3)'=1
 .S DA=+Y
 .N Y
 .S DIE=ACRDIC
 .S DR=".8////O"
 .D DIE^ACRFDIC
 I U[$E(X)!(X="")!(+Y<1) S ACRQUIT="" Q
 I $P($G(ACRYY),U,3)=1,ACRENTRY'["APPAMT",$G(ACRORIG)'="D",(ACRFTOT+Y(0,0))>ACRFDNAM D  Q
 .S DA=+Y
 .S DIK=ACRDIC
 .S:DIK'["(" DIK=DIK_"("
 .D EXCTOT^ACRFWARN
 .S ACRQUIT=""
 S:$P(ACRYY,U,3)=1 ACRNEW=""
 S ACRZDA=+Y
 S ACRZY=Y
 I $P(ACRYY,U,3)=1 D
 .S ACRNEW=""
 .Q:ACRDIC["OBL"
 .S (DA(1),DA)=+Y
 .S DIC=ACRDIC_DA_",""SC"","
 .S DIC(0)="L"
 .S:'$D(@(DIC_"0)")) @(DIC_"0)")="^"_$S(ACRDIC["ACRAPP":9002185.01,ACRDIC["ACRALW":9002186.01,ACRDIC["ACRALC":9002187.04,1:9002188.04)_"P"
 .D NOW^%DTC
 .S DIC("DR")=".17////"_%_";.18////"_DUZ
 .S X=DUZ
 .D FILE^ACRFDIC
 Q
ACRDIE ;EP;
 S (ACRDOCDA,DA)=+ACROBLDT
 S ACRLBDA=$P(ACROBL0,U,3)
 S ACRDOC=$S($P(ACRDOC0,U,2)]""&'$D(ACRREQST):$P(ACRDOC0,U,2),1:$P(ACRDOC0,U))
 S ACRREFDA=$P(ACRDOC0,U,13)
 S ACRREF=$P(^AUTTDOCR(ACRREFDA,0),U)
 I "^103^349^326^210^"[(U_ACRREF_U)&($D(ACRREQST)!$D(ACRCOMP)) D  I 1
 .S ACRREFX=116
 .S ACRREFDA=$O(^AUTTDOCR("B",116,0))
 E  I ACRREF=600&($D(ACRREQST)!$D(ACRCOMP)) D  I 1
 .S ACRREFX=130
 .S ACRREFDA=$O(^AUTTDOCR("B",130,0))
 E  S ACRREFX=$S(ACRREF=210:103,1:ACRREF)
 S ACRDATA=$T(@ACRREFX^ACRFCTL1)
 S ACRRTN2="^"_$P(ACRDATA,";;",3)
 S ACRDIE="^ACRDOC("
 S ACRDR="[ACR "_$P(ACRDATA,";;",2)_"]"
 D ^ACRFCHK:ACRREF'=103&(ACRREF'=349)&(ACRREF'=326)&(ACRREF'=210)&'$D(ACRREV)
 I ACRREFX=349!(ACRREFX=326) D
 .N X
 .S X=$P(^ACRDOC(ACRDOCDA,0),U,24)
 .I X=1 S ACRDR="[ACR CONTRACT ACTION-26]"
 .I X=2 S ACRDR="[ACR CONTRACT ACTION-33]"
 .I X=3 S ACRDR="[ACR CONTRACT ACTION-1449]"
 .I X=4 S ACRDR="[ACR CONTRACT ACTION-TRIBAL]"
 S DA=ACRDOCDA
 S DIE=ACRDIE
 S DR=ACRDR
 I $D(ACRREV) S ACRSCREN=""
 E  D DDS^ACRFDIC
 I '$D(ACRSCREN) S ACRQUIT="" Q
 K ACRSCREN
 D DISP
 I $D(ACRREV) D PAUSE^ACRFWARN Q
 K ACRQUIT
 D ^ACRFEA3
 D ^ACRFCHK:'$D(ACRQUIT)
 Q
DRAFT ;EP;UTILITY TO FLAG DOCUMENT FOR DRAFT CHECK PAYMENT
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR=".12              Draft Payment"
 D DIE^ACRFDIC
 Q
APPROVE1 ;EP;
 W !
 D WAIT^DICD:$E($G(IOST),1,2)="C-"
 D ^ACRFAPVS
 Q
TRANS ;EP;FOR ELECTRONIC TRANSMISSION OF FUNDS DISTRIBUTION
 W !
 S DIR(0)="YO"
 S DIR("A")="Transmit this "_ACRY_" now"
 S DIR("B")="NO"
 D DIR^ACRFDIC
 Q:ACRY'=1
 D ^%ZIS
 Q:$D(DUOUT)!$D(DTOUT)!(POP'=0)
 D ^ACRFCAA,^%ZISC
 Q
DISP W @IOF
 S ACRTXDA=$P(^ACRDOC(ACRDOCDA,0),U,4)
 ;S ACREB=$P(^VA(200,$P(^ACROBL(ACRDOCDA,0),U,5),0),U)  ;ACR*2.1*19.02 IM16848
 S ACREB=$$NAME2^ACRFUTL1($P(^ACROBL(ACRDOCDA,0),U,5))  ;ACR*2.1*19.02 IM16848
 W !,"DOCUMENT NO: ",@ACRON,ACRDOC,@ACROF," ",$P(^ACRTXTYP(ACRTXDA,0),U)
 W !,"PREPARED BY: ",$P($P(ACREB,",",2)," ")," ",$P(ACREB,",")
 K ACREB
 I $D(ACRPRCS),$D(ACRAPDA) D
 .;W ?$X+1,"REVIEW FOR: ",$P(^VA(200,$P(^ACRAPVS(ACRAPDA,0),U,3),0),U)  ;ACR*2.1*19.02 IM16848
 .W ?$X+1,"REVIEW FOR: ",$$NAME2^ACRFUTL1($P(^ACRAPVS(ACRAPDA,0),U,3))  ;ACR*2.1*19.02 IM16848
 N ACRI
 W $$DASH^ACRFMENU
 N DXS,DIP,DC,DN,D0
 S D0=ACRDOCDA
 D @ACRRTN2
 I $D(ACRDOCDT),$P(ACRDOCDT,U,5)]"" D
 .W !,"JUSTIFY PRIORITY:"
 .N ACR
 .F ACR=5:1:9 I $P(ACRDOCDT,U,ACR)]"" D
 ..W:ACR'=5 !
 ..W ?19,$P(ACRDOCDT,U,ACR)
 W $$DASH^ACRFMENU
 Q
ADD ;ADD OR EDIT ACCOUNT
 S DIR(0)="SO^1:ADD New Account;2:INCREASE Existing Account;3:DECREASE Existing Account;4:EDIT Existing Account"
 S DIR("A")="Which one"
 D DIR^ACRFDIC
 Q:$D(ACRQUIT)
 I "1234"'[+Y S ACRQUIT="" Q
 I Y=1 D  Q
 .K ACRQUIT,ACRNEW
 .S ACRDIC(0)="AELQZ"
 .S ACRDIC("A")="New ACCOUNT DOLLAR AMOUNT: "
 I Y=2!(Y=3) D  Q
 .D ORIG
 I Y=4 D  Q
 .S ACRDIC(0)=$TR(ACRDIC(0),"L","")
 Q
ORIG ;ID INCREASES AND DECREASES
 K ACRORIG
 N ACRXX,ACRAMT,ACR0,ACRDT
 S ACRORIG=$S(Y=2:"I",Y=3:"D",1:"")
 I ACRORIG="" S ACRQUIT="" Q
 D AMT
 Q:$D(ACRQUIT)
 S DIC=ACRDIC
 S DIC(0)="AENQZ"
 S DIC("A")="ID NO. of Account to be Increased or Decreased: "
 S DIC("S")="I $P(^(0),U,8)=""O"""
 W !
 D DIC^ACRFDIC
 I +Y<1 S ACRQUIT="" Q
 S ACRXX=+Y
 S X=ACRAMT
 S DIC=ACRDIC
 S DIC(0)="L"
 S ACR0=@(ACRDIC_ACRXX_",0)"),ACRDT=@(ACRDIC_ACRXX_","_"""DT"""_")")
 S DIC("DR")=".02////"_$P(ACR0,U,2)_";.03////"_$P(ACR0,U,3)_";.04////"_$P(ACR0,U,4)_";.05////"_$P(ACR0,U,5)_";.16////N;.17////"_DT_";.18////"_DUZ_";.2////"_$P(ACR0,U,12)_";.21////"_$P(ACR0,U,21)_";.3////"_$P(ACR0,U,13)
 S DIC("DR")=DIC("DR")_";.8////"_ACRORIG_";.9////"_ACRXX
 D FILE^ACRFDIC
 S (ACRZDA,DA)=+Y
 S ACRYY=Y
 S DIE=ACRDIC
 S DR="10////"_$P(ACRDT,U)_";20////"_$P(ACRDT,U,2)_";30////"_$P(ACRDT,U,3)_";40////"_$P(ACRDT,U,4)_";50////"_$P(ACRDT,U,5)_";60////"_$P(ACRDT,U,6)_";70////"_$P(ACRDT,U,7)_";80////"_$P(ACRDT,U,8)_";90////"_$P(ACRDT,U,9)
 S DR=DR_";110////"_$P(ACRDT,U,11)_";130////"_$P(ACRDT,U,13)_";150////"_$P(ACRDT,U,15)
 D DIE^ACRFDIC
 S (ACRQUIT,ACRNEW)=""
 S X=DUZ
 S DA(1)=ACRZDA
 S DIC=ACRDIC_ACRZDA_",""SC"","
 S DIC(0)="L"
 S:'$D(@(ACRDIC_ACRZDA_",""SC"",0)")) $P(^(0),U,2)=$S(ACRDIC["ACRAPP":9002185.01,ACRDIC["ACRALW":9002186.01,ACRDIC["ACRALC":9002187.04,1:9002188.04)_"P"
 D FILE^ACRFDIC
 Q
AMT ;ENTER ACCOUNT AMOUNT
 S DIR(0)="NOA^0:9999999"
 I $G(ACRDIC)["ACRLOCB",$G(ACRDIC(0))["L" S DIR("A",1)="(NON-Personnel Amount ONLY)"
 S DIR("A")="Amount of Increase/Decrease: "
 W !
 D DIR^ACRFDIC
 Q:$D(ACRQUIT)
 S ACRAMT=Y
 Q