1 | PRCHAMY4 ;WISC/DJM-PRINT AMENDMENT,ROUTINE #4 ;12/13/95 2:44 PM
|
---|
2 | V ;;5.1;IFCAP;;Oct 20, 2000
|
---|
3 | ;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
4 | ;
|
---|
5 | E31 ;Change VENDOR
|
---|
6 | N CHANGE,OLD,VEN,LCNT,DATA
|
---|
7 | S CHANGE=0 D LCNT^PRCHPAM5(.LCNT)
|
---|
8 | F S CHANGE=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND,5,CHANGE)) Q:CHANGE'>0 D
|
---|
9 | .S OLD=$G(^PRC(442,PRCHPO,6,PRCHAM,3,CHANGE,1,1,0)),OLD=$P($G(^PRC(440,OLD,0)),U)
|
---|
10 | .S VEN=$P($G(^PRC(442,PRCHPO,1)),U),VEN=$P($G(^PRC(440,VEN,0)),U)
|
---|
11 | .D LINE^PRCHPAM5(.LCNT,2) S DATA="Vendor "_OLD_" has been changed to "_VEN
|
---|
12 | .D DATA^PRCHPAM5(.LCNT,DATA),LCNT1^PRCHPAM5(LCNT)
|
---|
13 | Q
|
---|
14 | ;
|
---|
15 | E32 ;REPLACE P.O. NUMBER
|
---|
16 | N CHANGE,NPO,OPO,LCNT,DATA
|
---|
17 | S CHANGE=0 D LCNT^PRCHPAM5(.LCNT)
|
---|
18 | F S CHANGE=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND,28,CHANGE)) Q:CHANGE'>0 D
|
---|
19 | .S NPO=$P($G(^PRC(442,PRCHPO,23)),U,4),NPO=$P($G(^PRC(442,NPO,0)),U)
|
---|
20 | .S OPO=$P($G(^PRC(442,PRCHPO,0)),U)
|
---|
21 | .D LINE^PRCHPAM5(.LCNT,2) S DATA="Purchase Order number "_OPO_" has been changed to "_NPO
|
---|
22 | .D DATA^PRCHPAM5(.LCNT,DATA),LCNT1^PRCHPAM5(LCNT)
|
---|
23 | Q
|
---|
24 | ;
|
---|
25 | E34 ;AUTHORITY Edit PRINT
|
---|
26 | N CHANGE,CHANGES,OLD,NEW,LCNT,DATA,DT2,I
|
---|
27 | S CHANGE=0 D LCNT^PRCHPAM5(.LCNT)
|
---|
28 | F S CHANGE=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND,3,CHANGE)) Q:CHANGE'>0 D
|
---|
29 | .S CHANGES=^PRC(442,PRCHPO,6,PRCHAM,3,CHANGE,0),OLD=^PRC(442,PRCHPO,6,PRCHAM,3,CHANGE,1,1,0)
|
---|
30 | .S NEW=$P(^PRC(442,PRCHPO,6,PRCHAM,0),U,4)
|
---|
31 | .D LINE^PRCHPAM5(.LCNT,2)
|
---|
32 | .I OLD=0 S DATA=" *ADDED THROUGH AMENDMENT*" D DATA^PRCHPAM5(.LCNT,DATA) D
|
---|
33 | ..S DATA="Authority Edit is",DT2=$P(^PRCD(442.2,NEW,0),U,2) D D DATA^PRCHPAM5(.LCNT,DATA)
|
---|
34 | ...I $L(DATA)+$L(DT2)>239 S DATA=DATA_":" D DATA^PRCHPAM5(.LCNT,DATA) S DATA=DT2 Q
|
---|
35 | ...S DATA=DATA_" "_DT2
|
---|
36 | .I OLD>0 S DATA="Authority Edit " D D DATA^PRCHPAM5(.LCNT,DATA)
|
---|
37 | ..F I=1:1:3 S DT2=$S(I=1:$P(^PRCD(442.2,OLD,0),U,2),I=2:" has been changed to ",I=3:$P(^PRCD(442.2,NEW,0),U,2)) D CHK(.DATA,DT2)
|
---|
38 | .D LCNT1^PRCHPAM5(LCNT)
|
---|
39 | .Q
|
---|
40 | Q
|
---|
41 | CHK(DATA,DT2) ;
|
---|
42 | I $L(DATA)+$L(DT2)<241 S DATA=DATA_DT2 Q
|
---|
43 | D DATA^PRCHPAM5(.LCNT,DATA) S DATA=DT2
|
---|
44 | Q
|
---|