ACRFIRS3 ;IHS/OIRM/DSD/AEF - PRINT 1099 REPORT [ 11/01/2001 9:44 AM ]
;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
;
; This routine prints a report of the vendor 1099s being
; reported to IRS
;
; Variables are set in ACRFIRS1
;
DQ ;EP -- PRINT JOB STARTS HERE
;
N ACR,CNT,DATA,PAGE
D HDR
S ACR=0 F S ACR=$O(^TMP("ACRZ",ACRJ,"REPORT",ACR)) Q:'ACR D
. I $Y>(IOSL-5) D HDR Q:$G(ACROUT)
. S CNT=$G(CNT)+1
. S DATA=^TMP("ACRZ",ACRJ,"REPORT",ACR,0)
. W !,$P(DATA,U,2)
. W ?15,$E($P(DATA,U),1,30)
. W ?50,$J(+($P(DATA,U,3)/100),18,2)
W !!,"NUMBER OF 'B' RECORDS GENERATED FOR ",ACRSTA," = ",+$G(CNT)
W !,"TOTAL DOLLAR AMOUNT FOR ",ACRSTA," = ",$J(^TMP("ACRZ",ACRJ,"REPORT TOTAL",0)/100,18,2)
K ^TMP("ACRJ",ACRJ,"REPORT")
D ^%ZISC
Q
HDR ;----- WRITE HEADER
;
N DIR,I,X,Y
I $E(IOST)="C",$G(PAGE) S DIR(0)="E" D ^DIR K DIR I 'Y S ACROUT=1 Q
S PAGE=$G(PAGE)+1
W @IOF
W !
F I=1:1:IOM W "*"
W !?11,"LISTING OF 1099 VENDORS FOR CY ",ACRPMYR
W ?(IOM-10),"PAGE ",PAGE
W !," E. I. N."
W ?15,"V E N D O R N A M E"
W ?57,"A M O U N T"
W !
F I=1:1:IOM W "*"
W !
Q
ACRFIRS3 ;IHS/OIRM/DSD/AEF - PRINT 1099 REPORT [ 11/01/2001 9:44 AM ]
+1 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
+2 ;
+3 ; This routine prints a report of the vendor 1099s being
+4 ; reported to IRS
+5 ;
+6 ; Variables are set in ACRFIRS1
+7 ;
DQ ;EP -- PRINT JOB STARTS HERE
+1 ;
+2 NEW ACR,CNT,DATA,PAGE
+3 DO HDR
+4 SET ACR=0
FOR
SET ACR=$ORDER(^TMP("ACRZ",ACRJ,"REPORT",ACR))
IF 'ACR
QUIT
Begin DoDot:1
+5 IF $Y>(IOSL-5)
DO HDR
IF $GET(ACROUT)
QUIT
+6 SET CNT=$GET(CNT)+1
+7 SET DATA=^TMP("ACRZ",ACRJ,"REPORT",ACR,0)
+8 WRITE !,$PIECE(DATA,U,2)
+9 WRITE ?15,$EXTRACT($PIECE(DATA,U),1,30)
+10 WRITE ?50,$JUSTIFY(+($PIECE(DATA,U,3)/100),18,2)
End DoDot:1
+11 WRITE !!,"NUMBER OF 'B' RECORDS GENERATED FOR ",ACRSTA," = ",+$GET(CNT)
+12 WRITE !,"TOTAL DOLLAR AMOUNT FOR ",ACRSTA," = ",$JUSTIFY(^TMP("ACRZ",ACRJ,"REPORT TOTAL",0)/100,18,2)
+13 KILL ^TMP("ACRJ",ACRJ,"REPORT")
+14 DO ^%ZISC
+15 QUIT
HDR ;----- WRITE HEADER
+1 ;
+2 NEW DIR,I,X,Y
+3 IF $EXTRACT(IOST)="C"
IF $GET(PAGE)
SET DIR(0)="E"
DO ^DIR
KILL DIR
IF 'Y
SET ACROUT=1
QUIT
+4 SET PAGE=$GET(PAGE)+1
+5 WRITE @IOF
+6 WRITE !
+7 FOR I=1:1:IOM
WRITE "*"
+8 WRITE !?11,"LISTING OF 1099 VENDORS FOR CY ",ACRPMYR
+9 WRITE ?(IOM-10),"PAGE ",PAGE
+10 WRITE !," E. I. N."
+11 WRITE ?15,"V E N D O R N A M E"
+12 WRITE ?57,"A M O U N T"
+13 WRITE !
+14 FOR I=1:1:IOM
WRITE "*"
+15 WRITE !
+16 QUIT