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

ACRFEA43.m

Go to the documentation of this file.
ACRFEA43 ;IHS/OIRM/DSD/THL,AEF - EDIT FINANCIAL DATA - CONT;  [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;ACRFEA4 CON'T
EN ;EP;
 I ACRREF=148 D REMARKS Q
 D CALLERS
 I '$D(ACROUT),$E($P($G(ACRDOC0),U,2),9,10)'="BP",'$P($G(ACRDOC0),U,19) D
 .D FEDSTRIP
 .D DRAFT:ACRREF=103!($P(ACRDOC0,U,4)'=35)
 D RECEIVER:'$D(ACROUT)
 I '$D(ACROUT),$P(ACRDOC0,U,19),$P($G(^ACRDOC(ACRDOCDA,"PO")),U,5)=$P($G(^ACRSYS(1,"DT1")),U,12) D PVENDOR:'$D(ACROUT)
 Q
FEDSTRIP ;EP;EDIT FEDSRIP DATA
 I ACRREF=116!(ACRREF=103)!(ACRREF=210),$P(ACRDOC0,U,4)'=35,'$P(ACRDOC0,U,12) D FS
 I $P(^ACRDOC(ACRDOCDA,0),U,4)=35 D
 .I '$D(ACRNEWOB) D CC I 1
 .E  D CC1
 K ACRQUIT
 Q
FS S DIR(0)="YO"
 S DIR("A")="Is this a FEDSTRIP or GSA SUPPLY CENTER order"
 S DIR("B")="NO"
 I $D(^ACRDOC(ACRDOCDA,3)),$P(^(3),U,11)]""!($P(^(3),U,12)]"") S DIR("B")="YES"
 W !
 D DIR^ACRFDIC
 N ACRREF,ACRREFDA
FEDSET ;EP;
 I Y=0,$D(^ACRDOC(ACRDOCDA,3)) N ACR3 S ACR3=^(3) D  Q
 .N X
 .K ACRQUIT
 .F X=11:1:17 I $P(ACR3,U,X)]"" S ACRQUIT="" Q
 .Q:'$D(ACRQUIT)
 .K ACRQUIT
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR="14///@;15///@;16///@;17///@;18///@;.13///"_$S($E($G(^ACROBL(ACRDOCDA,"APV")))="A":103,1:116)
 .D DIE^ACRFDIC
 .S $P(^ACRDOC(ACRDOCDA,3),U,17)=""
 I Y=1 D
 .K ACRQUIT
 .N X,ACR3
 .S ACR3=$G(^ACRDOC(ACRDOCDA,3))
 .F X=11:1:15 I $P(ACR3,U,X)="" S ACRQUIT="" Q
 .I $D(ACRQUIT)#2 D FEDSET^ACRFEA4 K ACRQUIT
 .Q:$D(DDSFILE)
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR="[ACR FEDSTRIP ORDER]"
 .D DDS^ACRFDIC
 .Q:'$D(ACRSCREN)
 .K ACRSCREN
 .W !
 .D DIE^ACRFDIC
 Q
