Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRCHAMY3

PRCHAMY3.m

Go to the documentation of this file.
PRCHAMY3 ;WISC/DJM-PRINT AMENDMENT, ROUTINE #3 ;8/31/95  11:24 AM
V ;;5.1;IFCAP;;Oct 20, 2000
 ;Per VHA Directive 10-93-142, this routine should not be modified.
 ;
E29 ;EST. SHIPPING Edit
 N CHANGE,OLD,EST,LCNT,DATA,OBOC,OBOC1,FLAG
 S CHANGE=0 D LCNT^PRCHPAM5(.LCNT)
 F  S CHANGE=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND,13,CHANGE)) Q:CHANGE'>0  D
 .S OLD=$G(^PRC(442,PRCHPO,6,PRCHAM,3,CHANGE,1,1,0)),OLD=$FN(OLD,"-",2)
 .S EST=$P($G(^PRC(442,PRCHPO,0)),U,13),EST=$FN(EST,"-",2)
 .S (OBOC1,FLAG)=0 K OBOC
 .F  S OBOC1=$O(^PRC(442,PRCHPO,6,PRCHAM,3,"AC",AMEND,13.5,OBOC1)) Q:OBOC1'>0  D  Q:FLAG=1
 ..S OBOC=+(^PRC(442,PRCHPO,6,PRCHAM,3,OBOC1,1,1,0)),FLAG=1
 .I '$D(OBOC) S OBOC=+$P($G(^PRC(442,PRCHPO,23)),U)
 .D LINE^PRCHPAM5(.LCNT,2)
 .I OLD'>0 D
 ..S DATA="**ADDED THROUGH AMENDMENT**" D DATA^PRCHPAM5(.LCNT,DATA)
 ..S DATA="Estimated Shipping and/or Handling of $"_EST_" has been added" D DATA^PRCHPAM5(.LCNT,DATA)
 ..S DATA="BOC: "_+$P($G(^PRC(442,PRCHPO,23)),U) D DATA^PRCHPAM5(.LCNT,DATA)
 ..Q
 .I OLD>0 D
 ..S DATA="Estimated Shipping and/or Handling of $"_OLD_" has been changed" D DATA^PRCHPAM5(.LCNT,DATA)
 ..S DATA="to $"_EST D DATA^PRCHPAM5(.LCNT,DATA)
 ..S DATA="BOC: "_OBOC_" has been changed to: "+$P($G(^PRC(442,PRCHPO,23)),U) D DATA^PRCHPAM5(.LCNT,DATA)
 ..Q
 .D LCNT1^PRCHPAM5(LCNT)
 .Q
 Q
 ;
OLD ;GET ALL THE OLD DESCRIPTION FROM 'CHANGES' MULTIPLE AND SET INTO
 ;THE DISPLAY '^TMP($J,"AMD"' ARRAY.
 N LINE,DATA
 S LINE=1
 F  D:DES]""  Q:DES=""
 .S DATA=$E(DES,1,75) D DATA^PRCHPAM5(.LCNT,DATA)
 .S DES=$E(DES,76,255) Q:$L(DES)'<75  Q:LINE'>0
 .S LINE=$O(^PRC(442,PRCHPO,6,PRCHAM,3,PRCHLN,1,LINE)) Q:LINE'>0
 .S DES=DES_$G(^PRC(442,PRCHPO,6,PRCHAM,3,PRCHLN,1,LINE,0))
 .Q
 Q
 ;
NEW ;GET ALL THE NEW DESCRIPTION FROM THE LINE ITEM MULTIPLE AND SET
 ;INTO THE DISPLAY '^TMP($J,"AMD"' ARRAY.
 N LINE,DATA
 S LINE=1
 F  D:ITEM1]""  Q:ITEM1=""
 .S DATA=$E(ITEM1,1,75) D DATA^PRCHPAM5(.LCNT,DATA)
 .S ITEM1=$E(ITEM1,76,255) Q:$L(ITEM1)'<75  Q:LINE'>0
 .S LINE=$O(^PRC(442,PRCHPO,2,ITEM,1,LINE)) Q:LINE'>0
 .S ITEM1=ITEM1_$G(^PRC(442,PRCHPO,2,ITEM,1,LINE,0))
 .Q
 Q