source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCOINV1.m@ 1006

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

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1PRCOINV1 ;WISC/DJM/LEM-INV Server Interface to IFCAP ;11/29/93 08:17
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4MSG S M1="" F S M1=$O(ERR(CC,M1)) Q:M1="" Q:ERR(CC,M1)]""
5 Q:M1=""
6 S XMSUB="IFCAP 'INV' for Purchase Order "_CC,XMDUZ="IFCAP 'INV' SERVER" F I=1:1:5 D GET^XMA2 I I<5 Q:XMZ>0
7 I I=5,XMZ<1 Q ;MIGHT NEED TO REDO 'GET^XMA2' IF I=5 AND THERE IS NO XMZ.
8 S M1="",L=1 F S M1=$O(ERR(CC,M1)) Q:M1="" I ERR(CC,M1)]"" D
9 .I M1=0,$P(ERR(CC,M1),U)]"" S ^XMB(3.9,XMZ,2,L,0)="Purchase Order Acknowledgment "_CC_" was not found in the CI file.",L=L+1
10 .I M1>0,$P(ERR(CC,M1),U,2,99)]"" F II=2:1:12 S BB=$P(ERR(CC,M1),U,II) I BB]"" D
11 ..I II=2 S ^XMB(3.9,XMZ,2,L,0)="Item "_M1_" was not found in CI "_CC_".",L=L+1 Q
12 ..I II=3 S ^XMB(3.9,XMZ,2,L,0)="The Vendor Stock Number wasn't found in item "_M1_".",L=L+1 Q
13 ..I II=5 S ^XMB(3.9,XMZ,2,L,0)="There is no quantity listed for item "_M1_".",L=L+1 Q
14 ..I II=6 S ^XMB(3.9,XMZ,2,L,0)="There is no Unit of Purchase listed for item "_M1_".",L=L+1 Q
15 ..I II=7 S ^XMB(3.9,XMZ,2,L,0)="There is no Unit Cost listed for item "_M1_".",L=L+1 Q
16 ..I II=9 S ^XMB(3.9,XMZ,2,L,0)="The Vendor Stock Number from the INV doesn't match the one from item "_M1_".",L=L+1 Q
17 ..I II=10 S ^XMB(3.9,XMZ,2,L,0)="The Quantity listed in the INV doesn't match the one listed in item "_M1_".",L=L+1 Q
18 ..I II=11 S ^XMB(3.9,XMZ,2,L,0)="The Unit of Purchase listed in the INV doesn't match the one in item "_M1_".",L=L+1 Q
19 ..I II=12 S ^XMB(3.9,XMZ,2,L,0)="The Unit Cost listed in the INV doesn't match the one in item "_M1_".",L=L+1 Q
20 ..Q
21 .Q
22 Q:L=1 S L=L-1,^XMB(3.9,XMZ,2,0)="^3.9A^"_L_"^"_L_"^"_DT
23 S XMDUN="IFCAP 'INV' PROBLEM",X="G.EDP" D WHO^XMA21 S:'$L($O(XMY(""))) XMY(.5)="" S:$G(PPM)]"" XMY(PPM)="" D ENT1^XMD K XMY Q
24BUL ;THIS BULLETIN WILL NOTIFY THAT A 'INV' TRANSACTION HAS ARRIVED FROM AUSTIN
25 N XMDUZ,XMB,DATE,X,Y,XMB,%,%DT
26 S XMDUZ="INV Server Interface",XMB="PRCOEDI ACKNOWLEDGE" D NOW^%DTC S Y=%,%DT="S" D DD^%DT S XMB(3)=$P(Y,"@"),XMB(4)=$P(Y,"@",2),XMB(5)=CC
27 S DATE=$P(LINE,U,5),X1=$E(DATE,1,4)-1700_"0101",X2=+$E(DATE,5,7)-1 D C^%DTC S Y=X_"."_$P(LINE,U,6) D DD^%DT S XMB(1)=Y,XMB(2)=$P(LINE,U,3) D ^XMB Q
28 Q
29DATE(DATE) ;THIS EXTRINSIC FUNCTION WILL RETURN THE DATE IN YYYYJJJ FORMAT WHERE YYYY IS 4 DIGIT YEAR AND JJJ IS THE DAY OF THE YEAR.
30 ; THE INPUT, DATE, IS THE DATE TO CONVERT ENTERED IN VA FILEMAN FORMAT WITHOUT ANY TIME. THE DATE MUST CONTAIN YEAR, MONTH AND DAY.
31 N X,%Y S X1=DATE,X2=$E(DATE,1,3)_"0101" D ^%DTC S X=X+1,X="000"_X,X=$E(X,$L(X)-2,99) Q $E(DATE,1,3)+1700_X
Note: See TracBrowser for help on using the repository browser.