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

PRCPPOL0.m

Go to the documentation of this file.
  1. PRCPPOL0 ;WISC/RFJ-receive purchase order (list manager) ;06 Jan 94
  1. ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. Q
  1. ;
  1. ;
  1. DISTCOST ; item not in inventory point, cost to distribution point
  1. ; needs prcpordr,prcpinpt
  1. D FULL^VALM1
  1. S VALMBCK="R"
  1. N %,C,COSTCNTR,DATA,DISTRPT,I,ITEMDA,LINEDA,X,Y
  1. K X S X(1)="This option allows items which are not stored in the "_$$INVNAME^PRCPUX1(PRCPINPT)_" to be costed to a distribution point."
  1. D DISPLAY^PRCPUX2(5,75,.X)
  1. I '$O(^TMP($J,"PRCPPOLMCOS",0)) K X S X(1)="All items on the purchase order are currently stored in the inventory point." D DISPLAY^PRCPUX2(15,55,.X) D R^PRCPUREP Q
  1. S LINEDA=$$LINEITEM^PRCPPOU1(PRCPORDR) I 'LINEDA Q
  1. S DATA=$G(^TMP($J,"PRCPPOLMCOS",LINEDA)) Q:DATA=""
  1. S ITEMDA=$P(DATA,"^")
  1. K X S X(1)="This item is not stored in the inventory point. You have the option to cost this out as a distribution cost to one of your distribution inventory points."
  1. W ! D DISPLAY^PRCPUX2(5,75,.X)
  1. W !,"Line Number: ",LINEDA,?20,"Master Item Number: ",ITEMDA,!?2,"DESCRIPTION: "
  1. K X S %=0 F I=1:1 S %=$O(^PRC(442,PRCPORDR,2,LINEDA,1,%)) Q:'% S X(I)=^(%,0)
  1. D DISPLAY^PRCPUX2(13,75,.X)
  1. S %=$$INVNAME^PRCPUX1($P(DATA,"^",2))
  1. W !,"COST OUT TO INVPT: ",$S(%="":"<NONE>",1:%),?50,"COST CENTER: ",$S($P(DATA,"^",3)="":"<NONE>",1:$P(DATA,"^",3))
  1. ; select distribution point
  1. F S DISTRPT=$$TO^PRCPUDPT(PRCPINPT) Q:'DISTRPT D Q:DISTRPT
  1. . S COSTCNTR=$P($G(^PRCP(445,DISTRPT,0)),"^",7) S:'COSTCNTR COSTCNTR=$P(^PRC(442,PRCPORDR,0),"^",5) I 'COSTCNTR W !?5,"INVENTORY POINT DOES NOT CONTAIN A COST CENTER." S DISTRPT=0 Q
  1. . W !?5,"COSTING TO COST CENTER: ",COSTCNTR
  1. . S ^TMP($J,"PRCPPOLMCOS",LINEDA)=ITEMDA_"^"_DISTRPT_"^"_COSTCNTR
  1. D REBUILD^PRCPPOLB
  1. S VALMBCK="R"
  1. Q
  1. ;
  1. ;
  1. EEITEMS ; called from protocol file to enter/edit invpt items
  1. D FULL^VALM1
  1. N PRC,PRCP
  1. S PRCP("DPTYPE")="WP"
  1. D ^PRCPEILM
  1. D REBUILD^PRCPPOLB
  1. S VALMBCK="R"
  1. Q