source: FOIAVistA/tag/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCHDAM1.m@ 794

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

initial load of FOIAVistA 6/30/08 version

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