source: WorldVistAEHR/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCBMILLD.m@ 841

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

initial load of WorldVistAEHR

File size: 2.0 KB
RevLine 
[613]1RCBMILLD ;WISC/RFJ-millennium bill (calculations internal set tmp) ; 27 Jun 2001 11:10 AM
2 ;;4.5;Accounts Receivable;**170**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6 ;
7SETTEMP(TYPE,PRINCPAL,AMTOMCCF,AMTOHSIF,PAIDMCCF,PAIDHSIF) ; build the temp global
8 ; called internally by the routine rcbmillc
9 ;
10 ; type = type of transaction
11 ; princpal = principal amount of transaction
12 ; amtomccf = expected amount calculated going to mccf
13 ; amtohsif = expected amount calculated going to hsif
14 ; paidmccf = amount already paid to mccf for the payment
15 ; paidhsif = amount already paid to hsif for the payment
16 ;
17 ; if not a payment, set running balance of what is owed to mccf and hsif
18 I TYPE'="P" D
19 . S RCTOTAL("OWED TO MCCF")=RCTOTAL("OWED TO MCCF")+AMTOMCCF("BEFORE EFF DATE")+AMTOMCCF("AFTER EFF DATE")
20 . S RCTOTAL("OWED TO HSIF")=RCTOTAL("OWED TO HSIF")+AMTOHSIF
21 ;
22 ; if a payment, add amount paid to mccf and hsif
23 I TYPE="P" D
24 . S RCTOTAL("PAID TO MCCF")=RCTOTAL("PAID TO MCCF")+AMTOMCCF("BEFORE EFF DATE")+AMTOMCCF("AFTER EFF DATE")
25 . S RCTOTAL("PAID TO HSIF")=RCTOTAL("PAID TO HSIF")+AMTOHSIF
26 ;
27 ; build total owed to hsif for bill
28 S RCBALANC("HSIF")=RCBALANC("HSIF")+AMTOHSIF
29 ;
30 ; build total owed to mccf for bill
31 S RCBALANC("MCCF BEFORE EFF DATE")=RCBALANC("MCCF BEFORE EFF DATE")+AMTOMCCF("BEFORE EFF DATE")
32 S RCBALANC("MCCF AFTER EFF DATE")=RCBALANC("MCCF AFTER EFF DATE")+AMTOMCCF("AFTER EFF DATE")
33 ;
34 ; build a tmp array of increase and decrease adjustment transactions
35 ; set tmp = transaction type 'D'ecrease or 'I"ncrease
36 ; principal amount of transaction
37 ; amount owed to mccf
38 ; amount owed to hsif
39 ; for payment, amount already paid to mccf
40 ; for payment, amount already paid to hsif
41 S ^TMP($J,"RCBMILLDATA",RCBILLDA,RCTRANDA)=TYPE_"^"_PRINCPAL_"^"_(AMTOMCCF("BEFORE EFF DATE")+AMTOMCCF("AFTER EFF DATE"))_"^"_AMTOHSIF_"^"_$G(PAIDMCCF)_"^"_$G(PAIDHSIF)
42 Q
Note: See TracBrowser for help on using the repository browser.