source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCFAC2.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: 3.5 KB
Line 
1PRCFAC2 ;WISC/CTB-PROCESS RECEIVING REPORTS ;3/30/93 09:38
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4EN8 ;PROCESSING OF RECEIVING REPORT
5 S PRCFASYS="",PRCF("X")="AS" D ^PRCFSITE G:'% OUT K DIC("A")
6 S D="C",DIC("S")="I +$P(^(0),U,1)=PRC(""SITE""),$D(^(7)),+^(7)>0 S FSO=$P(^PRCD(442.3,+^(7),0),U,3) I FSO>29,FSO<40"
7 S DIC("A")="Select Purchase Order Number: ",DIC=442,DIC(0)="AEQZ" D IX^DIC
8 K DIC("S"),DIC("A"),FSO G:+Y<0 OUT S PO(0)=Y(0),PRCFA("PODA")=+Y,PO=Y,DIC("A")="Partial Number: ",DIC="^PRC(442,"_+PO_",11,",DIC(0)="AEQMNZ" D ^DIC K DIC("A")
9 G:Y<0 OUT S PO(11)=Y(0),PRCFA("PARTIAL")=+Y
10 I $P(PO(11),U,6)="Y" W $C(7) S %A="A CODE SHEET HAS ALREADY BEEN COMPLETED FOR THIS PARTIAL,",%A(1)="DO YOU WISH TO CONTINUE",%B="" S %=2 D ^PRCFYN I %'=1 K P,DIC,Y G OUT
11 S PO(2)=$P(PO(11),"^")\1 I $P(PO(0),"^",19)=2!($P(PO(0),"^",19)=3) G X
12C S PRCFA("TT")="924.00" D TT^PRCFAC G OUT:'%
13 S PRCFA("TTDATE")=$E(PO(2),4,7)_$E(PO(2),2,3),PRCFA("REF")=$P($P(PO(0),"^"),"-",2) D NEWCS^PRCFAC G:'$D(DA) OUT
14 S X="^^^^^^^"_+$P(PO(11),U,2)_U_$S($P(PO(11),U,5)=0:"",1:$J($P(PO(11),U,3)*100,0,0))_U
15 S ^PRCF(423,DA,1)=X_$S($P(PO(11),U,4)="":"$",1:+$P(PO(11),U,4))_U_$S($P(PO(11),U,5)=0:"",1:$J($P(PO(11),U,5)*100,0,0))_U_$S("30~31~15"[$P(^PRC(442,+PO,7),U):"P",1:"")_"^^^"
16 S $P(^PRCF(423,DA,1),"^",16)="$"
17 I PRCFA("EDIT")'["921." S DR=".1;17;S:X]"""" PRCFA(""LIQ"")=X",PRCFA("CSDA")=DA,DIE="^PRCF(423," D ^DIE
18 I PRCFA("EDIT")["924.00" D ^PRCFA924 G EN82
19 S DIE="^PRCF(423,",DR=PRCFA("EDIT"),DA=PRCFA("CSDA") D ^DIE K PRCFA("DIE") G:$D(Y)=0 EN82
20 W !,$C(7) S %A="THIS CODE SHEET WAS ABORTED. DATA MAY BE INCORRECT.",%A(1)="DO YOU WISH TO DELETE",%B="Failure to delete could cause incorrect data to be transmitted",%B(1)="A 'YES' or an '^' will delete the code sheet"
21EN82 S PRCFA("REC")="" D ^PRCFACXM I $D(PRCFDEL)!($D(PRCFA("CSHOLD"))) K PRCFDEL,PRCFA("CSHOLD") S X=" No further processing is being taken on this receiving report.*" D MSG^PRCFQ G OUT8
22 I $G(PRCFA("PODA"))>0 D EN72^PRCFAC1,LOAD^PRCFARRQ
23OUT8 K PRCFA("PODA"),PRCFA("REC"),PRCFA("PARTIAL") G EN8
24X W !,"LIQUIDATION CODE: " R X:DTIME G OUT8:'$T,OUT8:X["^"
25 I "PCF"'[$E(X)!(X="") W ! S X="Enter a (P)artial, (F)inal, or (C)omplete only.*" D MSG^PRCFQ G X
26 S PRCFA("LIQ")=$E(X),X="Since this is a "_$S($P(PO(0),"^",19)=3:"CASCA",1:"SUPPLY FUND")_" receiving report, no code sheet is required.*"
27 D MSG^PRCFQ,EN72^PRCFAC1 I $P(PO(0),"^",19)=2,$G(PRCFA("PODA"))>0 D LOAD^PRCFARRQ
28 K PRCFA("PODA"),PRCFA("REC"),PRCFA("PARTIAL") G EN8
29EN9 ;DELETE A CODE SHEET IF NOT PRINTED
30 S:'$D(PRCFASYS) PRCFASYS="FEEFENIRSISMCLI" K Q1 S DIC="^PRCF(423,",DIC(0)="AEMNQ",DIC("S")="I $P(^(0),U,10)]"""",PRCFASYS[$P(^(0),U,10)" D ^DIC K DIC("A") I Y<0 K PRCFASYS G OUT9
31 S DA=+Y W !,$C(7) S %A="ARE YOU SURE",%B="ANSWERING 'YES' WILL CAUSE ALL REFERENCE TO THIS CODE SHEET TO BE DELETED" S %=2 D ^PRCFYN I %'=1 W ?$X+5,"<NOTHING DELETED>",$C(7) R X:2 D OUT9 G EN9
32 D DEL,OUT9 S DIC("A")="Select Next CODE SHEET ID: " G EN9
33OUT9 K %,DA,DIC,I,J,K,X,Y Q
34DEL ;KILL THE CODE SHEET AND CROSS REFERENCES
35 S DIK="^PRCF(423," D WAIT^PRCFYN,^DIK S PRCFDEL="" W $C(7)," <CODE SHEET DELETED>" R X:3
36OUT K %,%Y,B,D0,DA,DG,DIC,DIE,DIG,DIH,DIK,DIR,DIU,DIV,DIW,DLAYGO,DR,FSO,J,K,P,PRCFA,Q,Q1,S,X,Y Q
37EN1 ;MODIFY BATCH PRIORITY OF CODE SHEET
38 S:'$D(PRCFASYS) PRCFASYS="FEEFENIRSISMCLI" S DIC="^PRCF(423,",DIC(0)="AEMNQ",DIC("S")="I $P(^(0),U,10)]"""",PRCFASYS[$P(^(0),U,10)" D ^DIC K DIC("A") I Y<0 K PRCFASYS G OUT1
39 S DA=+Y,DIE=DIC,DR=".8;" D ^DIE G EN1
40OUT1 K %,%Y,D0,DA,DIC,DIE,DQ,DR,I,J,K,X,Y,Z Q
41 Q
Note: See TracBrowser for help on using the repository browser.