source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPRLDO.m@ 1141

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

initial load of WorldVistAEHR

File size: 4.4 KB
RevLine 
[613]1PRCPRLDO ;WISC/RFJ-list distribution orders ;7/24/00 23:29
2 ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 D ^PRCPUSEL Q:'$D(PRCP("I"))
5 N %,ORDERDA,PRCPFITM,PRCPFLAG,PRCPFPIC,X
6 K X S X(1)="The List Distribution Orders To/From Inventory Point option will display distribution orders which have been entered but not posted to the secondary."
7 D DISPLAY^PRCPUX2(40,79,.X)
8 I PRCP("DPTYPE")="P" D Q:$G(PRCPFLAG)
9 . K X S X(1)="You have the option to release all orders which have been placed to "_PRCP("IN")_", but not released for filling." D DISPLAY^PRCPUX2(2,40,.X)
10 . S XP="Do you want to release the orders now",XH="Enter YES to release the orders."
11 . S %=$$YN^PRCPUYN(2) I '% S PRCPFLAG=1 Q
12 . I %=1 D
13 . . K ^TMP($J,"PRCPBAL3")
14 . . S ORDERDA=0 F S ORDERDA=$O(^PRCP(445.3,ORDERDA)) Q:'ORDERDA S DATA=$G(^(ORDERDA,0)) I $P(DATA,"^",2)=PRCP("I"),$P(DATA,"^",6)="" S ^TMP($J,"PRCPBAL3",ORDERDA)=""
15 . . I '$O(^TMP($J,"PRCPBAL3",0)) W !,"NO ORDERS READY FOR RELEASING." Q
16 . . D RELEASE^PRCPBAL3
17 . . K ^TMP($J,"PRCPBAL3")
18 . ;
19 . K X S X(1)="You have the option to print the picking tickets for all orders which have been released for filling to "_PRCP("IN")_". Only the picking tickets which have never been printed (no reprints) will be selected."
20 . W ! D DISPLAY^PRCPUX2(2,40,.X)
21 . S XP="Do you want to print picking tickets for released orders",XH="Enter YES to print the picking tickets for all released orders,",XH(1)="Enter NO to skip printing the picking tickets."
22 . S %=$$YN^PRCPUYN(2) I '% S PRCPFLAG=1 Q
23 . S PRCPFPIC=$S(%=1:1,1:0)
24 I $G(PRCPFPIC) D DEVICE Q
25 ;
26 K X S X(1)="You have the option to print the list of items for each order or to print each order just displaying the status." W ! D DISPLAY^PRCPUX2(2,40,.X)
27 S XP="Do you want to breakout a list of items on each order",XH="Enter YES to display a list of all items on the order,",XH(1)="Enter NO to only print the status of each order."
28 S %=$$YN^PRCPUYN(2) I '% Q
29 S PRCPFITM=$S(%=1:1,1:0)
30DEVICE ;
31 W ! S %ZIS="Q" D ^%ZIS Q:POP
32 I $G(PRCPFPIC),IO=IO(0) W !,"YOU CANNOT SELECT YOUR CURRENT DEVICE FOR PRINTING PICKING TICKETS." G DEVICE
33 I $D(IO("Q")) D D ^%ZTLOAD K IO("Q"),ZTSK Q
34 . S ZTDESC="List Distribution Orders",ZTRTN="DQ^PRCPRLDO"
35 . S ZTSAVE("PRCP*")="",ZTSAVE("ZTREQ")="@"
36 W !!,"<*> please wait <*>"
37DQ ; queue starts here
38 I $G(PRCPFPIC) D PICKTICK Q
39 ;
40 N DATA,ITEMDA,ITEMDATA,NOW,ORDERDA,PAGE,PRCPFLAG,SCREEN,UNITCOST,X,Y
41 D NOW^%DTC S Y=% D DD^%DT S NOW=Y,PAGE=1,SCREEN=$$SCRPAUSE^PRCPUREP U IO D H
42 S ORDERDA=0 F S ORDERDA=$O(^PRCP(445.3,ORDERDA)) Q:'ORDERDA!($G(PRCPFLAG)) S DATA=$G(^(ORDERDA,0)) I DATA'="" D
43 . I $P(DATA,"^",6)="P" Q
44 . I PRCP("DPTYPE")="P",$P(DATA,"^",2)'=PRCP("I") Q
45 . I PRCP("DPTYPE")="S",$P(DATA,"^",3)'=PRCP("I") Q
46 . S Y=$P(DATA,"^",4) D DD^%DT
47 . W !,$P(DATA,"^"),?8,$P(Y,"@"),?22,$P($$TYPE^PRCPOPU(ORDERDA),"ORDER"),?32,$$STATUS^PRCPOPU(ORDERDA)
48 . I PRCP("DPTYPE")="P" W ?54,$E($$INVNAME^PRCPUX1(+$P(DATA,"^",3)),1,25)
49 . I PRCP("DPTYPE")="S" W ?54,$E($$INVNAME^PRCPUX1(+$P(DATA,"^",2)),1,25)
50 . I $Y>(IOSL-5) D:SCREEN P^PRCPUREP Q:$G(PRCPFLAG) D H
51 . I '$G(PRCPFITM) Q
52 . S ITEMDA=0 F S ITEMDA=$O(^PRCP(445.3,ORDERDA,1,ITEMDA)) Q:'ITEMDA!($G(PRCPFLAG)) S ITEMDATA=$G(^(ITEMDA,0)) I ITEMDATA'="" D
53 . . S UNITCOST=$P($G(^PRCP(445,+$P(DATA,"^",2),1,ITEMDA,0)),"^",22)
54 . . W !?10,$E($$DESCR^PRCPUX1(PRCP("I"),ITEMDA),1,29),?40,ITEMDA,?50,$J(+$P(ITEMDATA,"^",2),15),$J(UNITCOST,15)
55 . . I $Y>(IOSL-5) D:SCREEN P^PRCPUREP Q:$G(PRCPFLAG) D H
56 D END^PRCPUREP
57 D ^%ZISC
58 Q
59 ;
60 ;
61H S %=NOW_" PAGE "_PAGE,PAGE=PAGE+1 I PAGE'=2!(SCREEN) W @IOF
62 W $C(13),"LIST DISTRIBUTION ORDER REPORT FOR ",PRCP("IN"),?(80-$L(%)),%
63 W !,"ORDER#",?8,"DATE",?22,"TYPE",?32,"STATUS",?54,"DELIVER ",$S(PRCP("DPTYPE")="P":"TO",1:"FROM")," INVENTORY POINT"
64 I $G(PRCPFITM) W !?10,"ITEM",?40,"MI#",?50,$J("QUANTITY",15),$J("EST. UNIT COST",15)
65 S %="",$P(%,"-",81)="" W !,%
66 Q
67 ;
68 ;
69PICKTICK ; print orders which have been released but the picking ticket
70 ; has not been printed
71 N DATA,ORDERDA,PRCPORD,PRCPPAT,PRCPPRIM,PRCPSECO
72 S ORDERDA=0 F S ORDERDA=$O(^PRCP(445.3,ORDERDA)) Q:'ORDERDA S DATA=$G(^(ORDERDA,0)) I DATA'="" D
73 . I PRCP("DPTYPE")="P",$P(DATA,"^",2)'=PRCP("I") Q
74 . I $P(DATA,"^",7)="Y" Q
75 . I $P(DATA,"^",6)'="R" Q
76 . D VARIABLE^PRCPOPU
77 . D BUILD^PRCPOPT(ORDERDA)
78 . D DQ^PRCPOPT1
79 D Q^PRCPOPT
80 Q
Note: See TracBrowser for help on using the repository browser.