[613] | 1 | PRCPCDIR ;WISC/RFJ-disassemble cc or ik (print items) ;01 Sep 93
|
---|
| 2 | ;;5.1;IFCAP;;Oct 20, 2000
|
---|
| 3 | ;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
| 4 | Q
|
---|
| 5 | ;
|
---|
| 6 | ;
|
---|
| 7 | PRINT(ITEMDA,QUANTITY) ; print items to disassemble
|
---|
| 8 | ; returns variable notinvpt=1 if items not stored in inventory point
|
---|
| 9 | ; returns variable prcpflag=1 if user ^ during display
|
---|
| 10 | ; returns ^tmp($j,"prcpcdir",itemda)=qty needed ^ inventory value
|
---|
| 11 | N %,CCIKITEM,DATA,INVVAL,ITEMDATA,NEWQTY,REUSABLE,SCREEN
|
---|
| 12 | K ^TMP($J,"PRCPCDIR"),NOTINVPT,PRCPFLAG
|
---|
| 13 | W ! D H
|
---|
| 14 | S SCREEN=1,CCIKITEM=0 F S CCIKITEM=$O(^PRCP(445,PRCP("I"),1,ITEMDA,8,CCIKITEM)) Q:'CCIKITEM!($G(PRCPFLAG)) S DATA=$P(^(CCIKITEM,0),"^",2)*QUANTITY D
|
---|
| 15 | . S ITEMDATA=$G(^PRCP(445,PRCP("I"),1,CCIKITEM,0))
|
---|
| 16 | . I ITEMDATA'="",$P(ITEMDATA,"^",7)="" S $P(ITEMDATA,"^",7)=0
|
---|
| 17 | . I ITEMDATA="" S $P(ITEMDATA,"^",7)="Not in InvPt" S NOTINVPT=1
|
---|
| 18 | . S INVVAL=$J($S('$P(ITEMDATA,"^",7):0,1:$P(ITEMDATA,"^",27)/$P(ITEMDATA,"^",7))*DATA,0,3)
|
---|
| 19 | . S NEWQTY=$P(ITEMDATA,"^",7)+DATA
|
---|
| 20 | . W !,CCIKITEM,?7,$E($$DESCR^PRCPUX1(PRCP("I"),CCIKITEM),1,22),?44,$J($P(ITEMDATA,"^",7),13),$J(DATA,10),$J(NEWQTY,13)
|
---|
| 21 | . S ^TMP($J,"PRCPCDIR",CCIKITEM)=DATA_"^"_INVVAL
|
---|
| 22 | . S SCREEN=SCREEN+1
|
---|
| 23 | . I SCREEN'<IOSL D P^PRCPUREP Q:$D(PRCPFLAG) D H S SCREEN=1
|
---|
| 24 | Q
|
---|
| 25 | ;
|
---|
| 26 | ;
|
---|
| 27 | H ; display header on display
|
---|
| 28 | W !?44,$J("CURRENT",13),$J("QTY",10),$J("** NEW **",13),!,"IM#",?7,"DESCRIPTION",?44,$J("QTY ON-HAND",13),$J("NEEDED",10),$J("QTY ON-HAND",13)
|
---|
| 29 | S %="",$P(%,"-",81)="" W !,%
|
---|
| 30 | Q
|
---|