source: FOIAVistA/tag/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRPIXB.m@ 1764

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1RMPRPIXB ;HINCIO/ODJ - SUB TRANSACTION FILE 661.69 APIs ;3/8/01
2 ;;3.0;PROSTHETICS;**61**;Feb 09, 1996
3 Q
4 ;
5 ; CRE - Create a stock reconciliation gain/loss record (661.69)
6CRE(RMPR6) ;
7 N RMPRERR,RMPRFDA,RMPRFME,RMPRIEN,X,Y,DA
8 S RMPRERR=0
9 S RMPRFDA(661.69,"+1,",.01)=RMPR6("TRANS IEN")
10 S RMPRFDA(661.69,"+1,",2)=RMPR6("GAIN/LOSS")
11 S RMPRFDA(661.69,"+1,",3)=RMPR6("GAIN/LOSS VALUE")
12 D UPDATE^DIE("","RMPRFDA","RMPRIEN","RMPRFME")
13 I $D(RMPRFME) S RMPRERR=99 G CREX
14CREX Q RMPRERR
15 ;
16 ; UPD - Update a stock reconciliation gain/loss record
17UPD(RMPR69) ;
18 N RMPRERR,RMPRFDA,RMPRIEN,RMPRFME,X,Y,DA
19 S RMPRERR=0
20 S RMPRIEN=$O(^RMPR(661.69,"B",RMPR69("TRANS IEN"),""))
21 S RMPRIEN=RMPRIEN_","
22 S:$D(RMPR69("GAIN/LOSS")) RMPRFDA(661.69,RMPRIEN,2)=RMPR69("GAIN/LOSS")
23 S:$D(RMPR69("GAIN/LOSS VALUE")) RMPRFDA(661.69,RMPRIEN,3)=RMPR69("GAIN/LOSS VALUE")
24 D:$D(RMPRFDA) FILE^DIE("","RMPRFDA","RMPRFME")
25 I $D(RMPRFME) S RMPRERR=3
26UPDX Q RMPRERR
27 ;
28 ; GET - Get a stock reconciliation gain/loss record
29GET(RMPR6) ;
30 N RMPRERR,RMPRFME,RMPROUP,RMPRIEN,X,Y,DA
31 S RMPRERR=0
32 I $G(RMPR6("TRANS IEN"))="" S RMPRERR=1 G GETX
33 S RMPRIEN=$O(^RMPR(661.69,"B",RMPR6("TRANS IEN"),""))
34 I RMPRIEN="" S RMPRERR=1 G GETX
35 S RMPR6("IEN")=RMPRIEN
36 S RMPRIEN=RMPRIEN_","
37 D GETS^DIQ(661.69,RMPRIEN,"*","","RMPROUP","RMPRFME")
38 I $D(RMPRFME) S RMPRERR=1 G GETX
39 S RMPR6("GAIN/LOSS")=RMPROUP(661.69,RMPRIEN,2)
40 S RMPR6("GAIN/LOSS VALUE")=RMPROUP(661.69,RMPRIEN,3)
41GETX Q RMPRERR
Note: See TracBrowser for help on using the repository browser.