ACRFCCP ;IHS/OIRM/DSD/THL,AEF - CREDIT CARD PURCHASE MANAGEMENT REPORTS; [ 11/01/2001 9:44 AM ]
;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
;;ROUTINE TO SELECT DATE RANGE AND CARDHOLDERS AND PRINT THE CREDIT
;;CARD REPORT
EN D EN1
EXIT K ACR,ACRBEGIN,ACREND,ACRDUZ,ACRCAN,ACRDATE,ACRDOC0,ACRDOCDA,ACRJ,ACRI,ACROBJ,ACRP,ACRPAID,ACRPO,ACRQUAN,ACRRCD,ACRREQ,ACRREQ2,ACRRTN,ACRSSDA,ACRT,ACRTOT,ACRTOTAL,ACRTOTP,ACRTOTPD,ACRTP,ACRUC,ACRUI,ACRQUIT,ACRBYCAN,ACRCANDA
Q
EN1 ;
D PO
Q:$D(ACRQUIT)!$D(ACROUT)!'$D(ACRPODA)
W @IOF
W !?20,"CREDIT CARD REPORT"
W !!!,"Select the DATE RANGE and CARDHOLDER(S) for this report:"
W !
D DATE
Q:$D(ACRQUIT)!$D(ACROUT)!'$D(ACRBEGIN)
D HOLDER
Q:$D(ACRQUIT)!$D(ACROUT)
D TYPE
Q:$D(ACRQUIT)!$D(ACROUT)
I ACRBEGIN="" D Q:$G(Y)'=1
.W !!,"You have chosen to print the CREDIT CARD REPORT for"
.W !,"ALL dates and ALL cardholders."
.W !,"(This could be a VERY lengthy report!"
.W !
.S DIR(0)="YO"
.S DIR("B")="NO"
.S DIR("A")="Are you certain this is what you want"
.D DIR^ACRFDIC
ZIS S (ACRRTN,ZTRTN)="PRINT^ACRFCCP1"
S ZTDESC="CREDIT CARD REPORT"
S ACRCOND=""
D ^ACRFZIS
Q
DATE ;
S DIR(0)="DO^::E"
S DIR("A")="Beginning Date"
S DIR("?",1)="Enter the earliest date for which you want to include credit card purchases"
S DIR("?")="Do not enter any date if you want to list all credit card purchases"
D DIR^ACRFDIC
Q:$D(ACRQUIT)!$D(ACROUT)
Q:'Y
K ACRQUIT
S ACRBEGIN=Y,ACREND=""
I ACRBEGIN D Q:$D(ACRQUIT)
. S DIR(0)="DO^::E"
.S DIR("A")="Ending Date..."
.S DIR("?",1)="Enter the latest date for which you want to include credit card purchases."
.S DIR("?")="Do not enter any date if you want to list all credit card purchases."
.D DIR^ACRFDIC
.I $E(X)[U S ACRQUIT="" Q
.K ACRQUIT
.S ACREND=$S(Y="":DT,1:Y)
Q
HOLDER ;
S DIC="^ACRAU("
S DIC(0)="AEMQZ"
S DIC("A")="Cardholder....: "
S DIC("S")="I $P($G(^ACRAU(+Y,1)),U,5)=1"
D DIC^ACRFDIC
Q:$D(ACRQUIT)!$D(ACROUT)
S ACRDUZ=$S(+Y>0:+Y,1:"")
Q
TYPE ;SELECT TYPE OF REPORT
S DIR(0)="SO^1:Standard Report by Cardholder;2:Finance Report by CAN"
S DIR("B")="Standard Report"
S DIR("A")="Which Report"
W !
D DIR^ACRFDIC
Q:$D(ACRQUIT)!$D(ACROUT)
Q:'Y
I Y=2 S ACRBYCAN=""
Q
PO ;SELECT PURCHASING OFFICE
D OFFICE^ACRFPA
I '+$G(ACRDA) S ACRQUIT="" Q
I '$D(^ACRPO(ACRDA,0)) S ACRQUIT="" Q
S ACRPODA=ACRDA
Q
ACRFCCP ;IHS/OIRM/DSD/THL,AEF - CREDIT CARD PURCHASE MANAGEMENT REPORTS; [ 11/01/2001 9:44 AM ]
+1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
+2 ;;ROUTINE TO SELECT DATE RANGE AND CARDHOLDERS AND PRINT THE CREDIT
+3 ;;CARD REPORT
EN DO EN1
EXIT KILL ACR,ACRBEGIN,ACREND,ACRDUZ,ACRCAN,ACRDATE,ACRDOC0,ACRDOCDA,ACRJ,ACRI,ACROBJ,ACRP,ACRPAID,ACRPO,ACRQUAN,ACRRCD,ACRREQ,ACRREQ2,ACRRTN,ACRSSDA,ACRT,ACRTOT,ACRTOTAL,ACRTOTP,ACRTOTPD,ACRTP,ACRUC,ACRUI,ACRQUIT,ACRBYCAN,ACRCANDA
+1 QUIT
EN1 ;
+1 DO PO
+2 IF $DATA(ACRQUIT)!$DATA(ACROUT)!'$DATA(ACRPODA)
QUIT
+3 WRITE @IOF
+4 WRITE !?20,"CREDIT CARD REPORT"
+5 WRITE !!!,"Select the DATE RANGE and CARDHOLDER(S) for this report:"
+6 WRITE !
+7 DO DATE
+8 IF $DATA(ACRQUIT)!$DATA(ACROUT)!'$DATA(ACRBEGIN)
QUIT
+9 DO HOLDER
+10 IF $DATA(ACRQUIT)!$DATA(ACROUT)
QUIT
+11 DO TYPE
+12 IF $DATA(ACRQUIT)!$DATA(ACROUT)
QUIT
+13 IF ACRBEGIN=""
Begin DoDot:1
+14 WRITE !!,"You have chosen to print the CREDIT CARD REPORT for"
+15 WRITE !,"ALL dates and ALL cardholders."
+16 WRITE !,"(This could be a VERY lengthy report!"
+17 WRITE !
+18 SET DIR(0)="YO"
+19 SET DIR("B")="NO"
+20 SET DIR("A")="Are you certain this is what you want"
+21 DO DIR^ACRFDIC
End DoDot:1
IF $GET(Y)'=1
QUIT
ZIS SET (ACRRTN,ZTRTN)="PRINT^ACRFCCP1"
+1 SET ZTDESC="CREDIT CARD REPORT"
+2 SET ACRCOND=""
+3 DO ^ACRFZIS
+4 QUIT
DATE ;
+1 SET DIR(0)="DO^::E"
+2 SET DIR("A")="Beginning Date"
+3 SET DIR("?",1)="Enter the earliest date for which you want to include credit card purchases"
+4 SET DIR("?")="Do not enter any date if you want to list all credit card purchases"
+5 DO DIR^ACRFDIC
+6 IF $DATA(ACRQUIT)!$DATA(ACROUT)
QUIT
+7 IF 'Y
QUIT
+8 KILL ACRQUIT
+9 SET ACRBEGIN=Y
SET ACREND=""
+10 IF ACRBEGIN
Begin DoDot:1
+11 SET DIR(0)="DO^::E"
+12 SET DIR("A")="Ending Date..."
+13 SET DIR("?",1)="Enter the latest date for which you want to include credit card purchases."
+14 SET DIR("?")="Do not enter any date if you want to list all credit card purchases."
+15 DO DIR^ACRFDIC
+16 IF $EXTRACT(X)[U
SET ACRQUIT=""
QUIT
+17 KILL ACRQUIT
+18 SET ACREND=$SELECT(Y="":DT,1:Y)
End DoDot:1
IF $DATA(ACRQUIT)
QUIT
+19 QUIT
HOLDER ;
+1 SET DIC="^ACRAU("
+2 SET DIC(0)="AEMQZ"
+3 SET DIC("A")="Cardholder....: "
+4 SET DIC("S")="I $P($G(^ACRAU(+Y,1)),U,5)=1"
+5 DO DIC^ACRFDIC
+6 IF $DATA(ACRQUIT)!$DATA(ACROUT)
QUIT
+7 SET ACRDUZ=$SELECT(+Y>0:+Y,1:"")
+8 QUIT
TYPE ;SELECT TYPE OF REPORT
+1 SET DIR(0)="SO^1:Standard Report by Cardholder;2:Finance Report by CAN"
+2 SET DIR("B")="Standard Report"
+3 SET DIR("A")="Which Report"
+4 WRITE !
+5 DO DIR^ACRFDIC
+6 IF $DATA(ACRQUIT)!$DATA(ACROUT)
QUIT
+7 IF 'Y
QUIT
+8 IF Y=2
SET ACRBYCAN=""
+9 QUIT
PO ;SELECT PURCHASING OFFICE
+1 DO OFFICE^ACRFPA
+2 IF '+$GET(ACRDA)
SET ACRQUIT=""
QUIT
+3 IF '$DATA(^ACRPO(ACRDA,0))
SET ACRQUIT=""
QUIT
+4 SET ACRPODA=ACRDA
+5 QUIT