CC ;EP;TO INDICATE IF CREDIT CARD PURCHASE
 S DIR(0)="YO"
 S DIR("A")="Is this a Credit Card purchase"
 S DIR("B")="NO"
 I $P(^ACRDOC(ACRDOCDA,0),U,4)=35 D
 .S DIR("A")="Keep this as a CREDIT CARD purchase",DIR("B")="YES"
 W !
 D DIR^ACRFDIC
 I +Y'=1 D  Q
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR=$S($P(^ACRDOC(ACRDOCDA,0),U,4)=35&($P(^(0),U,7)'=35):".04////"_$P(^(0),U,7),1:".04T")_";.25///@"
 .W !
 .D DIE^ACRFDIC
 .I $E(^ACROBL(ACRDOCDA,"APV"))="A",$P(^ACRDOC(ACRDOCDA,0),U,13)=33 D
 ..S DA=ACRDOCDA
 ..S DIE="^ACRDOC("
 ..S DR=".13///103"
 ..D DIE^ACRFDIC
 ..S DA=ACRDOCDA
 ..S DIE="^ACROBL("
 ..S DR=".1///103;905///A;906///Y"
 ..D DIE^ACRFDIC
CC1 ;EP;
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR=".04////35;.25T;113110DATE PURCHASED......"
 I $P($G(^ACRDOC(ACRDOCDA,"REQ2")),U,8)="" S DR=DR_";113370////"_DUZ
 I $P($G(^ACRDOC(ACRDOCDA,0)),U,14)="" S DR=DR_";.14////CREDIT CARD PUR"
 W !
 D DIE^ACRFDIC
 I $P(^ACRDOC(ACRDOCDA,0),U,25)="" D  G CC1
 .W !!,"You must enter the name of the CREDIT CARD HOLDER for this purchase."
 Q
RECEIVER ;EP;EDIT RECEIVING OFFICIAL FOR REQ FOR SERVICE AND CALL IF CALL
 Q:$P($G(^ACRDOC(+$G(ACRDOCDA),0)),U,4)=35
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR="113200T"_$S($P(^ACRDOC(ACRDOCDA,0),U,19):";24T",1:"")
 W !
 D DIE^ACRFDIC
CIS ;ENTER SMALL PURCHASE DATA
 I ACRREF=103!(ACRREF=349)!(ACRREF=326),$D(ACRPO),'$P(^ACRDOC(ACRDOCDA,0),U,16),$D(^("PO")),$P(^("PO"),U,5),$D(^AUTTVNDR($P(^("PO"),U,5),0)) D ADD^ACRFCIS
 Q
CALLERS ;EP;TO EDIT BPA CALLERS
 I $D(ACRPO) S ACRDOC0=^ACRDOC(ACRDOCDA,0) D
 .I $P(ACRDOC0,U,18)>0!$P(ACRDOC0,U,15) D
 ..I $P(ACRDOC0,U,15) Q:'$D(^ACRDOC($P(ACRDOC0,U,15),0))  Q:$P(^(0),U,18)'>0  S DA=$P(ACRDOC0,U,15)
 ..E  S DA=ACRDOCDA
 ..S DIE="^ACRDOC("
 ..S DR="[ACR BPA CALL LIMIT]"
 ..D DDS^ACRFDIC
 ..Q:'$D(ACRSCREN)
 ..K ACRSCREN
 ..W !
 ..D DIE^ACRFDIC
 Q
REMARKS ;EP;TO EDIT SPECIAL REMARKS FOR A TRAINING REQUEST
 W !
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR="[ACR TRAINING OTHER DATA]"
 D DDS^ACRFDIC
 Q:'$D(ACRSCREN)
 K ACRSCREN
 D DIE^ACRFDIC
 Q
DRAFT ;EP;TO DETERMINE IF DRAFT PAYMENT IS ALLOWED
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR=".12Is DRAFT PAYMENT authorized"
 W !
 D DIE^ACRFDIC
 Q
PVENDOR ;EP;TO ENTER PRIME VENDOR CONTRACT NUMBER FOR THE DOCUMENT
 Q:$P($G(^ACRDOC(ACRDOCDA,"PO")),U,5)'=$P($G(^ACRSYS(1,"DT1")),U,12)
 I $P($G(^ACRDOC(ACRDOCDA,"REQ2")),U,13)]"" D  Q
 .N ACR1
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR="113420T"
 .D DIE^ACRFDIC
 .S ACR1=$P($G(^ACRDOC(ACRDOCDA,"REQ2")),U,13)
 .Q:ACR1=""
 .D DOC^ACRFPVEN
 D POS^ACRFPVEN
 Q
PRINT ;EP;TO PRINT ACCOUNT AUDIT
 F  D P1 Q:$D(ACRQUIT)!$D(ACROUT)
 K ACRQUIT
 Q
P1 ;
 W @IOF
 W !?10,"Select Account for AUDIT REPORT"
 S DIR(0)="SO^1:Appropriation;2:Allowance;3:Sub-Allowance;4:Department Account"
 S DIR("A")="Which type of account"
 W !
 D DIR^ACRFDIC
 I 'Y S ACRQUIT="" Q
 I Y=1 S ACRGLB="^ACRAPP"
 I Y=2 S ACRGLB="^ACRALW"
 I Y=3 S ACRGLB="^ACRALC"
 I Y=4 S ACRGLB="^ACRLOCB"
 S DIC=ACRGLB_"("
 S DIC(0)="AEMQZ"
 S DIC("A")="Which "_$S(Y=1:"APPROPRIATION",Y=2:"ALLOWANCE",Y=3:"SUB-ALLOWANCE",1:"DEPARTMENT ACCOUNT")_": "
 S DIC("S")="I $P(^(0),U,8)=""O"",$D(@ACRGLB@(""ORIG"",+Y))"
 W !
 D DIC^ACRFDIC
 Q:+Y<1
 S ACRZDA=+Y
ZIS S ZTDESC="ACCOUNT AUDIT REPORT"
 S (ZTRTN,ACRRTN)="P2^ACRFEA43"
 D ^ACRFZIS
 Q
P2 ;EP;TO PRINT ACCOUNT AUDIT REPORT
 N ACRTOT,ACRAMT,ACRCMT
 D PHEAD
 S ACRX=@ACRGLB@(ACRZDA,0),ACRDT=$G(@ACRGLB@(ACRZDA,"DT")),ACRCMT=$G(@ACRGLB@(ACRZDA,"PURP"))
 W !,ACRZDA,?7,$P(ACRX,U,8),?9,$E($S(ACRGLB'["ACRLOCB":$P(ACRX,U,12),1:$P($G(^AUTTPRG(+$P(ACRX,U,5),0)),U)),1,25),?35,$P(ACRDT,U,3),?37,$E($P(ACRCMT,U),1,30),?68,$J($FN(+ACRX+$S(ACRGLB["ACRLOCB":$P(ACRX,U,11),1:0),"P",2),12)
 S ACRTOT=+ACRX+$S(ACRGLB["ACRLOCB":$P(ACRX,U,11),1:0)
 S ACRDA=0
 F  S ACRDA=$O(@ACRGLB@("ORIG",ACRZDA,ACRDA)) Q:'ACRDA!$D(ACRQUIT)  D
 .S ACRX=@ACRGLB@(ACRDA,0),ACRDT=$G(@ACRGLB@(ACRDA,"DT")),ACRCMT=$G(@ACRGLB@(ACRDA,"PURP"))
 .W !,ACRDA,?7,$P(ACRX,U,8),?9,$E($S(ACRGLB'["ACRLOCB":$P(ACRX,U,12),1:$P($G(^AUTTPRG(+$P(ACRX,U,5),0)),U)),1,25),?35,$P(ACRDT,U,3),?37,$E($P(ACRCMT,U),1,30),?68,$J($FN(+ACRX+$S(ACRGLB["ACRLOCB":$P(ACRX,U,11),1:0),"P",2),12)
 .S ACRAMT=$S($P(ACRX,U,8)'="D":1,1:-1)
 .S ACRTOT=ACRTOT+(+ACRX*ACRAMT)+$S(ACRGLB["ACRLOCB":$P(ACRX,U,11),1:0)
 .I IOSL-4<$Y D PAUSE^ACRFWARN Q:$D(ACRQUIT)  D PHEAD
 D PTAIL
 K ACRQUIT
 D PAUSE^ACRFWARN
 Q
PHEAD ;
 W @IOF
 W !,"Audit of ",$S(ACRGLB["ACRAPP":"APPROPRIATION",ACRGLB["ACRALW":"ALLOWANCE",ACRGLB["ACRALC":"SUB-ALLOWANCE",1:"DEPARTMENT ACCOUNT")," Increases and Decreases."
 W !!,"REPORT DATE: "
 S Y=DT
 X ^DD("DD")
 W Y,?35,"R"
 W !?35,"E",!,"ID NO.",?9,"ACCOUNT IDENTIFER",?35,"C",?37,"PURPOSE",?68,"AMOUNT"
 W !,"------",?7,"-",?9,"-------------------------",?35,"-",?37,"------------------------------",?68,"------------"
 Q
PTAIL ;
 W !,"------",?7,"-",?9,"-------------------------",?35,"-",?37,"------------------------------",?68,"------------"
 W !?30,"TOTAL: ",?68,$J($FN(ACRTOT,"P",2),12)
 Q