source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRC5B4.m@ 1432

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

initial load of WorldVistAEHR

File size: 2.5 KB
RevLine 
[613]1PRC5B4 ;WISC/PLT-COLLECT ACTIVE P.O. ORDER F.O.B. ; 10/14/94 12:30 PM
2V ;;5.0;IFCAP;;4/21/95
3 QUIT ;invalid entry
4 ;
5EN ;START SENDING P.O. AND FOB TO FMS
6 N A,PRCDUZ
7 D EN^DDIOL("This task is going to send all active purchase orders dated")
8 D EN^DDIOL("after 12/31/1988 to FMS with F.O.B. data only.")
9 D EN^DDIOL("Please schedule this task one day before your site IFCAP V5 INSTALLATION")
10 D EN^DDIOL(" ")
11 S PRCDUZ=DUZ
12 S A=$$TASK^PRC0B2("EN1^PRC5B4~IFCAP V5 sending purchase order F.O.B. data to FMS","PRCDUZ",1)
13 I A<1 D EN^DDIOL("Submit to the Task Manager fails, try later!") G EXIT
14 D EN^DDIOL("Task number "_$P(A,"^",1)_" assigned with schedule date/time: "_$P($$DT^PRC0B2($P(A,"^",2),"H"),"^",4))
15 G EXIT
16 ;
17EN1 ;entry from task manager
18 N PRCRI,PRCA,PRCB,PRCC,PRCD,PRCFOB,PRCE,PRCRE,PRCSTN,PRCF,PRCPOD
19 N PRCST,PRCDT,PRCCT,PRCNT
20 N A
21 D:'$D(ZTQUEUED) EN^DDIOL("START SENDING P.O. AND F.O.B TO FMS")
22 S PRCNT=0,PRCSTN=$O(^PRC(411,0)),PRCSTN=$E(PRCSTN+1000,2,999)
23 S A=$$DT^PRC0B2("N","E","S"),A=$P(A,"^"),B=$P(A,".",2)
24 S PRCDT=$P(A,".",1)+17000000_"^"_$E(B+1000000,2,999)
25 S PRCCT="CTL^IFC^FMS^"_PRCSTN_"^FOB^^^^^"_PRCDT_"^001^001^001^~"
26 S $P(PRCCT,"^",6)=$J("",2),$P(PRCCT,"^",7)=$J("",4)
27 S $P(PRCCT,"^",8)=$J("",6),$P(PRCCT,"^",9)=$J("",11)
28 S PRCPOD=2890000,PRCE=0
29 F S PRCPOD=$O(^PRC(442,"AB",PRCPOD)) Q:PRCPOD>2999999!'PRCPOD D
30 . S PRCRI(442)=0
31 . F S PRCRI(442)=$O(^PRC(442,"AB",PRCPOD,PRCRI(442))) Q:'PRCRI(442) S A=$G(^PRC(442,PRCRI(442),0)) I A]"" D:$P(A,"^",2)'=21
32 .. S PRCST=$P($G(^PRC(442,PRCRI(442),7)),"^"),PRCST="/"_PRCST_"/",PRCFOB=$P($G(^(1)),"^",6)
33 .. QUIT:"/6/7/25/26/30/31/35/36/42/43/"'[PRCST
34 .. S A=$P(A,"^",1),A=$E($P(A,"-")+1000,2,999)_$P(A,"-",2,999)
35 .. S PRCF="FOB^"_A_"^"_PRCFOB_"^~{"
36 .. W:'$D(ZTQUEUED) !,PRCF," ",PRCE," ",PRCRI(442)," ",PRCPOD
37 .. D MM S PRCNT=PRCNT+1
38 .. QUIT
39 . QUIT
40 D MMEND
41 D:'$D(ZTQUEUED)
42 . D EN^DDIOL("FOB TOTAL RECORD SENT: "_PRCNT)
43 . D EN^DDIOL("END SENDING P.O. AND F.O.B")
44 . QUIT
45 D
46 . N X,Y
47 . S X(1)="TOTAL IFCAP V5 FOB RECORDS SENT TO FMS: "_PRCNT
48 . S Y(.5)="",Y(PRCDUZ)=""
49 . D MM^PRC0B2("IFCAP V5 INSTALLATION FOB RECORD COUNT^TASK MANAGER","X(",.Y)
50 . QUIT
51EXIT K PRCDUZ QUIT
52 ;
53MM ;send to mailman
54 N A,B
55 I PRCE=0 D
56 . S XMSUB="IFCAP V5 FOB DOCUMENTS",XMDUZ="IFCAP V5 INSTALLATION"
57 . D XMZ^XMA2
58 . QUIT
59 S PRCE=PRCE+1
60 S ^XMB(3.9,XMZ,2,PRCE,0)=PRCCT
61 S PRCE=PRCE+1
62 S ^XMB(3.9,XMZ,2,PRCE,0)=PRCF
63 D MMEND:PRCE>500
64 QUIT
65 ;
66MMEND ;end of message
67 QUIT:'PRCE
68 S XMDUN="IFCAP V5 INSTALLATION"
69 S ^XMB(3.9,XMZ,2,0)="^3.92A^"_PRCE_"^"_PRCE_"^"_DT
70 S XMY("XXX@Q-FMZ.VA.GOV")=""
71 D ENT1^XMD
72 S PRCE=0
73 QUIT
74 ;
Note: See TracBrowser for help on using the repository browser.