source: FOIAVistA/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCRJRBDE.m@ 1401

Last change on this file since 1401 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1RCRJRBDE ;WISC/RFJ,TJK-bad debt edit the report ;1 Feb 98
2 ;;4.5;Accounts Receivable;**101,191,184,239**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6 ;
7EDIT ; over-ride values, called from menu option
8 ;W !!,"This option will allow you to over-ride the current month allowance"
9 ;W !,"estimate for the Bad Debt Report. If you change the allowance estimate,"
10 ;W !,"it will change the value sent to FMS (on the last workday of the month).",!
11 ;
12 ; - deactivate the over-ride option with patch PRCA*4.5*239
13 W !!,"This option will no longer allow you to over-ride the current"
14 W !,"month Bad Debt allowance estimates. These estimates are"
15 W !,"automatically transmitted to FMS when they are calculated"
16 W !,"by the AR Data Collector on the third to the last business"
17 W !,"day of the month.",!!
18 ;
19 S DIR(0)="E" D ^DIR K DIR,DIRUT,DUOUT,DTOUT,DIROUT,X,Y
20 ;
21 Q
22 ;
23 ;
24 ;
25 N DIR,X,Y
26 ;I $E(DT,6,7)'<$$WD3^RCRJRBD D Q
27 I $E(DT,6,7)<$E($$LDATE^RCRJR(DT)+1,6,7)!($E(DT,6,7)'<$E($$LDAY^RCRJR(DT),6,7)) D Q
28 . W !,"The Bad Debt Report is submitted to FMS on the next to last workday of the"
29 . W !,"month. You can only use this option to change the data from the day"
30 . W !,"after the EOAM cut off date to the next to last workday of the month."
31 . ; ask to print report
32 . S DIR(0)="YO",DIR("B")="NO"
33 . S DIR("A")=" Do you want to print the report for last month"
34 . W ! D ^DIR
35 . I Y=1 D PRINT^RCRJRBDR
36 ;
37 N CHANGED,D,D0,DA,DATA,DI,DIC,DIE,DQ,DR,RCRJALLO,RCRJFEND,X,Y
38 F D Q:$G(RCRJFEND)
39 . ; check to see if report is running
40 . L +^RC(348.1):5
41 . I '$T W !,"The Bad Debt Report is currently running or being edit by another user.",!,"Try again later." S RCRJFEND=1 Q
42 . ;
43 . S (DIC,DIE)="^RC(348.1,",DIC(0)="QEAM"
44 . W ! D ^DIC
45 . I Y<1 L -^RC(348.1) S RCRJFEND=1 Q
46 . S DA=+Y
47 . ; store current estimate allowance and show report
48 . S RCRJALLO=+$P(^RC(348.1,+Y,0),"^",8)
49 . W !!?20,"This what the CURRENT report looks like:"
50 . W !?20,"========================================"
51 . D SHOW(DA)
52 . W !!,"You now have the option to over-ride the estimated allowance:"
53 . S DR=".08;" D ^DIE
54 . L -^RC(348.1)
55 . ; no changes to data
56 . I +$P(^RC(348.1,DA,0),"^",8)=RCRJALLO W "...No changes made." Q
57 . ; set flag to show changes made
58 . S DR=".1////1;" D ^DIE
59 . ; show new report
60 . W !!?20,"This is what the NEW report looks like:"
61 . W !?20,"======================================="
62 . D SHOW(DA)
63 Q
64 ;
65 ;
66SHOW(DA) ; show the values for entry
67 S DATA=$G(^RC(348.1,DA,0))
68 W !!,"Allowance for Bad Debt - SGL ",$P(DATA,"^"),":"
69 W !,"----------------------------------------------------"
70 S CHANGED=" " I $P(DATA,"^",10) S CHANGED="**"
71 W !,"Allowance Estimate for Month",?35,":",$J($P(DATA,"^",8),16,2)," ",CHANGED," (Normally Credit Value)"
72 W !,"Bad Debt Write-Off FYTD (Plus)",?35,":",$J($P(DATA,"^",9),16,2)," (Normally Debit Value )"
73 W !,"----------------------------------------------------"
74 W !,"Transmitted Amount to FMS for Month",?35,":",$J($P(DATA,"^",8)+$P(DATA,"^",9),16,2)," ",CHANGED," (Normally Credit Value)"
75 I $P(DATA,"^",10) W !?53,"** Changed Locally"
76 Q
Note: See TracBrowser for help on using the repository browser.