- RCDPRPLU ;WISC/RFJ-receipt profile utilities ;1 Jun 99
- ;;4.5;Accounts Receivable;**114,173**;Mar 20, 1995
- ;;Per VHA Directive 10-93-142, this routine should not be modified.
- Q
- ;
- ;
- CHECKREC(RECTDA) ; check the receipt to stop edit/change if approved
- ; return 0^message to stop edit/change
- ; 1 to continue
- N MESSAGE,RESULT
- ;
- ; closed
- I $P($G(^RCY(344,RECTDA,0)),"^",14)=0 Q "0^Receipt has been PROCESSED to AR and FMS."
- I $$EDILB^RCDPEU(RECTDA)=1,$P($G(^RCY(344,RECTDA,0)),U,6) Q "0^EDI 3rd Party Lockbox deposit type receipt."
- ; lockbox
- ; this screen was removed so sites could hand enter lockbox receipts
- ;I $P($G(^RC(341.1,+$P($G(^RCY(344,RECTDA,0)),"^",4),0)),"^",2)=12 Q "0^Lockbox type receipt."
- ; open
- Q 1
- ;
- ;
- LOCKREC(RECTDA) ; lock the receipt, call only from listmanager options
- ; if receipt not passed, return 2
- I 'RECTDA Q 2
- N RESULT
- S RESULT=1
- L +^RCY(344,RECTDA):5
- I '$T D
- . S VALMSG="Another user is editing the receipt."
- . D WRITE(VALMSG)
- . S RESULT=0
- Q RESULT
- ;
- ;
- WRITE(MESSAGE) ; write message on screen with delay
- N %
- W !,MESSAGE
- W !,"press RETURN to continue: "
- R %:DTIME
- Q
- ;
- ;
- MAILMSG(RCRECTDA,ACTION) ; mail a message to supervisor key holders
- N %,LINE,VALMHDR,VALMSG,XMDUZ,XMZ,YY,XMSUB,XMTEXT,XMY
- K ^TMP($J,"RCDPRPLU")
- S LINE=0
- ;
- ; ---- start build mailman message ----
- D SETLINE("Sent to: PRCAY PAYMENT SUP security key holders")
- D SETLINE(" ")
- ;
- ; build the header line
- D HDR^RCDPRPLM
- F %=1:1 Q:'$D(VALMHDR(%)) D SETLINE(VALMHDR(%))
- ;
- D SETLINE(" ")
- D SETLINE("This receipt was approved and the following action occurred:")
- D SETLINE(" ACTION: "_ACTION)
- D SETLINE(" BY: "_$P(^VA(200,DUZ,0),"^"))
- ; ---- end build mailman message ----
- ;
- S XMSUB="Receipt Processing Audit"
- S XMDUZ="Accounts Receivable Package"
- S XMTEXT="^TMP($J,""RCDPRPLU"","
- S %=0 F S %=$O(^XUSEC("PRCAY PAYMENT SUP",%)) Q:'% S XMY(%)=""
- D ^XMD
- K ^TMP($J,"RCDPRPLU")
- Q
- ;
- ;
- SETLINE(MESSAGE) ; set the line for the mail message
- S LINE=LINE+1
- S ^TMP($J,"RCDPRPLU",LINE)=MESSAGE
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRCDPRPLU 2153 printed Jan 18, 2025@02:47:34 Page 2
- RCDPRPLU ;WISC/RFJ-receipt profile utilities ;1 Jun 99
- +1 ;;4.5;Accounts Receivable;**114,173**;Mar 20, 1995
- +2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
- +3 QUIT
- +4 ;
- +5 ;
- CHECKREC(RECTDA) ; check the receipt to stop edit/change if approved
- +1 ; return 0^message to stop edit/change
- +2 ; 1 to continue
- +3 NEW MESSAGE,RESULT
- +4 ;
- +5 ; closed
- +6 IF $PIECE($GET(^RCY(344,RECTDA,0)),"^",14)=0
- QUIT "0^Receipt has been PROCESSED to AR and FMS."
- +7 IF $$EDILB^RCDPEU(RECTDA)=1
- IF $PIECE($GET(^RCY(344,RECTDA,0)),U,6)
- QUIT "0^EDI 3rd Party Lockbox deposit type receipt."
- +8 ; lockbox
- +9 ; this screen was removed so sites could hand enter lockbox receipts
- +10 ;I $P($G(^RC(341.1,+$P($G(^RCY(344,RECTDA,0)),"^",4),0)),"^",2)=12 Q "0^Lockbox type receipt."
- +11 ; open
- +12 QUIT 1
- +13 ;
- +14 ;
- LOCKREC(RECTDA) ; lock the receipt, call only from listmanager options
- +1 ; if receipt not passed, return 2
- +2 IF 'RECTDA
- QUIT 2
- +3 NEW RESULT
- +4 SET RESULT=1
- +5 LOCK +^RCY(344,RECTDA):5
- +6 IF '$TEST
- Begin DoDot:1
- +7 SET VALMSG="Another user is editing the receipt."
- +8 DO WRITE(VALMSG)
- +9 SET RESULT=0
- End DoDot:1
- +10 QUIT RESULT
- +11 ;
- +12 ;
- WRITE(MESSAGE) ; write message on screen with delay
- +1 NEW %
- +2 WRITE !,MESSAGE
- +3 WRITE !,"press RETURN to continue: "
- +4 READ %:DTIME
- +5 QUIT
- +6 ;
- +7 ;
- MAILMSG(RCRECTDA,ACTION) ; mail a message to supervisor key holders
- +1 NEW %,LINE,VALMHDR,VALMSG,XMDUZ,XMZ,YY,XMSUB,XMTEXT,XMY
- +2 KILL ^TMP($JOB,"RCDPRPLU")
- +3 SET LINE=0
- +4 ;
- +5 ; ---- start build mailman message ----
- +6 DO SETLINE("Sent to: PRCAY PAYMENT SUP security key holders")
- +7 DO SETLINE(" ")
- +8 ;
- +9 ; build the header line
- +10 DO HDR^RCDPRPLM
- +11 FOR %=1:1
- if '$DATA(VALMHDR(%))
- QUIT
- DO SETLINE(VALMHDR(%))
- +12 ;
- +13 DO SETLINE(" ")
- +14 DO SETLINE("This receipt was approved and the following action occurred:")
- +15 DO SETLINE(" ACTION: "_ACTION)
- +16 DO SETLINE(" BY: "_$PIECE(^VA(200,DUZ,0),"^"))
- +17 ; ---- end build mailman message ----
- +18 ;
- +19 SET XMSUB="Receipt Processing Audit"
- +20 SET XMDUZ="Accounts Receivable Package"
- +21 SET XMTEXT="^TMP($J,""RCDPRPLU"","
- +22 SET %=0
- FOR
- SET %=$ORDER(^XUSEC("PRCAY PAYMENT SUP",%))
- if '%
- QUIT
- SET XMY(%)=""
- +23 DO ^XMD
- +24 KILL ^TMP($JOB,"RCDPRPLU")
- +25 QUIT
- +26 ;
- +27 ;
- SETLINE(MESSAGE) ; set the line for the mail message
- +1 SET LINE=LINE+1
- +2 SET ^TMP($JOB,"RCDPRPLU",LINE)=MESSAGE
- +3 QUIT