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

RCDPDPLU.m

Go to the documentation of this file.
  1. RCDPDPLU ;WISC/RFJ-deposit profile utilities ;1 Jun 99
  1. ;;4.5;Accounts Receivable;**114,173**;Mar 20, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. Q
  1. ;
  1. ;
  1. CHECKDEP(DEPTDA) ; check the deposit to stop edit/change if approved
  1. ; return 0^message to stop edit/change
  1. ; 1 to continue
  1. N MESSAGE,RECTDA,RESULT
  1. ;
  1. ; already confirmed, status = 3 confirmed
  1. I $P($G(^RCY(344.1,DEPTDA,0)),"^",12)=3 Q "0^Deposit has been confirmed."
  1. ; lockbox
  1. S RECTDA=$O(^RCY(344,"AD",$P(^RCY(344.1,DEPTDA,0),"^"),0))
  1. I RECTDA,$P($G(^RC(341.1,+$P($G(^RCY(344,RECTDA,0)),"^",4),0)),"^",2)=12 Q "0^Lockbox type deposit."
  1. I RECTDA,$$EDILB^RCDPEU(RECTDA)=1 Q "0^EDI Lockbox type deposit."
  1. ; open
  1. Q 1
  1. ;
  1. ;
  1. LOCKDEP(DEPTDA) ; lock the deposit, call only from listmanager options
  1. ; if deposit not passed, return 2
  1. I 'DEPTDA Q 2
  1. N RESULT
  1. S RESULT=1
  1. L +^RCY(344.1,DEPTDA):5
  1. I '$T D
  1. . S VALMSG="Another user is editing the deposit."
  1. . D WRITE^RCDPRPLU(VALMSG)
  1. . S RESULT=0
  1. Q RESULT
  1. ;
  1. ;
  1. MAILMSG(RCDEPTDA,ACTION) ; mail a message to supervisor key holders
  1. N %,LINE,VALMHDR,VALMSG,XMDUZ,XMZ,YY
  1. K ^TMP($J,"RCDPDPLU")
  1. S LINE=0
  1. ;
  1. ; ---- start build mailman message ----
  1. D SETLINE("Sent to: PRCAY PAYMENT SUP security key holders")
  1. D SETLINE(" ")
  1. ;
  1. ; build the header line
  1. D HDR^RCDPDPLM
  1. F %=1:1 Q:'$D(VALMHDR(%)) D SETLINE(VALMHDR(%))
  1. ;
  1. D SETLINE(" ")
  1. D SETLINE("This deposit was confirmed and the following action occurred:")
  1. D SETLINE(" ACTION: "_ACTION)
  1. D SETLINE(" BY: "_$P(^VA(200,DUZ,0),"^"))
  1. ; ---- end build mailman message ----
  1. ;
  1. S XMSUB="Deposit Processing Audit"
  1. S XMDUZ="Accounts Receivable Package"
  1. S XMTEXT="^TMP($J,""RCDPDPLU"","
  1. S %=0 F S %=$O(^XUSEC("PRCAY PAYMENT SUP",%)) Q:'% S XMY(%)=""
  1. D ^XMD
  1. K ^TMP($J,"RCDPDPLU")
  1. Q
  1. ;
  1. ;
  1. SETLINE(MESSAGE) ; set the line for the mail message
  1. S LINE=LINE+1
  1. S ^TMP($J,"RCDPDPLU",LINE)=MESSAGE
  1. Q