source: WorldVistAEHR/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCBEUTR2.m@ 1006

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1RCBEUTR2 ;WISC/RFJ-create an exempt transaction ;1 Jun 00
2 ;;4.5;Accounts Receivable;**153,169**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6 ;
7EXEMPT(RCBILLDA,RCVALUE,RCCOMMNT,RCDATE) ; exempt an intererst/admin charge
8 ; for a bill. rcvalue = interest ^ admin ^ penalty ^ mf ^ cc
9 ; for the transaction. rcdate = process date (optional)
10 ; returns transaction number if successful
11 ;
12 N RCDRSTRG,RCTRANDA,Y
13 ; add the transaction (if added to 433, transaction is locked)
14 S RCTRANDA=$$ADD433^RCBEUTRA(RCBILLDA,14) I 'RCTRANDA Q 0
15 ;
16 ; build dr string
17 ; transaction date (strip off time)
18 S RCDRSTRG="11////"_$S($G(RCDATE):$P(RCDATE,"."),1:DT)_";"
19 ; transaction values
20 S RCDRSTRG=RCDRSTRG_"15////"_($P(RCVALUE,"^")+$P(RCVALUE,"^",2)+$P(RCVALUE,"^",3))_";"
21 I $P(RCVALUE,"^",1) S RCDRSTRG=RCDRSTRG_"27////"_$P(RCVALUE,"^",1)_";" ;interest
22 I $P(RCVALUE,"^",2) S RCDRSTRG=RCDRSTRG_"28////"_$P(RCVALUE,"^",2)_";" ;admin
23 I $P(RCVALUE,"^",3) S RCDRSTRG=RCDRSTRG_"29////"_$P(RCVALUE,"^",3)_";" ;penalty
24 I $P(RCVALUE,"^",4) S RCDRSTRG=RCDRSTRG_"25////"_$P(RCVALUE,"^",4)_";" ;mf
25 I $P(RCVALUE,"^",5) S RCDRSTRG=RCDRSTRG_"26////"_$P(RCVALUE,"^",5)_";" ;cc
26 I $G(RCDATE) S RCDRSTRG=RCDRSTRG_"19////"_RCDATE_";" ;date entered
27 ;
28 ; input the fields for the transaction
29 S Y=$$EDIT433^RCBEUTRA(RCTRANDA,RCDRSTRG) I 'Y L -^PRCA(433,RCTRANDA) Q 0
30 ;
31 ; set the comment
32 I $D(RCCOMMNT(1)) D ADDCOMM^RCBEUTRA(RCTRANDA,.RCCOMMNT)
33 ;
34 ; move over 433 from 430 (no principal, just move it)
35 D FY433^RCBEUTRA(RCTRANDA)
36 ;
37 ; mark the transaction as processed
38 D PROCESS^RCBEUTRA(RCTRANDA)
39 ;
40 ; update the bill file with the balance of the transaction
41 D SETBAL^RCBEUBIL(RCTRANDA)
42 ;
43 ; if the bill has no balance, close or cancel it
44 D CLOSEIT^RCBEUTR1(RCBILLDA)
45 ;
46 ; clear the lock and return the transaction added
47 L -^PRCA(433,RCTRANDA)
48 Q RCTRANDA
Note: See TracBrowser for help on using the repository browser.