source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCEFIS.m@ 1500

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1PRCEFIS ;WISC/CTB/CLH-FISCAL UTILITIES ;09/28/93 4:22 PM
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4CLOSE ;Close/complete 1358
5 N DIR,Y,X,PRC,PRCF,PRCFA,PO,ER,ZX,DIC,DA,Z,%,STATUS,LOOK
6 S LOOK="",DIR("A",1)="This option will mark a 1358 as complete. No further authorizations",DIR("A",2)="or liquidations may be made while the document is closed.",DIR("A")="Ok to continue",DIR(0)="YO",DIR("B")="Yes" D ^DIR K DIR
7 I Y["^"!(Y=0) Q
8 D LOOKUP I '% S X="Unable to find this document. Contact application coordinator.*" D MSG^PRCFQ Q
9 I STATUS=40 S X="This 1358 has already been marked as closed." D MSG^PRCFQ Q
10 I STATUS'=100 S X="Only status of 'Obligated - 1358' documents may be closed.*" D MSG^PRCFQ Q
11 S DA=PRCFA("PODA")
12 S PO=$$BAL^PRCH58(DA) W !!,?3,"Obligation Blanace: $ ",$J($FN($P(PO(8),U),",",2),12),?48,"Service Balance: $ ",$J($FN($P(PO(8),U,3),",",2),12),!,?49,"Fiscal Balance: $ ",$J($FN($P(PO(8),U,2),",",2),12),!!
13 S DIR("A")="Okay to continue",DIR("B")="Yes",DIR(0)="YO",DIR("?")="Enter yes or <RETURN> to complete this 1358" D ^DIR K DIR
14 I Y=0!(Y["^") Q
15 W !! S X=40 D ENF^PRCHSTAT S X="Status changed to 'TRANSACTION COMPLETE'.*" D MSG^PRCFQ Q
16 ;
17REOPEN ;reopen 1358 document
18 N DIR,Y,X,PRC,PRCF,PRCFA,PO,ER,ZX,DIC,DA,Z,%,STATUS,LOOK
19 S LOOK="",DIR("A",1)="This option will reopen a 1358 and make it available for posting authorizations",DIR("A",2)="and liquidations.",DIR("A")="Okay to continue",DIR(0)="YO",DIR("B")="Yes" D ^DIR K DIR
20 I Y["^"!(Y=0) Q
21 D LOOKUP Q:'%
22 I STATUS'=40 S X="Only 1358 with status of 'Transaction Complete' may be reopened" D MSG^PRCFQ Q
23 S DA=PRCFA("PODA")
24 S PO=$$BAL^PRCH58(DA) W !!,?3,"Obligation Blanace: $ ",$J($FN($P(PO(8),U),",",2),12),?48,"Service Balance: $ ",$J($FN($P(PO(8),U,3),",",2),12),!,?49,"Fiscal Balance: $ ",$J($FN($P(PO(8),U,2),",",2),12),!!
25 S DIR("A")="Okay to continue",DIR("B")="Yes",DIR(0)="YO",DIR("?")="Enter yes or <RETURN> to REOPEN this 1358" D ^DIR K DIR
26 I Y=0!(Y["^") Q
27 W !! S X=100 D ENF^PRCHSTAT S X="Status changed to 'Obligated - 1358'.*" D MSG^PRCFQ
28 Q
29 ;
30LOOKUP ;lookup obligation
31 S PRCF("X")="AS" D ^PRCFSITE Q:'%
32 D LIQ^PRCH58LQ(.PRCFA,.Y,.ER,.PO) I 'ER S %=0 Q
33 W ! S STATUS="" I $G(PO(7))]"",$D(^PRCD(442.3,$P(PO(7),U),0)) S STATUS=$P(PO(7),U,4)
34 I STATUS="" S X="Invalid status - no action taken*" D MSG^PRCFQ S %=0
35 I STATUS=105 S X="1358 has been cancelled. No action taken.*" D MSG^PRCFQ S %=0 Q
36 S %=1 Q
37 ;
Note: See TracBrowser for help on using the repository browser.