Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRCEDRE0

PRCEDRE0.m

Go to the documentation of this file.
  1. PRCEDRE0 ;WISC/LDB-ENTER/EDIT DAILY RECORD CONT ; 06/09/93 1:24 PM
  1. ;;5.1;IFCAP;**180**;Oct 20, 2000;Build 5
  1. ;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;Called from PRCEDRE and PRCEDRE1 to increase authorization amount
  1. ;
  1. ;PRC*5.1*180 RGB 10/22/12 Added switch PRCE424 coming from 1358 processing
  1. ;to insure new entry check (EN1^PRCSUT3) uses file 424, not file 410.
  1. ;
  1. AMTOVR W $C(7),!,"This amount exceeds the authorization balance by $",$FN((AAMT-ABAL),",P",2)
  1. W !!,"The available authorization balance is $",$FN(ABAL,",P",2)
  1. W $C(7),!!,"This daily record amount cannot be entered until an",!,"increase has been made to the authorization."
  1. K DIR N X,Y S PRCADJ=0,DIR("A")="Would you like to increase the authorization amount at this time by $"_$FN((ABAL-AAMT),",-",2),DIR(0)="Y0",DIR("B")="NO" D ^DIR I 'Y S PRCADJ=1 Q
  1. W !!,"Checking the available obligation balance . . ."
  1. S BAL=$$BAL^PRCH58(PODA)
  1. I $P(BAL,U,3)+AAMT-ABAL>+BAL D Q
  1. . W !,"This authorization amount will exceed the obligation balance by $",$FN($P(BAL,U,3)+AAMT-ABAL-BAL,",P",2) S PRCADJ=2 D ASK^PRCEADJ
  1. . W !,"This daily record cannot be posted until Fiscal has obligated"
  1. . W !,"the increase adjustment."
  1. S PRCADJ=0,AAMT1=AAMT,AAMT=(AAMT-ABAL) D ADJ S AAMT=AAMT1 Q:PRCADJ
  1. S $P(^PRC(424,AUDA,0),U,5)=ABAL+(AAMT-ABAL),$P(^(0),U,12)=$P(^(0),U,12)+(AAMT-ABAL) D BALUP^PRCH58(PODA,(AAMT-ABAL)) Q
  1. ADJ ;Called to make adjustment entry in 424.1 for authorization adjustment
  1. K DIC S DLAYGO=424.1,DIC="^PRC(424.1,",DIC(0)="L",X=""""_$P(AUDA0,U)_"-"_0_"""",DIC("DR")=".011////^S X=""A"";.02////^S X=AUDA;.03////^S X=AAMT;.04///^S X=""NOW"";05////^S X=DUZ"
  1. D ^DIC S:Y<0 PRCADJ=1 K DIC,X,Y
  1. Q
  1. ;WISC/PLT - add authorization from daily actvity option
  1. AU(PRC424) ;add an authorization record called from PRCEDRE
  1. S PRC424=""
  1. D YN^PRC0A(.X,.Y,"Add an authorization","","YES") G EXIT:Y'=1
  1. N AMT,PRCF,DIC,DIR,DLAYGO,DIE,DA,DR,Y,X,TRDA,ER,TIME,IN,ABAL,ACT,AUDA,BAL1,BAL2,Z,X,Y
  1. D NOW^%DTC S TIME=% K Y
  1. S (X,Z)=PRC("SITE")_"-"_$P($G(TRNODE(4)),U,5)
  1. D WAIT^PRCFYN S PRCE424=1 K MSG D EN1^PRCSUT3 K PRCE424 I $D(MSG),MSG'="" S X=MSG D MSG^PRCFQ K MSG G EXIT ;PRC*5.1*180
  1. S DIC="^PRC(424,",DLAYGO=424,DIC(0)="LXZ" D ^DIC I Y<0 S X="Unable to create an new entry. Contact Application Coordinator.*" D MSG^PRCFQ K MSG G EXIT ;PRC*5.1*180
  1. W !,"This entry has been assigned transaction number: ",$P(X,"-",3),"."
  1. S DIE=DIC,(AUDA,DA)=+Y,AUDA0=Y(0)
  1. D NOW^%DTC S TIME=% K Y
  1. D BALDIS^PRCEAU1
  1. AMT ;ask authorization amount
  1. G:$D(DIRUT) EXIT K DIR S DIR(0)="N^.01:999999999.99:2",DIR("A")="AUTHORIZATION AMOUNT",DIR("?")="enter the amount of this authorization or '^' to QUIT" D ^DIR
  1. I $D(DIRUT)!(Y<.01) D AMTMSG,AMTDEL G EXIT
  1. ;balance alert message
  1. D BUL^PRCEAU0
  1. I Y>(+BAL-$P(BAL,U,3)) D G EXIT
  1. . W $C(7),!,"This amount will EXCEED obligation balances by $",$FN((+BAL-$P(BAL,U,3))-Y,",",2),"."
  1. . W !!?20,"SERVICE BALANCE: $",$FN(+BAL-$P(BAL,U,3),",",2),!! H 3
  1. . W !!,"This authorization cannot be entered until CP/Fiscal have increased ",!,"and obligated the adjustment." K DIR,DIC
  1. . D ADJMSG,AMTDEL
  1. EN1 S BAL1=+Y,DR=".02////^S X=PODA;.03////^S X=""AU"";.07////^S X=TIME;.08////^S X=DUZ;.05////^S X=BAL1;.12////^S X=BAL1;.13////^S X=BAL1;.1;1.1"
  1. D ^DIE
  1. I $D(Y) D DEL^PRCEAU0 G EXIT
  1. Q:'$D(^PRC(424,AUDA,0)) S X(1)=0
  1. ;add record in file 424.1 and edit balance in file 442
  1. D LREC^PRCEAU0 S:$D(^PRC(424,AUDA,0)) PRC424=AUDA
  1. EXIT L:$D(AUDA) -^PRC(424,AUDA) K DIK,DIRUT,DIROUT,TRNODE,DTOUT,DUOUT Q
  1. AMTMSG S X="----Amount missing - authorization deleted----" D MSG^PRCFQ Q
  1. ADJMSG S X="Authorization deleted pending adjustment action by CP/Fiscal.." D MSG^PRCFQ Q
  1. AMTDEL S DA=AUDA,DIK="^PRC(424," D ^DIK Q