RCRPRPU ;EDE/YMG - REPAYMENT PLAN REPORT UTILITIES; 11/23/2020
;;4.5;Accounts Receivable;**377**;Mar 20, 1995;Build 45
;;Per VA Directive 6402, this routine should not be modified.
;
Q
;
DASH(LEN) ; print line of dashes
N DASH
S $P(DASH,"-",LEN+1)="" W DASH
Q
;
PAUSE ; display "press return to continue" prompt
N DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
S DIR(0)="EA"
S DIR("A")="Press <return> to continue "
D ^DIR
Q
;
ASKEXCEL() ; display "export to excel" prompt
;
; returns 1 for Yes, 0 for No, -1 for user exit / timeout
;
N DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
S DIR(0)="Y",DIR("B")="YES"
S DIR("A")="Export to Excel (Y/N)"
D ^DIR I $D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) Q -1
Q $S(Y>0:1,1:0)
;
BALANCE(BILL) ; calculate total balance for the given bill
;
; BILL - file 430 ien
;
; returns sum of fields 430/71, 430/72, 430/73, 430/74, and 430/75
;
N DATA,RES,Z
S RES=0
I BILL>0 D
.S DATA=$P($G(^PRCA(430,BILL,7)),U,1,5)
.I DATA'="" F Z=1:1:5 S RES=RES+$P(DATA,U,Z)
.Q
Q RES
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRCRPRPU 1049 printed Dec 13, 2024@01:48:25 Page 2
RCRPRPU ;EDE/YMG - REPAYMENT PLAN REPORT UTILITIES; 11/23/2020
+1 ;;4.5;Accounts Receivable;**377**;Mar 20, 1995;Build 45
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 QUIT
+5 ;
DASH(LEN) ; print line of dashes
+1 NEW DASH
+2 SET $PIECE(DASH,"-",LEN+1)=""
WRITE DASH
+3 QUIT
+4 ;
PAUSE ; display "press return to continue" prompt
+1 NEW DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
+2 SET DIR(0)="EA"
+3 SET DIR("A")="Press <return> to continue "
+4 DO ^DIR
+5 QUIT
+6 ;
ASKEXCEL() ; display "export to excel" prompt
+1 ;
+2 ; returns 1 for Yes, 0 for No, -1 for user exit / timeout
+3 ;
+4 NEW DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
+5 SET DIR(0)="Y"
SET DIR("B")="YES"
+6 SET DIR("A")="Export to Excel (Y/N)"
+7 DO ^DIR
IF $DATA(DIRUT)!$DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT -1
+8 QUIT $SELECT(Y>0:1,1:0)
+9 ;
BALANCE(BILL) ; calculate total balance for the given bill
+1 ;
+2 ; BILL - file 430 ien
+3 ;
+4 ; returns sum of fields 430/71, 430/72, 430/73, 430/74, and 430/75
+5 ;
+6 NEW DATA,RES,Z
+7 SET RES=0
+8 IF BILL>0
Begin DoDot:1
+9 SET DATA=$PIECE($GET(^PRCA(430,BILL,7)),U,1,5)
+10 IF DATA'=""
FOR Z=1:1:5
SET RES=RES+$PIECE(DATA,U,Z)
+11 QUIT
End DoDot:1
+12 QUIT RES