[613] | 1 | PRCHAMY1 ;WISC/DJM-PRINT AMENDMENT ;9/21/95 10:42 AM
|
---|
| 2 | V ;;5.1;IFCAP;**21**;Oct 20, 2000
|
---|
| 3 | ;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
| 4 | ;
|
---|
| 5 | START(PRCHPO,PRCHAM) ;PRCHPO IS 442 INTERNAL ENTRY NUMBER FOR RECORD BEING AMENDED.
|
---|
| 6 | ;PRCHAM IS IEN AMENDMENT MULTIPLE WITHIN PRCHPO BEING AMENDED.
|
---|
| 7 | ;FIND OUT WHAT TYPES OF AMENDMENTS HAVE BEEN DONE TO BE ABLE TO
|
---|
| 8 | ;DETERMINE WHAT TO PRINT OUT.
|
---|
| 9 | N AMEND,GOTO
|
---|
| 10 | S AMEND=0 F S AMEND=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND)) Q:AMEND'>0 S GOTO="E"_+AMEND_"^PRCHAMY1" D @GOTO
|
---|
| 11 | Q
|
---|
| 12 | ;
|
---|
| 13 | E20 ;SHIP TO Edit
|
---|
| 14 | Q
|
---|
| 15 | E21 ;LINE ITEM Add
|
---|
| 16 | N FIELD,CHANGE,CHANGES,OLD,ITEM,ITEM0,ITEM1,LCNT,DATA,I,UOP
|
---|
| 17 | S FIELD=0 K ITEM D LCNT^PRCHPAM5(.LCNT)
|
---|
| 18 | F S FIELD=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND,FIELD)) Q:FIELD'>0 D
|
---|
| 19 | .S CHANGE=0 F S CHANGE=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND,FIELD,CHANGE)) Q:CHANGE'>0 D
|
---|
| 20 | ..S CHANGES=$G(^PRC(442,PRCHPO,6,PRCHAM,3,CHANGE,0)),OLD=$G(^PRC(442,PRCHPO,6,PRCHAM,3,CHANGE,1,1,0))
|
---|
| 21 | ..S ITEM=$P(CHANGES,U,4) Q:$D(ITEM(ITEM)) S ITEM(ITEM)=1
|
---|
| 22 | ..S ITEM0=$G(^PRC(442,PRCHPO,2,ITEM,0))
|
---|
| 23 | ..I ITEM0="" Q
|
---|
| 24 | ..I $P(ITEM0,U,2)=0,$P(ITEM0,U,9)=0 Q
|
---|
| 25 | ..S ITEM1=$G(^PRC(442,PRCHPO,2,ITEM,1,1,0))
|
---|
| 26 | ..D LINE^PRCHPAM5(.LCNT,2) S DATA=" *ADDED THROUGH AMENDMENT*" D DATA^PRCHPAM5(.LCNT,DATA)
|
---|
| 27 | ..S DATA="Item No. "_$P(ITEM0,U)_" Item Master File No. "
|
---|
| 28 | ..S DATA=DATA_$P(ITEM0,U,5)_" BOC: "_$P(ITEM0,U,4)
|
---|
| 29 | ..S DATA=DATA_" CONTRACT: "_$P($G(^PRC(442,PRCHPO,2,ITEM,2)),U,2)
|
---|
| 30 | ..D DATA^PRCHPAM5(.LCNT,DATA)
|
---|
| 31 | ..D NEW^PRCHAMY3
|
---|
| 32 | ..S UOP=$S($P(ITEM0,U,3)>0:$P($G(^PRCD(420.5,$P(ITEM0,U,3),0)),U),1:"")
|
---|
| 33 | ..S DATA=" Items per "_UOP_": "_$P(ITEM0,U,12)
|
---|
| 34 | ..F I=1:1:26-$L(DATA) S DATA=DATA_" "
|
---|
| 35 | ..S DATA=DATA_"NSN: "_$P(ITEM0,U,13) D DATA^PRCHPAM5(.LCNT,DATA)
|
---|
| 36 | ..I $P(ITEM0,U,6)]"" S DATA=" STK#: "_$P(ITEM0,U,6) D DATA^PRCHPAM5(.LCNT,DATA)
|
---|
| 37 | ..S UOP=$S($P(ITEM0,U,3)>0:$P($G(^PRCD(420.5,$P(ITEM0,U,3),0)),U),1:"")
|
---|
| 38 | ..S DATA=" "_$P(ITEM0,U,2)_" "_UOP_" at $"_$J($P(ITEM0,U,9),12,4)_" = $"_$J($P(ITEM0,U,2)*$P(ITEM0,U,9),9,2)
|
---|
| 39 | ..D DATA^PRCHPAM5(.LCNT,DATA),LCNT1^PRCHPAM5(LCNT)
|
---|
| 40 | Q
|
---|
| 41 | ;
|
---|
| 42 | E22 ;LINE ITEM Delete
|
---|
| 43 | G E22^PRCHAMY2
|
---|
| 44 | ;
|
---|
| 45 | E23 ;LINE ITEM Edit
|
---|
| 46 | G E23^PRCHAMY2
|
---|
| 47 | ;
|
---|
| 48 | E24 ;SOURCE CODE Edit
|
---|
| 49 | Q
|
---|
| 50 | ;
|
---|
| 51 | E25 ;Edit MAIL INVOICE TO
|
---|
| 52 | Q
|
---|
| 53 | ;
|
---|
| 54 | E26 ;Edit METHOD OF PAYMENT
|
---|
| 55 | Q
|
---|
| 56 | ;
|
---|
| 57 | E27 ;ADMINISTRATIVE CERTIFICATION Add
|
---|
| 58 | Q
|
---|
| 59 | ;
|
---|
| 60 | E28 ;ADMINISTRATIVE CERTIFICATION Delete
|
---|
| 61 | Q
|
---|
| 62 | ;
|
---|
| 63 | E29 ;EST. SHIPPING Edit
|
---|
| 64 | G E29^PRCHAMY3
|
---|
| 65 | ;
|
---|
| 66 | E30 ;F.C.P. Edit
|
---|
| 67 | Q
|
---|
| 68 | ;
|
---|
| 69 | E31 ;Change VENDOR
|
---|
| 70 | G E31^PRCHAMY4
|
---|
| 71 | ;
|
---|
| 72 | E32 ;REPLACE P.O. NUMBER
|
---|
| 73 | G E32^PRCHAMY4
|
---|
| 74 | ;
|
---|
| 75 | E33 ;PROMPT PAYMENT Edit
|
---|
| 76 | Q
|
---|
| 77 | ;
|
---|
| 78 | E34 ;AUTHORITY Edit
|
---|
| 79 | G E34^PRCHAMY4
|
---|
| 80 | ;
|
---|
| 81 | E35 ;F.O.B. Point
|
---|
| 82 | Q
|
---|
| 83 | ;
|
---|
| 84 | E36 ;ITEM DISCOUNT Add/Edit
|
---|
| 85 | G E36^PRCHAMY5
|
---|
| 86 | ;
|
---|
| 87 | E37 ;ITEM DISCOUNT Delete
|
---|
| 88 | G E37^PRCHAMY5
|
---|
| 89 | ;
|
---|
| 90 | E98 ;DELIVERY DATE PRINT
|
---|
| 91 | Q
|
---|
| 92 | E99 ;NET AMOUNT PRINT
|
---|
| 93 | Q
|
---|