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

ACRFPAYU.m

Go to the documentation of this file.
ACRFPAYU ;IHS/OIRM/DSD/THL,AEF - PAYMENT MANAGEMENT UTILITIES;  [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;
 I '$D(^ACRAPL("AC",DUZ,38)) D  Q
 .W !!,"You do not have the authority for Utility Functions."
 .D PAUSE^ACRFWARN
EN F  D EN1 Q:$D(ACRQUIT)!$D(ACROUT)
EXIT K ACR,ACRQUIT,ACROUT
 Q
EN1 ;SELECT PAYMENT MANAGEMENT UTILITY
 W @IOF
 W !?10,"Payment Management Utilities"
 S DIR(0)="SO^1:Enter Bank Information;2:Enter/Edit Object Class Codes;3:Add New Traveler;4:Print Bank Information;5:Late Payment Interest Rates;6:Add/Edit Vendor;7:Import Obligations from PCC/HAS"
 S DIR("A")="Which Utility"
 W !
 D DIR^ACRFDIC
 I +Y<1 S ACRQUIT="" Q
 I Y=1 D ACHINFO Q
 I Y=2 D OBJCODE^ACRFDFL1 Q
 I Y=3 D ADDT Q
 I Y=4 D PRINT Q
 I Y=5 D LATEPAY Q
 I Y=6 D VENDOR Q
 I Y=7 D ^AFSLLDO1 Q
 Q
ACHINFO ;EP;TO EDIT ACH INFORMATION
 F  D ACH1 Q:$D(ACRQUIT)!$D(ACROUT)
 K ACRBTYP,ACRQUIT
 Q
ACH1 ;SELECT TYPE OF LOOKUP
 K ACRBTYP
 D WHICH
 I $G(ACRBTYP)="" S ACRQUIT="" Q
 F  D ACH2 Q:$D(ACRQUIT)!$D(ACROUT)
 K ACRQUIT
 Q
ACH2 ;SELECT VENDOR OR TRAVELER
 D ACHHEAD
 S DIC=$S(ACRBTYP="V":"^AUTTVNDR(",1:"^ACRAU(")
 S DIC(0)="AEMQZ"
 S DIC("A")="Which "_$S(ACRBTYP="V":"VENDOR",1:"TRAVELER")_": "
 W !
 D DIC^ACRFDIC
 I +Y<1 S ACRQUIT="" Q
 S DA=+Y
 D BANKINFO^ACRFPAY
 Q
ACHHEAD ;
 W @IOF
 W !?5,"BANK INFORMATION is CONFIDENTIAL, PROTECTED information."
 W !?5,"Illegal use or dissemination of this data is against Federal Law."
 Q
ADDT ;ADD TRAVELERE
 F  D AT1 Q:$D(ACRQUIT)!$D(ACROUT)
 K ACRQUIT
 Q
AT1 S DIC="^ACRAU("
 S DIC(0)="AELMQZ"
 S DIC("A")="Traveler's NAME (LAST,FIRST): "
 W !
 D DIC^ACRFDIC
 I +Y<1 S ACRQUIT="" Q
 S (DA,ACRDUZ)=+Y
 S DIE="^ACRAU("
 S DDSFILE="9002185.3"
 S DR="[ACR ARMS USER]"
 D DDS^ACRFDIC
 S DA=ACRDUZ
 S ACRBTYP="T"
 D BANKINFO^ACRFPAY
 Q
PRINT ;
 D WHICH
 I $G(ACRBTYP)="" K ACRQUIT Q
 D ALL
 I $G(ACRALL)="" K ACRQUIT Q
 Q
PALL ;EP;PRINT BANK INFO FOR ALL TRAVLERES/VENDORS
 S FLDS="[ACR "_$S(ACRBTYP="T":"TRAVELER",1:"VENDOR")_" BANK INFO]"
 S BY=.01 ;$S(ACRBTYP="T":".01;""""",1:".01")
 S FR="A"
 S TO="z"
 S IOP=ION
 S ACRDIC=$S(ACRBTYP="V":"^AUTTVNDR",1:"^ACRAU")
 S DIC=ACRDIC_"("
 S DIS(0)="I $G(@ACRDIC@(D0,19))]"""""
 D EN1^DIP
 D PAUSE^ACRFWARN
 Q
PSELECT ;PRINT BANK INFO FOR SELECTED TRAVLERES/VENDORS
 D PSHEAD
 S ACRNAM=""
 F  S ACRNAM=$O(^TMP("ACRBI",$J,ACRNAM)) Q:ACRNAM=""!$D(ACRQUIT)  D
 .S ACRDA=0
 .F  S ACRDA=$O(^TMP("ACRBI",$J,ACRNAM,ACRDA)) Q:'ACRDA!$D(ACRQUIT)  D
 ..S X=$S(ACRBTYP="T":$G(^ACRAU(ACRDA,19)),1:$G(^AUTTVNDR(ACRDA,19)))
 ..W !,ACRNAM,?32,$S($P(X,U)="C":"CHECKING",$P(X,U)="S":"SAVING",1:"")
 ..W ?42,$S($D(^XUSEC("ACRFZ EDIT EFT",DUZ)):$P(X,U,2),$D(^XUSEC("ACRFZ VIEW EFT",DUZ)):$P(X,U,2),1:"<HIDDEN>")
 ..W ?53,$S($D(^XUSEC("ACRFZ EDIT EFT",DUZ)):$P(X,U,3),$D(^XUSEC("ACRFZ VIEW EFT",DUZ)):$P(X,U,3),1:"<HIDDEN>")
 ..I IOSL-4<$Y D PAUSE^ACRFWARN Q:$D(ACRQUIT)  D PSHEAD
 D PAUSE^ACRFWARN
 K ACRDC
 Q
PSHEAD ;
 W @IOF
 W !,"EFT BANK INFORMATION"
 W !,"REPORT DATE: "
 S Y=DT
 X ^DD("DD")
 W Y
 S ACRDC=$G(ACRDC)+1
 W ?55,"PAGE: ",ACRDC
 W !!,"NAME",?32,"ACCOUNT",?42,"ROUTING #",?53,"ACCOUNT #"
 W !,"--------------------------------------------------------------------------------"
 Q
ALL S DIR(0)="SO^1:Print for ALL "_$S(ACRBTYP="T":"Travelers",1:"Vendors")_";2:Print for SELECTED "_$S(ACRBTYP="T":"Travelers",1:"Vendors")
 S DIR("A")="Which one"
 W !
 D DIR^ACRFDIC
 I Y<1 K ACRQUIT Q
 S ACRALL=$S(Y=1:"ALL",1:"SELECT")
 I Y=1 D ZIS Q
 I Y=2 D SEL Q
 Q
SEL ;SELECT TRAVELER/VENDOR TO PRINT
 K ^TMP("ACRBI",$J)
 F  D S1 Q:$D(ACRQUIT)!$D(ACROUT)
 K ACRQUIT
 Q:'$D(^TMP("ACRBI",$J))
 S (ACRRTN,ZTRTN)="PSELECT^ACRFPAYU"
 S ZTDESC="PRINT EFT BANK INFORMATION"
 D ^ACRFZIS
 Q
S1 S DIC=$S(ACRBTYP="T":"^ACRAU(",1:"^AUTTVNDR(")
 S ACRDIC=$S(ACRBTYP="T":"^ACRAU",1:"^AUTTVNDR")
 S DIC(0)="AEMQZ"
 W !
 D DIC^ACRFDIC
 I +Y<1 S ACRQUIT="" Q
 I $G(@ACRDIC@(+Y,19))="" W !!,"NO BANK INFO ON FILE" H 2 Q
 S ^TMP("ACRBI",$J,$P(Y(0,0),U),+Y)=""
 Q
ZIS ;SELECT DEVICE
 S (ACRRTN,ZTRTN)=$S(ACRALL="ALL":"PALL^ACRFPAYU",1:"PSELECT^ACRFPAYU")
 S ZTDESC="EFT BANK INFORMATION"
 D ^ACRFZIS
 K ACRQUIT
 Q
WHICH ;SELECT VENDOR OR TRAVELER
 K ACRBTYP
 D ACHHEAD
 S DIR(0)="SO^1:Vendor Banking Information;2:Traveler Banking Information"
 S DIR("A")="Which Banking Information"
 W !
 D DIR^ACRFDIC
 I +Y<1 S ACRQUIT="" Q
 S ACRBTYP=$S(Y=1:"V",Y=2:"T",1:"")
 Q
LATEPAY ;EP;TO REVIEW/ADD/EDIT LATE PAY INTEREST RATES
 F  D LP1 Q:$D(ACRQUIT)!$D(ACROUT)
LPEXIT K ACRQUIT,ACRLP,ACRIR,ACRED,ACRXX,ACRYY,ACRJ
 Q
LP1 ;
 D LPHEAD
 S ACRJ=0
 S ACRXX=9999
 F  S ACRXX=$O(^ACRSYS(1,40,ACRXX),-1) Q:'ACRXX!(ACRJ>7)  D
 .S ACRYY=$G(^ACRSYS(1,40,ACRXX,0))
 .S Y=$P(ACRYY,U)
 .X ^DD("DD")
 .S ACRJ=ACRJ+1
 .S ACRLP(ACRJ)=ACRXX
 .W !?10,ACRJ
 .W ?15,Y
 .W ?30,$J($FN($P(ACRYY,U,2),"P",3),5)
 S DIR(0)="SO^1:Edit Rate;2:ADD New Rate;3:REMOVE Rate"
 S DIR("A")="Which one"
 W !
 D DIR^ACRFDIC
 I Y<1 S ACRQUIT="" Q
 I Y=1 D LPE K ACRQUIT Q
 I Y=2 D LPA K ACRQUIT Q
 I Y=3 D LPR K ACRQUIT Q
 Q
LPE ;EDIT LP RATE
 S DIR(0)="NO^1:"_ACRJ
 S DIR("A")="Edit which one"
 W !
 D DIR^ACRFDIC
 I Y<1 K ACRQUIT Q
 I '$D(ACRLP(+Y)) K ACRQUIT Q
 S DA=+ACRLP(Y)
 S DA(1)=1
 S DIE="^ACRSYS(1,40,"
 S DR=".01T;.02T"
 W !
 D DIE^ACRFDIC
 Q
LPA ;ADD LP RATE
 S DIR(0)="DO^::ET"
 S DIR("A")="EFFECTIVE DATE"
 W !
 D DIR^ACRFDIC
 I Y<1 K ACRQUIT Q
 S ACRED=Y
 S DIR(0)="NOA^1:10:3"
 S DIR("A")="INTEREST RATE.:  "
 D DIR^ACRFDIC
 I Y<1 K ACRQUIT Q
 S ACRIR=Y
 S X=ACRED
 S DA(1)=1
 S DIC="^ACRSYS(1,40,"
 S DIC(0)="L"
 S DIC("DR")=".02////"_ACRIR
 D FILE^ACRFDIC
 Q
LPR ;REMOVE LP RATE
 S DIR(0)="NO^1:"_ACRJ
 S DIR("A")="Remove which one"
 W !
 D DIR^ACRFDIC
 I Y<1 K ACRQUIT Q
 I '$D(ACRLP(+Y)) K ACRQUIT Q
 S DA=+ACRLP(Y)
 S DA(1)=1
 S DIK="^ACRSYS(1,40,"
 D DIK^ACRFDIC
 Q
LPHEAD ;LP HEADER
 W @IOF
 W !?10,"Late Payment Interest Rates"
 W !!?15,"Effective",?30,"Interest"
 W !?10,"NO.",?15,"Date",?30,"Rate"
 W !?10,"---",?15,"----------",?30,"--------"
 Q
VENDOR ;ADD/EDIT VENDOR
 D EN^ACRFVEND
 Q