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

RCBEUTR2.m

Go to the documentation of this file.
  1. RCBEUTR2 ;WISC/RFJ - create an exempt transaction ;1 Jun 00
  1. ;;4.5;Accounts Receivable;**153,169,353,377**;Mar 20, 1995;Build 45
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. Q
  1. ;
  1. ;PRCA*4.5*353 Added RCVALL flag parameter to ensure
  1. ; Marshall Cost and Court Cost are used
  1. ; as correct total increase when clearing
  1. ; all associated cost when Principal value
  1. ; goes to zero via a decrease transaction
  1. ;
  1. EXEMPT(RCBILLDA,RCVALUE,RCCOMMNT,RCDATE,RCVALL) ; exempt an intererst/admin charge
  1. ; for a bill. rcvalue = interest ^ admin ^ penalty ^ mf ^ cc
  1. ; for the transaction. rcdate = process date (optional)
  1. ; rcval indicates to also account for marshall cost & court cost in value calc
  1. ; returns transaction number if successful
  1. ;
  1. N RCDRSTRG,RCTRANDA,Y,RCDTOTL,RCDATA7,RCTOTB
  1. ; add the transaction (if added to 433, transaction is locked)
  1. S RCTRANDA=$$ADD433^RCBEUTRA(RCBILLDA,14) I 'RCTRANDA Q 0
  1. ;
  1. ; build dr string
  1. ; transaction date (strip off time)
  1. S RCDRSTRG="11////"_$S($G(RCDATE):$P(RCDATE,"."),1:DT)_";"
  1. ; transaction values
  1. S RCDTOTL=0 S RCDTOTL=$P(RCVALUE,"^")+$P(RCVALUE,"^",2)+$P(RCVALUE,"^",3) ;PRCA*4.5*353
  1. I $G(RCVALL) D ;PRCA*4.5*353
  1. . S RCDTOTL=RCDTOTL+$P(RCVALUE,"^",4)+$P(RCVALUE,"^",5)
  1. . S RCCOMMNT(1)=RCCOMMNT
  1. S RCDRSTRG=RCDRSTRG_"15////"_RCDTOTL_";" ;PRCA*4.5*353
  1. I $P(RCVALUE,"^",1) S RCDRSTRG=RCDRSTRG_"27////"_$P(RCVALUE,"^",1)_";" ;interest
  1. I $P(RCVALUE,"^",2) S RCDRSTRG=RCDRSTRG_"28////"_$P(RCVALUE,"^",2)_";" ;admin
  1. I $P(RCVALUE,"^",3) S RCDRSTRG=RCDRSTRG_"29////"_$P(RCVALUE,"^",3)_";" ;penalty
  1. I $P(RCVALUE,"^",4) S RCDRSTRG=RCDRSTRG_"25////"_$P(RCVALUE,"^",4)_";" ;mf
  1. I $P(RCVALUE,"^",5) S RCDRSTRG=RCDRSTRG_"26////"_$P(RCVALUE,"^",5)_";" ;cc
  1. I $G(RCDATE) S RCDRSTRG=RCDRSTRG_"19////"_RCDATE_";" ;date entered
  1. ;
  1. ; input the fields for the transaction
  1. S Y=$$EDIT433^RCBEUTRA(RCTRANDA,RCDRSTRG) I 'Y L -^PRCA(433,RCTRANDA) Q 0
  1. ;
  1. ; set the comment
  1. I $D(RCCOMMNT(1)) D ADDCOMM^RCBEUTRA(RCTRANDA,.RCCOMMNT)
  1. ;
  1. ; move over 433 from 430 (no principal, just move it)
  1. D FY433^RCBEUTRA(RCTRANDA)
  1. ;
  1. ; mark the transaction as processed
  1. D PROCESS^RCBEUTRA(RCTRANDA)
  1. ;
  1. ;PRCA*4.5*377 - update Repayment Plan with Exemption amount
  1. D UPDBAL^RCRPU1(RCBILLDA,RCTRANDA)
  1. ;
  1. ; update the bill file with the balance of the transaction
  1. D SETBAL^RCBEUBIL(RCTRANDA)
  1. ;
  1. ; if the bill has no balance, close or cancel it
  1. D CLOSEIT^RCBEUTR1(RCBILLDA)
  1. ;
  1. ; clear the lock and return the transaction added
  1. L -^PRCA(433,RCTRANDA)
  1. Q RCTRANDA