ACRFIRS8 ;IHS/OIRM/DSD/AEF - LIST VENDORS BY SELECTED PARAMETERS [ 11/01/2001 9:44 AM ]
;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
;
EN ;EP -- MAIN ENTRY POINT
;
D SORT(.ACRSORT)
Q:$G(ACRSORT)']""
D PRINT(.ACRPRT)
Q:$G(ACRPRT)']""
D DIP(ACRSORT,ACRPRT)
Q
SORT(ACRSORT) ;
;----- HOW TO SORT
;
N DIR,DIRUT,DTOUT,DUOUT,X,Y
S DIR(0)="S^NAME:List Alphabetically by Name;EIN:List by EIN#;YTD:List by YTD PAID;YTDS:List by YTD PAID Within STATE;1099:List Vendors With '1099 Y/N' = 'Y'"
S DIR("A")=" SELECTION"
S DIR("B")="NAME"
D ^DIR
Q:$D(DTOUT)!($D(DUOUT))!($D(DIRUT))
Q:Y']""
I Y="NAME" S ACRSORT="[ACRF 1099 VENDOR BY NAME]"
I Y="EIN" S ACRSORT="[ACRF 1099 VENDOR BY EIN]"
I Y="YTD" S ACRSORT="[ACRF 1099 VENDOR BY YTD]"
I Y="YTDS" S ACRSORT="[ACRF 1099 VENDOR BY STATE]"
I Y=1099 S ACRSORT="[ACRF 1099 VENDOR 1099 YES]"
Q
PRINT(ACRPRT) ;
;----- WHAT TO PRINT
;
N DIR,DIRUT,DTOUT,DUOUT,X,Y
S DIR(0)="S^M:Provide MAILING ADDRESS Only;B:Provide BILLING ADDRESS Only;R:Provide REMIT TO ADDRESS Only;A:Provide ALL ADDRESSES on Listing"
S DIR("A")=" SELECTION"
S DIR("B")="M"
D ^DIR
Q:$D(DTOUT)!($D(DUOUT))!($D(DIRUT))
Q:Y']""
I Y="M" S ACRPRT="[ACRF 1099 VENDOR MAIL ADD]"
I Y="B" S ACRPRT="[ACRF 1099 VENDOR BILL ADD]"
I Y="R" S ACRPRT="[ACRF 1099 VENDOR REMIT ADD]"
I Y="A" S ACRPRT="[ACRF 1099 VENDOR ALL ADD]"
Q
Q
DIP(ACRSORT,ACRPRT) ;
;----- CALL FILEMAN TO PRINT REPORT
;
N BY,DIC,FLDS,L,X,Y
S L=0
S DIC="^AUTTVNDR("
S BY=ACRSORT
S FLDS=ACRPRT
D EN1^DIP
Q
ACRFIRS8 ;IHS/OIRM/DSD/AEF - LIST VENDORS BY SELECTED PARAMETERS [ 11/01/2001 9:44 AM ]
+1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
+2 ;
EN ;EP -- MAIN ENTRY POINT
+1 ;
+2 DO SORT(.ACRSORT)
+3 IF $GET(ACRSORT)']""
QUIT
+4 DO PRINT(.ACRPRT)
+5 IF $GET(ACRPRT)']""
QUIT
+6 DO DIP(ACRSORT,ACRPRT)
+7 QUIT
SORT(ACRSORT) ;
+1 ;----- HOW TO SORT
+2 ;
+3 NEW DIR,DIRUT,DTOUT,DUOUT,X,Y
+4 SET DIR(0)="S^NAME:List Alphabetically by Name;EIN:List by EIN#;YTD:List by YTD PAID;YTDS:List by YTD PAID Within STATE;1099:List Vendors With '1099 Y/N' = 'Y'"
+5 SET DIR("A")=" SELECTION"
+6 SET DIR("B")="NAME"
+7 DO ^DIR
+8 IF $DATA(DTOUT)!($DATA(DUOUT))!($DATA(DIRUT))
QUIT
+9 IF Y']""
QUIT
+10 IF Y="NAME"
SET ACRSORT="[ACRF 1099 VENDOR BY NAME]"
+11 IF Y="EIN"
SET ACRSORT="[ACRF 1099 VENDOR BY EIN]"
+12 IF Y="YTD"
SET ACRSORT="[ACRF 1099 VENDOR BY YTD]"
+13 IF Y="YTDS"
SET ACRSORT="[ACRF 1099 VENDOR BY STATE]"
+14 IF Y=1099
SET ACRSORT="[ACRF 1099 VENDOR 1099 YES]"
+15 QUIT
PRINT(ACRPRT) ;
+1 ;----- WHAT TO PRINT
+2 ;
+3 NEW DIR,DIRUT,DTOUT,DUOUT,X,Y
+4 SET DIR(0)="S^M:Provide MAILING ADDRESS Only;B:Provide BILLING ADDRESS Only;R:Provide REMIT TO ADDRESS Only;A:Provide ALL ADDRESSES on Listing"
+5 SET DIR("A")=" SELECTION"
+6 SET DIR("B")="M"
+7 DO ^DIR
+8 IF $DATA(DTOUT)!($DATA(DUOUT))!($DATA(DIRUT))
QUIT
+9 IF Y']""
QUIT
+10 IF Y="M"
SET ACRPRT="[ACRF 1099 VENDOR MAIL ADD]"
+11 IF Y="B"
SET ACRPRT="[ACRF 1099 VENDOR BILL ADD]"
+12 IF Y="R"
SET ACRPRT="[ACRF 1099 VENDOR REMIT ADD]"
+13 IF Y="A"
SET ACRPRT="[ACRF 1099 VENDOR ALL ADD]"
+14 QUIT
+15 QUIT
DIP(ACRSORT,ACRPRT) ;
+1 ;----- CALL FILEMAN TO PRINT REPORT
+2 ;
+3 NEW BY,DIC,FLDS,L,X,Y
+4 SET L=0
+5 SET DIC="^AUTTVNDR("
+6 SET BY=ACRSORT
+7 SET FLDS=ACRPRT
+8 DO EN1^DIP
+9 QUIT