source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCVFMS1.m@ 1800

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

initial load of WorldVistAEHR

File size: 1.9 KB
RevLine 
[613]1PRCVFMS1 ;WOIFO/LKG-GENERATE IV FROM COTS INV TRANS ;4/12/05 14:10
2 ;;5.1;IFCAP;**81**;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ; PRCNODE = First subscript of the ^TMP global used to exchange data
6 ; PRCPDA = IEN of Original Issue Book entry in File #410
7 ; PRCPFMOD = Document Action ("E":Original; "M":Modification)
8 ; PRCPPSTA = Primary Inventory Point's Station Number
9 ; PRCPPFCP = Primary Inventory Point's Fund Control Point
10 ; PRCPPBFY = Primary Inventory Point FCP's Beginning Budget Fiscal Year
11 ; PRCPWSTA = Warehouse's Station Number
12 ; PRCPWFCP = Warehouse's Fund Control Point
13 ; PRCPWBFY = Warehouse FCP's Beginning Budget Fiscal Year
14ENT(PRCNODE,PRCPDA) ;Entry point
15 N PRCPFMOD,PRC1,PRC2,PRCPWSTA,PRCPWFCP,PRCPWBFY,PRCFY,PRCDAA,PRCSX1,PRCRI
16 N ACCT,BUYBFY,BUYEFY,BUYFUND,BUYJOB,BUYLINE,BUYTABLE,BUYXPROG,COSTCNTR,DATA,FMSLINE,GECSFMS,INVCOST,LINEDA,LINEDOC,PRCPFMS,PRCPSEC1,PROFIT,PROFLINE
17 N TOTAL,TRANDATE,TRANNO,TRANDA,TRANID,PRCPPSTA,PRCPPFCP,PRCPPBFY,PRC,PRCX
18 N SELBFY,SELEFY,SELFUND,SELLINE,SELTABLE,SELXPROG,SIGN,STACKDA,SUBACCT,VOUCHER
19 N GECSDATA,D,DIC
20 S PRC1=$G(^TMP(PRCNODE,$J,1)),PRC2=$G(^TMP(PRCNODE,$J,2))
21 S PRCPFMOD=$S($P(PRC1,"^",4)="E":0,1:1),(PRCPPSTA,PRCPWSTA)=$P(PRC1,"^")
22 S PRCPWFCP=$P(PRC2,"^"),PRCPPFCP=$P(PRC2,"^",2),TRANDATE=$P(PRC1,"^",5),TRANID=$P(PRC1,"^",2)
23 S TRANNO=$P($G(^PRCS(410,PRCPDA,0)),"^")
24 S PRCFY=$S($E(TRANDATE,4,5)<10:$E(TRANDATE,2,3),1:$E(101+$E(TRANDATE,2,3),2,3))
25 S PRCPPBFY=$$BBFY^PRCSUT(PRCPPSTA,PRCFY,PRCPPFCP,1),PRCPWBFY=$$BBFY^PRCSUT(PRCPWSTA,PRCFY,PRCPWFCP,1)
26 S TRANDA=0,TOTAL=0
27 F S TRANDA=$O(^TMP(PRCNODE,$J,3,TRANDA)) Q:+TRANDA'=TRANDA D
28 . N PRC445 S PRC445=$G(^TMP(PRCNODE,$J,3,TRANDA,0))
29 . S FMSLINE=$P(PRC445,"^"),PRCPFMS(FMSLINE)=$P(PRC445,"^",2)_"^"_$P(PRC445,"^",3)_"^"_$P(PRC445,"^",4)_"^"_($P(PRC445,"^",5)-$P(PRC445,"^",4))
30 . S TOTAL=TOTAL+$P(PRC445,"^",5)
31 D IVCOTS^PRCPSFIV
32 Q $S($G(GECSFMS("DA"))>0:1,1:0)
Note: See TracBrowser for help on using the repository browser.