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

RCDPRPLU.m

Go to the documentation of this file.
  1. RCDPRPLU ;WISC/RFJ-receipt 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. CHECKREC(RECTDA) ; check the receipt to stop edit/change if approved
  1. ; return 0^message to stop edit/change
  1. ; 1 to continue
  1. N MESSAGE,RESULT
  1. ;
  1. ; closed
  1. I $P($G(^RCY(344,RECTDA,0)),"^",14)=0 Q "0^Receipt has been PROCESSED to AR and FMS."
  1. I $$EDILB^RCDPEU(RECTDA)=1,$P($G(^RCY(344,RECTDA,0)),U,6) Q "0^EDI 3rd Party Lockbox deposit type receipt."
  1. ; lockbox
  1. ; this screen was removed so sites could hand enter lockbox receipts
  1. ;I $P($G(^RC(341.1,+$P($G(^RCY(344,RECTDA,0)),"^",4),0)),"^",2)=12 Q "0^Lockbox type receipt."
  1. ; open
  1. Q 1
  1. ;
  1. ;
  1. LOCKREC(RECTDA) ; lock the receipt, call only from listmanager options
  1. ; if receipt not passed, return 2
  1. I 'RECTDA Q 2
  1. N RESULT
  1. S RESULT=1
  1. L +^RCY(344,RECTDA):5
  1. I '$T D
  1. . S VALMSG="Another user is editing the receipt."
  1. . D WRITE(VALMSG)
  1. . S RESULT=0
  1. Q RESULT
  1. ;
  1. ;
  1. WRITE(MESSAGE) ; write message on screen with delay
  1. N %
  1. W !,MESSAGE
  1. W !,"press RETURN to continue: "
  1. R %:DTIME
  1. Q
  1. ;
  1. ;
  1. MAILMSG(RCRECTDA,ACTION) ; mail a message to supervisor key holders
  1. N %,LINE,VALMHDR,VALMSG,XMDUZ,XMZ,YY,XMSUB,XMTEXT,XMY
  1. K ^TMP($J,"RCDPRPLU")
  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^RCDPRPLM
  1. F %=1:1 Q:'$D(VALMHDR(%)) D SETLINE(VALMHDR(%))
  1. ;
  1. D SETLINE(" ")
  1. D SETLINE("This receipt was approved 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="Receipt Processing Audit"
  1. S XMDUZ="Accounts Receivable Package"
  1. S XMTEXT="^TMP($J,""RCDPRPLU"","
  1. S %=0 F S %=$O(^XUSEC("PRCAY PAYMENT SUP",%)) Q:'% S XMY(%)=""
  1. D ^XMD
  1. K ^TMP($J,"RCDPRPLU")
  1. Q
  1. ;
  1. ;
  1. SETLINE(MESSAGE) ; set the line for the mail message
  1. S LINE=LINE+1
  1. S ^TMP($J,"RCDPRPLU",LINE)=MESSAGE
  1. Q