ABMDRAG1 ; IHS/ASDST/DMJ - Aged A/R Reports ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Original;TMD;01/19/96 1:02 PM
;
PRINT ;EP for printing data
U IO W:$D(ABM("PRINT",16)) @ABM("PRINT",16) S ABM("PG")=0 D HDB
S ABM="" F S ABM=$O(^TMP("ABM-AG",$J,ABM)) Q:ABM="" S ABM("T")=^(ABM) D Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
.Q:ABM("T")=""
.I $Y>(IOSL-5) D HD Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
.D WRT
S ABM("T")=$G(^TMP("ABM-AG",$J))
W !," +------+----------+-----------+-----------+-----------+-----------+-----------+-----------+==========="
W !,"Total Accounts Receivable:",?30,$J($FN($P(ABM("T"),U),",",0),5),$J($FN($P(ABM("T"),U,2),",",2),11) F ABM("I")=3:1:9 W " |",$J($FN($P(ABM("T"),U,ABM("I")),",",2),10)
W !?47,"+-----------+-----------+-----------+-----------+-----------+-----------+===========",!
F ABM("I")=3:1:8 W ?((12*ABM("I"))+16),$J($S($P(ABM("T"),U,9)>0:(100*$P(ABM("T"),U,ABM("I")))\$P(ABM("T"),U,9),1:0),2),"%"
Q
;
WRT W !,$E(ABM,1,28)
W ?30,$J($FN($P(ABM("T"),U),",",0),5),$J($FN($P(ABM("T"),U,2),",",2),11) F ABM("I")=3:1:9 W " |",$J($FN($P(ABM("T"),U,ABM("I")),",",2),10)
Q
;
HD D PAZ^ABMDRUTL Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
HDB S ABM("PG")=ABM("PG")+1,ABM("I")="" D WHD^ABMDRHD
W !!,?70,"AGING WITHOUT DISTRIBUTION OF CREDITS"
W !?10,"Insurer",?31,"Bills",?39,"Credits | 0-30 | 31-60 | 61-90 | 91-120 | Over 120 | Total Aged| Total"
W !,"-----------------------------+------+----------+-----------+-----------+-----------+-----------+-----------+-----------+==========="
Q
ABMDRAG1 ; IHS/ASDST/DMJ - Aged A/R Reports ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Original;TMD;01/19/96 1:02 PM
+3 ;
PRINT ;EP for printing data
+1 USE IO
IF $DATA(ABM("PRINT",16))
WRITE @ABM("PRINT",16)
SET ABM("PG")=0
DO HDB
+2 SET ABM=""
FOR
SET ABM=$ORDER(^TMP("ABM-AG",$JOB,ABM))
IF ABM=""
QUIT
SET ABM("T")=^(ABM)
Begin DoDot:1
+3 IF ABM("T")=""
QUIT
+4 IF $Y>(IOSL-5)
DO HD
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
+5 DO WRT
End DoDot:1
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
+6 SET ABM("T")=$GET(^TMP("ABM-AG",$JOB))
+7 WRITE !," +------+----------+-----------+-----------+-----------+-----------+-----------+-----------+==========="
+8 WRITE !,"Total Accounts Receivable:",?30,$JUSTIFY($FNUMBER($PIECE(ABM("T"),U),",",0),5),$JUSTIFY($FNUMBER($PIECE(ABM("T"),U,2),",",2),11)
FOR ABM("I")=3:1:9
WRITE " |",$JUSTIFY($FNUMBER($PIECE(ABM("T"),U,ABM("I")),",",2),10)
+9 WRITE !?47,"+-----------+-----------+-----------+-----------+-----------+-----------+===========",!
+10 FOR ABM("I")=3:1:8
WRITE ?((12*ABM("I"))+16),$JUSTIFY($SELECT($PIECE(ABM("T"),U,9)>0:(100*$PIECE(ABM("T"),U,ABM("I")))\$PIECE(ABM("T"),U,9),1:0),2),"%"
+11 QUIT
+12 ;
WRT WRITE !,$EXTRACT(ABM,1,28)
+1 WRITE ?30,$JUSTIFY($FNUMBER($PIECE(ABM("T"),U),",",0),5),$JUSTIFY($FNUMBER($PIECE(ABM("T"),U,2),",",2),11)
FOR ABM("I")=3:1:9
WRITE " |",$JUSTIFY($FNUMBER($PIECE(ABM("T"),U,ABM("I")),",",2),10)
+2 QUIT
+3 ;
HD DO PAZ^ABMDRUTL
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
HDB SET ABM("PG")=ABM("PG")+1
SET ABM("I")=""
DO WHD^ABMDRHD
+1 WRITE !!,?70,"AGING WITHOUT DISTRIBUTION OF CREDITS"
+2 WRITE !?10,"Insurer",?31,"Bills",?39,"Credits | 0-30 | 31-60 | 61-90 | 91-120 | Over 120 | Total Aged| Total"
+3 WRITE !,"-----------------------------+------+----------+-----------+-----------+-----------+-----------+-----------+-----------+==========="
+4 QUIT