source: FOIAVistA/tag/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCHDP5.m@ 949

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

initial load of FOIAVistA 6/30/08 version

File size: 3.9 KB
Line 
1PRCHDP5 ;WISC/DJM-PRINT AMENDMENT ;6/29/00 12:18
2V ;;5.1;IFCAP;**21**;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5START(PRCHPO,PRCHAM) ;PRCHPO IS 442 INTERNAL ENTRY NUMBER FOR RECORD BEING AMENDED.
6 ;PRCHAM IS IEN OF 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 FROM THE AMENDMENTS CHANGES MULTIPLE.
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_"^PRCHDP5" D @GOTO
11 ;D LCNT^PRCHDP9(.LCNT) S LCNTX=LCNT I LCNT>37 S LCNT=LCNT-52
12 ;F Q:LCNT'>41 S LCNT=LCNT-56,PRCHPGT=PRCHPGT+1
13 ;S:LCNTX>37 PRCHPGT=PRCHPGT+1
14 Q
15 ;
16E20 ;SHIP TO Edit PRINT
17 N FIELD,CHANGE,CHANGES,OLD,NEW,LCNT,DATA,SITE
18 D LCNT^PRCHDP9(.LCNT)
19 S FIELD=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND,0)) Q:FIELD'>0
20 S CHANGE=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND,FIELD,0)) Q:CHANGE'>0
21 S CHANGES=^PRC(442,PRCHPO,6,PRCHAM,3,CHANGE,0),OLD=^PRC(442,PRCHPO,6,PRCHAM,3,CHANGE,1,1,0)
22 S SHIP=$P($P(CHANGES,U,3),";")
23 I SHIP=5.4 D
24 .S SITE=$P($G(^PRC(442,PRCHPO,23)),U,7),SITE=$S($G(SITE)]"":SITE,1:$P($P(^PRC(442,PRCHPO,0),U),"-"))
25 .S OLD=$P(^PRC(411,SITE,1,OLD,0),U)
26 .S NEW=$P(^PRC(442,PRCHPO,1),U,3),NEW=$P(^PRC(411,SITE,1,NEW,0),U)
27 .Q
28 I SHIP=5.3 D
29 .S NEW=$P(^PRC(442,PRCHPO,1),U,12),NEW=$P(^PRC(440.2,NEW,0),U),NEW=$P($P(^DPT(NEW,0),U),",",2)_" "_$P($P(^DPT(NEW,0),U),",")
30 .S OLD=$P(^PRC(440.2,OLD,0),U),OLD=$P($P(^DPT(OLD,0),U),",",2)_" "_$P($P(^DPT(OLD,0),U),",")
31 .Q
32 D LINE^PRCHDP9(.LCNT,2) S DATA="Ship to location "_OLD_" has been changed to "_NEW_"."
33 D DATA^PRCHDP9(.LCNT,DATA),LCNT1^PRCHDP9(LCNT)
34 Q
35E21 ;LINE ITEM Add PRINT
36 N FIELD,CHANGE,CHANGES,OLD,ITEM,ITEM0,ITEM1,LCNT,DATA,I,UOP
37 S FIELD=0 K ITEM D LCNT^PRCHDP9(.LCNT)
38 F S FIELD=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND,FIELD)) Q:FIELD'>0 D
39 .S CHANGE=0 F S CHANGE=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND,FIELD,CHANGE)) Q:CHANGE'>0 D
40 ..S CHANGES=^PRC(442,PRCHPO,6,PRCHAM,3,CHANGE,0),OLD=^PRC(442,PRCHPO,6,PRCHAM,3,CHANGE,1,1,0)
41 ..S ITEM=$P(CHANGES,U,4) Q:$D(ITEM(ITEM)) S ITEM(ITEM)=1
42 ..S ITEM0=$G(^PRC(442,PRCHPO,2,ITEM,0))
43 ..I ITEM0="" Q
44 ..I $P(ITEM0,U,2)=0,$P(ITEM0,U,9)=0 Q
45 ..S ITEM1=$G(^PRC(442,PRCHPO,2,ITEM,1,1,0))
46 ..D LINE^PRCHDP9(.LCNT,2) S DATA=" *ADDED THROUGH AMENDMENT*" D DATA^PRCHDP9(.LCNT,DATA)
47 ..S DATA="Item No. "_$P(ITEM0,U)_" Item Master File No. "
48 ..S DATA=DATA_$P(ITEM0,U,5)_" BOC: "_+$P(ITEM0,U,4)
49 ..S DATA=DATA_" CONTRACT: "_$P($G(^PRC(442,PRCHPO,2,ITEM,2)),U,2)
50 ..D DATA^PRCHDP9(.LCNT,DATA)
51 ..D NEW^PRCHDP7
52 ..S UOP=$S($P(ITEM0,U,3)>0:$P($G(^PRCD(420.5,$P(ITEM0,U,3),0)),U),1:"")
53 ..S DATA=" Items per "_UOP_": "_$P(ITEM0,U,12)
54 ..F I=1:1:26-$L(DATA) S DATA=DATA_" "
55 ..S DATA=DATA_"NSN: "_$P(ITEM0,U,13) D DATA^PRCHDP9(.LCNT,DATA)
56 ..I $P(ITEM0,U,6)]"" S DATA=" STK#: "_$P(ITEM0,U,6) D DATA^PRCHDP9(.LCNT,DATA)
57 ..S UOP=$S($P(ITEM0,U,3)>0:$P($G(^PRCD(420.5,$P(ITEM0,U,3),0)),U),1:"")
58 ..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)
59 ..D DATA^PRCHDP9(.LCNT,DATA),LCNT1^PRCHDP9(LCNT)
60 Q
61 ;
62E22 ;LINE ITEM Delete PRINT
63 G E22^PRCHDP6 ;NOT ENOUGH ROOM IN THIS ROUTINE.
64 ;
65E23 ;LINE ITEM Edit PRINT
66 G E23^PRCHDP6
67 ;
68E24 ;SOURCE CODE Edit PRINT
69 G E24^PRCHDP8
70 ;
71E25 ;Edit MAIL INVOICE TO PRINT
72 G E25^PRCHDP7
73 ;
74E26 ;Edit METHOD OF PAYMENT PRINT
75 G E26^PRCHDP7
76 ;
77E27 ;ADMINISTRATIVE CERTIFICATION Add PRINT
78 G E27^PRCHDP7
79 ;
80E28 ;ADMINISTRATIVE CERTIFICATION Delete PRINT
81 G E28^PRCHDP7
82 ;
83E29 ;EST. SHIPPING Edit PRINT
84 G E29^PRCHDP7
85 ;
86E30 ;F.C.P. Edit PRINT
87 G E30^PRCHDP8
88 ;
89E31 ;Change VENDOR PRINT
90 G E31^PRCHDP8
91 ;
92E32 ;REPLACE P.O. NUMBER PRINT
93 G E32^PRCHDP8
94 ;
95E33 ;PROMPT PAYMENT Edit PRINT
96 G E33^PRCHDP8
97 ;
98E34 ;AUTHORITY Edit PRINT
99 G E34^PRCHDP9
100 ;
101E35 ;F.O.B. Point PRINT
102 G E35^PRCHDP9
103 ;
104E36 ;ITEM DISCOUNT Add/Edit PRINT
105 G E36^PRCHDP9
106 ;
107E37 ;ITEM DISCOUNT Delete PRINT
108 G E37^PRCHDP9
109 ;
110E98 ;DELIVERY DATE PRINT
111 Q
112E99 ;NET AMOUNT PRINT
113 Q
Note: See TracBrowser for help on using the repository browser.