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

RCRJRBDE.m

Go to the documentation of this file.
  1. RCRJRBDE ;WISC/RFJ,TJK-bad debt edit the report ;1 Feb 98
  1. ;;4.5;Accounts Receivable;**101,191,184,239**;Mar 20, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. Q
  1. ;
  1. ;
  1. EDIT ; over-ride values, called from menu option
  1. ;W !!,"This option will allow you to over-ride the current month allowance"
  1. ;W !,"estimate for the Bad Debt Report. If you change the allowance estimate,"
  1. ;W !,"it will change the value sent to FMS (on the last workday of the month).",!
  1. ;
  1. ; - deactivate the over-ride option with patch PRCA*4.5*239
  1. W !!,"This option will no longer allow you to over-ride the current"
  1. W !,"month Bad Debt allowance estimates. These estimates are"
  1. W !,"automatically transmitted to FMS when they are calculated"
  1. W !,"by the AR Data Collector on the third to the last business"
  1. W !,"day of the month.",!!
  1. ;
  1. S DIR(0)="E" D ^DIR K DIR,DIRUT,DUOUT,DTOUT,DIROUT,X,Y
  1. ;
  1. Q
  1. ;
  1. ;
  1. ;
  1. N DIR,X,Y
  1. ;I $E(DT,6,7)'<$$WD3^RCRJRBD D Q
  1. I $E(DT,6,7)<$E($$LDATE^RCRJR(DT)+1,6,7)!($E(DT,6,7)'<$E($$LDAY^RCRJR(DT),6,7)) D Q
  1. . W !,"The Bad Debt Report is submitted to FMS on the next to last workday of the"
  1. . W !,"month. You can only use this option to change the data from the day"
  1. . W !,"after the EOAM cut off date to the next to last workday of the month."
  1. . ; ask to print report
  1. . S DIR(0)="YO",DIR("B")="NO"
  1. . S DIR("A")=" Do you want to print the report for last month"
  1. . W ! D ^DIR
  1. . I Y=1 D PRINT^RCRJRBDR
  1. ;
  1. N CHANGED,D,D0,DA,DATA,DI,DIC,DIE,DQ,DR,RCRJALLO,RCRJFEND,X,Y
  1. F D Q:$G(RCRJFEND)
  1. . ; check to see if report is running
  1. . L +^RC(348.1):5
  1. . I '$T W !,"The Bad Debt Report is currently running or being edit by another user.",!,"Try again later." S RCRJFEND=1 Q
  1. . ;
  1. . S (DIC,DIE)="^RC(348.1,",DIC(0)="QEAM"
  1. . W ! D ^DIC
  1. . I Y<1 L -^RC(348.1) S RCRJFEND=1 Q
  1. . S DA=+Y
  1. . ; store current estimate allowance and show report
  1. . S RCRJALLO=+$P(^RC(348.1,+Y,0),"^",8)
  1. . W !!?20,"This what the CURRENT report looks like:"
  1. . W !?20,"========================================"
  1. . D SHOW(DA)
  1. . W !!,"You now have the option to over-ride the estimated allowance:"
  1. . S DR=".08;" D ^DIE
  1. . L -^RC(348.1)
  1. . ; no changes to data
  1. . I +$P(^RC(348.1,DA,0),"^",8)=RCRJALLO W "...No changes made." Q
  1. . ; set flag to show changes made
  1. . S DR=".1////1;" D ^DIE
  1. . ; show new report
  1. . W !!?20,"This is what the NEW report looks like:"
  1. . W !?20,"======================================="
  1. . D SHOW(DA)
  1. Q
  1. ;
  1. ;
  1. SHOW(DA) ; show the values for entry
  1. S DATA=$G(^RC(348.1,DA,0))
  1. W !!,"Allowance for Bad Debt - SGL ",$P(DATA,"^"),":"
  1. W !,"----------------------------------------------------"
  1. S CHANGED=" " I $P(DATA,"^",10) S CHANGED="**"
  1. W !,"Allowance Estimate for Month",?35,":",$J($P(DATA,"^",8),16,2)," ",CHANGED," (Normally Credit Value)"
  1. W !,"Bad Debt Write-Off FYTD (Plus)",?35,":",$J($P(DATA,"^",9),16,2)," (Normally Debit Value )"
  1. W !,"----------------------------------------------------"
  1. W !,"Transmitted Amount to FMS for Month",?35,":",$J($P(DATA,"^",8)+$P(DATA,"^",9),16,2)," ",CHANGED," (Normally Credit Value)"
  1. I $P(DATA,"^",10) W !?53,"** Changed Locally"
  1. Q