Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RCBMILLD

RCBMILLD.m

Go to the documentation of this file.
  1. RCBMILLD ;WISC/RFJ-millennium bill (calculations internal set tmp) ; 27 Jun 2001 11:10 AM
  1. ;;4.5;Accounts Receivable;**170**;Mar 20, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. Q
  1. ;
  1. ;
  1. SETTEMP(TYPE,PRINCPAL,AMTOMCCF,AMTOHSIF,PAIDMCCF,PAIDHSIF) ; build the temp global
  1. ; called internally by the routine rcbmillc
  1. ;
  1. ; type = type of transaction
  1. ; princpal = principal amount of transaction
  1. ; amtomccf = expected amount calculated going to mccf
  1. ; amtohsif = expected amount calculated going to hsif
  1. ; paidmccf = amount already paid to mccf for the payment
  1. ; paidhsif = amount already paid to hsif for the payment
  1. ;
  1. ; if not a payment, set running balance of what is owed to mccf and hsif
  1. I TYPE'="P" D
  1. . S RCTOTAL("OWED TO MCCF")=RCTOTAL("OWED TO MCCF")+AMTOMCCF("BEFORE EFF DATE")+AMTOMCCF("AFTER EFF DATE")
  1. . S RCTOTAL("OWED TO HSIF")=RCTOTAL("OWED TO HSIF")+AMTOHSIF
  1. ;
  1. ; if a payment, add amount paid to mccf and hsif
  1. I TYPE="P" D
  1. . S RCTOTAL("PAID TO MCCF")=RCTOTAL("PAID TO MCCF")+AMTOMCCF("BEFORE EFF DATE")+AMTOMCCF("AFTER EFF DATE")
  1. . S RCTOTAL("PAID TO HSIF")=RCTOTAL("PAID TO HSIF")+AMTOHSIF
  1. ;
  1. ; build total owed to hsif for bill
  1. S RCBALANC("HSIF")=RCBALANC("HSIF")+AMTOHSIF
  1. ;
  1. ; build total owed to mccf for bill
  1. S RCBALANC("MCCF BEFORE EFF DATE")=RCBALANC("MCCF BEFORE EFF DATE")+AMTOMCCF("BEFORE EFF DATE")
  1. S RCBALANC("MCCF AFTER EFF DATE")=RCBALANC("MCCF AFTER EFF DATE")+AMTOMCCF("AFTER EFF DATE")
  1. ;
  1. ; build a tmp array of increase and decrease adjustment transactions
  1. ; set tmp = transaction type 'D'ecrease or 'I"ncrease
  1. ; principal amount of transaction
  1. ; amount owed to mccf
  1. ; amount owed to hsif
  1. ; for payment, amount already paid to mccf
  1. ; for payment, amount already paid to hsif
  1. S ^TMP($J,"RCBMILLDATA",RCBILLDA,RCTRANDA)=TYPE_"^"_PRINCPAL_"^"_(AMTOMCCF("BEFORE EFF DATE")+AMTOMCCF("AFTER EFF DATE"))_"^"_AMTOHSIF_"^"_$G(PAIDMCCF)_"^"_$G(PAIDHSIF)
  1. Q