source: FOIAVistA/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/PRCATR1.m@ 794

Last change on this file since 794 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1PRCATR1 ; GENERATED FROM 'PRCAP REPAYMENT' PRINT TEMPLATE (#404) ; 06/27/96 ; (FILE 430, MARGIN=80)
2 G BEGIN
3N W !
4T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
5 S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
6 Q
7DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
8 I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
9 W Y Q
10M D @DIXX
11 Q
12BEGIN ;
13 S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
14 I $D(DXS)<9 F X=0:0 S X=$O(^DIPT(404,"DXS",X)) Q:'X S Y=$O(^(X,"")) F X=X:0 Q:Y="" S DXS(X,Y)=^(Y),Y=$O(^(Y))
15 D N:$X>0 Q:'DN W ?0 W "BILL NO.: "
16 S X=$G(^PRCA(430,D0,0)) D N:$X>11 Q:'DN W ?11,$E($P(X,U,1),1,30)
17 D N:$X>34 Q:'DN W ?34 W "DEBTOR:"
18 D N:$X>44 Q:'DN W ?44 S Y=$P(X,U,9) S C=$P(^DD(430,9,0),U,2) D Y^DIQ:Y S C="," W $E(Y,1,30)
19 D N:$X>0 Q:'DN W ?0 W "CURRENT BALANCE: "
20 D N:$X>18 Q:'DN W ?18 S Y(430,11,1)=$S($D(^PRCA(430,D0,7)):^(7),1:"") S X=$P(Y(430,11,1),U,1)+$P(Y(430,11,1),U,2)+$P(Y(430,11,1),U,3)+$P(Y(430,11,1),U,4)+$P(Y(430,11,1),U,5) S X=$J(X,0,2) W $E(X,1,12) K Y(430,11)
21 D N:$X>34 Q:'DN W ?34 W "REPAYMENT AMOUNT: "
22 S X=$G(^PRCA(430,D0,4)) D N:$X>54 Q:'DN W ?54 S Y=$P(X,U,3) W:Y]"" $J(Y,10,2)
23 D T Q:'DN D N D N:$X>24 Q:'DN W ?24 W "REPAYMENT SCHEDULE"
24 D N:$X>0 Q:'DN W ?0 S X="-",DIP(1)=X S X=72,X1=DIP(1) S %=X1 X:%]"" "F X=X:0 S %=%_X1 Q:$L(%)>X" S X=$E(%,1,X) K DIP K:DN Y W X
25 D N:$X>0 Q:'DN W ?0 W "DUE"
26 D N:$X>17 Q:'DN W ?17 W "PAYMENT"
27 D N:$X>34 Q:'DN W ?34 W "SEND PAYMENT"
28 D N:$X>54 Q:'DN W ?54 W "DATE SENT PAYMENT"
29 D N:$X>0 Q:'DN W ?0 W "DATE"
30 D N:$X>17 Q:'DN W ?17 W "RECEIVED"
31 D N:$X>34 Q:'DN W ?34 W "STATEMENT"
32 D N:$X>54 Q:'DN W ?54 W "STATEMENT"
33 D N:$X>0 Q:'DN W ?0 S X="-",DIP(1)=X S X=72,X1=DIP(1) S %=X1 X:%]"" "F X=X:0 S %=%_X1 Q:$L(%)>X" S X=$E(%,1,X) K DIP K:DN Y W X
34 S I(1)=5,J(1)=430.051 F D1=0:0 Q:$O(^PRCA(430,D0,5,D1))'>0 X:$D(DSC(430.051)) DSC(430.051) S D1=$O(^(D1)) Q:D1'>0 D:$X>11 T Q:'DN D A1
35 G A1R
36A1 ;
37 S X=$G(^PRCA(430,D0,5,D1,0)) D N:$X>0 Q:'DN W ?0 S Y=$P(X,U,1) D DT
38 D N:$X>17 Q:'DN W ?17 S Y=$P(X,U,2) W:Y]"" $S($D(DXS(1,Y)):DXS(1,Y),1:Y)
39 D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,3) W:Y]"" $S($D(DXS(2,Y)):DXS(2,Y),1:Y)
40 D N:$X>54 Q:'DN W ?54 S Y=$P(X,U,5) D DT
41 Q
42A1R ;
43 D N:$X>0 Q:'DN W ?0 S X="-",DIP(1)=X S X=72,X1=DIP(1) S %=X1 X:%]"" "F X=X:0 S %=%_X1 Q:$L(%)>X" S X=$E(%,1,X) K DIP K:DN Y W X
44 K Y
45 Q
46HEAD ;
47 W !,"--------------------------------------------------------------------------------",!!
Note: See TracBrowser for help on using the repository browser.