source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCFFUA1.m@ 1087

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

initial load of WorldVistAEHR

File size: 3.3 KB
Line 
1PRCFFUA1 ;WISC/SJG-ROUTINE TO PROCESS OBLIGATIONS ;4/27/94 11:30
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5SC ; Display Obligation Data
6 N LABEL S LABEL=$P(PO(0),U,2),PRCFA("IDES")=$S((LABEL=1)!(LABEL=2):"Purchase Order",LABEL=8:"Requisition",1:"Purchase Order")
7 I '$D(IOF)!('$D(IOM)) S IOP="HOME" D ^%ZIS K POP
8 W @IOF D HDR I $P(PRCFA("MOD"),U)="M" D ORG
9 K II W !!?(IOM-37\2),PRCFA("IDES")_" - "_$P(PO(0),"^"),!!," COST CENTER: "_$P(PO(0),"^",5),?IOM\2-4,"CONTROL POINT: "_$P(PO(0),"^",3)
10 W ! S II=0 F S II=$O(^PRC(442,PRCFA("PODA"),22,II)) Q:(II="")!(II'>0) D
11 .N BOC,SHIP
12 .S BOC=^PRC(442,PRCFA("PODA"),22,II,0),SHIP=+BOC
13 .Q:'SHIP
14 .W !,?$X+3,"BOC: ",$P(BOC,U),?IOM\2,"AMOUNT: $ "_$J($P(BOC,U,2),10,2)
15 D GENDIQ^PRCFFU7(442,+PO,13.05,"E","")
16 I $G(PRCTMP(442,+PO,13.05,"E")) D
17 .K MSG W !!
18 .S MSG(1)=" ESTIMATED SHIPPING BOC:"
19 .S MSG(2)=" "_$G(PRCTMP(442,+PO,13.05,"E"))
20 .D EN^DDIOL(.MSG) K MSG
21 .Q
22 W !!,"Net Cost of Order: ",?30,"$",$J($P(PO(0),U,16),10,2)
23 I $P(PRCFA("MOD"),U)="M" D PAUSE^PRCFFERU
24 Q
25CPBAL ; Display Control Point Offical's Balance
26 D HDR
27 W !!,"Net Cost of Order: ",?30,"$",$J($P(PO(0),U,16),10,2)
28 D CPBAL^PRCFFMO1 I $D(PRCF("NOBAL")) K PRCF("NOBAL")
29 I $P(PRC("PARAM"),"^",17)="Y" W !!,"Fiscal Status of Funds for Control Point" W !!,"Status of Funds Balance: ",?30,"$",$J($P(^PRC(420,PRC("SITE"),1,+$P(PO(0),U,3),0),U,7),10,2),!,"Estimated Balance:",?30,"$",$J($P(^(0),U,8),10,2)
30 Q
31HDR ; Display header
32 I '$D(IOINHI) D HILO^PRCFQ
33 D HDR^PRCFFER
34 Q
35ORG ; Display original info
36 W !! K MSG S MSG(3)="The following information appears on the original and any previously amended"
37 S MSG(4)=PRCFA("IDES") S:$D(^PRC(442,+PO,6)) MSG(4)=MSG(4)_"s" S MSG(4)=MSG(4)_":"
38 I $G(PRCFA("RETRAN"))=1,$G(FISCEDIT)=1 S MSG(1)="These original values have been edited by Fiscal in this option!",MSG(2)=" "
39 D EN^DDIOL(.MSG) K MSG W !
40 Q
41GET ; Display amended BOC info
42 D PAUSE^PRCFFERU,HDR S FILE=$$FILE^PRCFFUA()
43 K MSG S MSG(1)="The following information appears on the amended "_PRCFA("IDES")
44 S MSG(2)="as listed in the DESCRIPTION OF MODIFICATION:"
45 W ! D EN^DDIOL(.MSG) W ! K MSG
46GETAMD I FILE=443.6 D Q
47 .S D0=$S($D(PRCHPO):PRCHPO,1:D0),D1=$S($D(PRCHAM):PRCHAM,1:D1)
48 .Q:'$D(^PRC(443.6,D0,6,D1)) S PRCHD0=^(D1,0),PRCHD1=^(1),PRCHDP0=^PRC(443.6,D0,0),PRCHDP1=^PRC(443.6,D0,1)
49 .S PRCHDAV=$S($P(PRCHD0,U,8)="Y":1,1:0),PRCHLC1=6,PRCHLC2=0
50 .D ITEM^PRCHDAM
51GETORG I FILE=442 D Q
52 .D:$D(^PRC(442,D0,6,PRCFAA,3))
53 ..K ^UTILITY($J,"W") D START^PRCHDP5(D0,PRCFAA)
54 ..W ! S J=0 F S J=$O(^UTILITY($J,"W",1,J)) Q:'J W !,?8,^(J,0)
55 ..Q
56 .D:$D(^PRC(442,D0,6,PRCFAA,2))
57 ..K ^UTILITY($J,"W") S DIWL=1,DIWR=60
58 ..S PRCHJ=0 F S PRCHJ=$O(^PRC(442,D0,6,PRCFAA,2,PRCHJ)) Q:'PRCHJ S X=^(PRCHJ,0) D DIWP^PRCUTL($G(DA))
59 ..W ! S J=0 F S J=$O(^UTILITY($J,"W",1,J)) Q:'J W !?8,^(J,0)
60 ..Q
61 .Q
62 Q
63SF1 ; Line item roll-up into BOCs for amendment
64 N LOOP,LAST,LOOPVAL S (LOOP,LAST)=0
65 I $G(PRCFA("RETRAN"))=1 D ^PRCFFUA2
66 S %X="^PRC(442,PRCHPO,22,",%Y="^PRC(443.6,PRCHPO,22," D %XY^%RCR
67 F S LOOP=$O(^PRC(442,PRCHPO,22,LOOP)) Q:LOOP'>0 D
68 .S LOOPVAL=$G(^PRC(442,PRCHPO,22,LOOP,0)),$P(LOOPVAL,U,2)=0
69 .S ^PRC(442,PRCHPO,22,LOOP,0)=LOOPVAL I $P(LOOPVAL,U,3)'=991,$P(LOOPVAL,U,3)>LAST S LAST=$P(LOOPVAL,U,3)
70 .Q
71 S DA=PRCHPO D ^PRCHAMYC,^PRCHSF1
72 K ^PRC(443.6,PRCHPO,22),%X,%Y
73 Q
Note: See TracBrowser for help on using the repository browser.