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

PRCPWPPL.m

Go to the documentation of this file.
  1. PRCPWPPL ;WISC/RFJ-primary receive issue book (list manager) ;20 Jan 93
  1. ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. D ^PRCPUSEL Q:'$G(PRCP("I"))
  1. I PRCP("DPTYPE")'="P" W !,"ONLY THE PRIMARY CAN RECEIVE ISSUE BOOKS!" Q
  1. I $P(^PRCP(445,PRCP("I"),0),"^",16)'="N" W !,"BEFORE USING THIS OPTION, THE 'PRIMARY UPDATED BY WAREHOUSE' MUST BE SET TO NO." Q
  1. I $$CHECK^PRCPCUT1(PRCP("I")) Q
  1. N PRCPDA,PRCPFINL,PRCPIBNM,PRCPINPT,PRCPWHSE,PRCPPVNO,X,Y
  1. S PRCPINPT=PRCP("I")
  1. S X="" W ! D ESIG^PRCUESIG(DUZ,.X) I X'>0 Q
  1. S PRCPPVNO=+$O(^PRC(440,"AC","S",0))_";PRC(440," I '$D(^PRC(440,+PRCPPVNO,0)) W !!,"THERE IS NOT A VENDOR IN THE VENDOR FILE (#440) DESIGNATED AS A SUPPLY WHSE." Q
  1. F S PRCPDA=$$SELECTIB Q:PRCPDA<1 D
  1. . L +^PRCS(410,PRCPDA):5 I '$T D SHOWWHO^PRCPULOC(410,PRCPDA,0) Q
  1. . D ADD^PRCPULOC(410,PRCPDA,0,"Receive Issue Book")
  1. . S PRCPIBNM=$P(^PRCS(410,PRCPDA,0),"^")
  1. . S PRCPWHSE=0 F S PRCPWHSE=$O(^PRCP(445,"AC","W",PRCPWHSE)) Q:'PRCPWHSE I +$G(^PRCP(445,PRCPWHSE,0))=+PRCPIBNM Q
  1. . I 'PRCPWHSE W !,"THERE IS NOT A WAREHOUSE DESIGNATED FOR STATION '",+PRCPIBNM,"'." D UNLOCK Q
  1. . I $P($G(^PRCS(410,PRCPDA,9)),"^",3) S PRCPFINL=1
  1. . D EN^VALM("PRCP ISSUE BOOK RECEIVING")
  1. . D UNLOCK
  1. Q
  1. ;
  1. ;
  1. UNLOCK ; unlock issue book
  1. D CLEAR^PRCPULOC(410,PRCPDA,0)
  1. L -^PRCS(410,PRCPDA)
  1. Q
  1. ;
  1. ;
  1. INIT ; build array
  1. K ^TMP($J,"PRCPWPPLPOST")
  1. D REBUILD^PRCPWPPB
  1. Q
  1. ;
  1. ;
  1. HDR ; header
  1. N SPACE
  1. S SPACE=" "
  1. S VALMHDR(1)=$E("ISSUE BOOK: "_PRCPIBNM_" FROM: "_$E($$INVNAME^PRCPUX1(PRCPWHSE),1,15)_SPACE,1,69)_$S($G(PRCPFINL):"** FINAL **",1:"")
  1. S VALMHDR(2)="LINE DESCRIPTION IM# NSN ** Q U A N T I T Y (in U/R) **"
  1. S VALMHDR(3)=" UNIT CONV UNIT UNIT/IS UNIT/REC WHSE PRIM *TO*"
  1. S VALMHDR(4)=" /IS FACT /REC AVGCOST UNITCOST ORDERED POSTED REC'D RECEIVE"
  1. Q
  1. ;
  1. ;
  1. EXIT ; exit
  1. K ^TMP($J,"PRCPWPPL"),^TMP($J,"PRCPWPPLPOST"),^TMP($J,"PRCPWPPLLIST")
  1. Q
  1. ;
  1. ;
  1. SELECTIB() ; select issue book
  1. N %,DIC,I,X,Y,Z
  1. S DIC="^PRCS(410,",DIC(0)="QEAMZ",DIC("A")="Select TRANSACTION NUMBER: "
  1. S DIC("S")="I $P(^(0),U,6)=PRCP(""I""),$P(^(0),U,2)=""O"",$P(^(0),U,4)=5,$P($G(^(3)),U,4)=+PRCPPVNO,$P($G(^(7)),U,6)]"""",$S('$D(^PRC(443,+Y,0)):1,$P(^(0),U,3)]"""":1,1:0)"
  1. W ! D ^PRCSDIC
  1. Q +Y