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

PRCFFU13.m

Go to the documentation of this file.
  1. PRCFFU13 ;WISC/SJG-ROUTINE TO PROCESS OBLIGATIONS CONT ;6/17/11 17:58
  1. V ;;5.1;IFCAP;**158**;Oct 20, 2000;Build 1
  1. ;Per VHA Directive 2004-038, this routine should not be modified.
  1. ; Allows FIscal to edit Cost Center and BOCs prior to 1358 obligation
  1. 1358 ; 1358 Correction
  1. N CCEDIT,BOCEDIT D PROMPT
  1. Q:'Y!($D(DIRUT))
  1. S ESIGCHK=$$VERIFY^PRCSC1(OB) I 'ESIGCHK W !!,"This 1358 Obligation has been tampered with. Please notify IFCAP APPLICATION COORDINATOR." Q
  1. S (BOCEDIT,CCEDIT)=0
  1. S OLDCC=$P(TRNODE(3),U,3),OLDBOC=+$P(TRNODE(3),U,6)
  1. W !! K MSG S MSG="...now editing Cost Center and BOC information..." D EN^DDIOL(MSG) K MSG W !
  1. D OB^PRCS58OB(DA)
  1. S:+OLDCC'=+NEWCC CCEDIT=1 S:+OLDBOC'=+NEWBOC BOCEDIT=1
  1. I CCEDIT!(BOCEDIT) D Q
  1. .S FISCEDIT=1,ESIGMSG="",ROUTINE=$T(+0)
  1. .D RECODE^PRCSC1(OB,.ESIGMSG)
  1. .I ESIGMSG<1 D
  1. ..S:'$D(ROUTINE) ROUTINE=$T(+0)
  1. ..W !!,$$ERROR(ROUTINE,ESIGMSG)
  1. ..W:ESIGMSG=0!(ESIGMSG=-3) !,"Notify IFCAP APPLICATION COORDINATOR!",$C(7)
  1. ..S DIR(0)="EAO",DIR("A")="Press RETURN to continue" D ^DIR K DIR
  1. ..Q
  1. .N X S X=$P($G(TRNODE(4)),U,5) D VER^PRCH58OB(.PRC,.X) I X]"" D
  1. ..S PO=POIEN K ^PRC(442,POIEN,22) S NODE=$G(^PRC(442,POIEN,22,0)) I NODE="" D
  1. ...S ^PRC(442,POIEN,22,0)="^"_$P(^DD(442,41,0),U,2)
  1. ...N DA S DIE=442,DA=POIEN,DR="3///^S X=+NEWBOC" D ^DIE K DIE,DR
  1. ...D MSG1,NODE22^PRCFFU5
  1. .Q
  1. D MSG6
  1. Q
  1. PROMPT ; Prompt for user
  1. S DIR(0)="Y",DIR("A")="Should the Cost Center or BOC information be edited at this time",DIR("B")="NO"
  1. S DIR("?")="Enter 'NO' or 'N' or 'RETURN' if no editing is needed."
  1. S DIR("?",1)="Enter '^' to exit the option."
  1. S DIR("?",2)="Enter 'YES' or 'Y' to edit this information."
  1. W ! D ^DIR K DIR
  1. Q
  1. ; Message processing
  1. MSG1 K MSG W !! S MSG="...now recalculating FMS accounting lines..." D EN^DDIOL(MSG) K MSG W !
  1. Q
  1. ;
  1. MSG2 K MSG W !! S MSG(1)="...Cost Center is missing - cannot continue..."
  1. MSG21 S MSG(2)=" ",MSG(3)="No further action is being taken on this obligation."
  1. D EN^DDIOL(.MSG) K MSG W !
  1. Q
  1. ;
  1. MSG3 K MSG W !! S MSG="BOC "_+SA_" is not valid with Cost Center "_$P(PO(0),U,5)_"."
  1. D EN^DDIOL(MSG) K MSG W !
  1. Q
  1. ;
  1. MSG4 W !! S DIR(0)="Y",DIR("A",1)="I will now enter BOC "_+SA_" on all line items.",DIR("A")="Is this OK",DIR("B")="YES"
  1. D ^DIR K DIR
  1. Q
  1. ;
  1. MSG5 K MSG W !! S MSG="...now changing the BOCs on all line items..."
  1. D EN^DDIOL(MSG) K MSG W !
  1. Q
  1. MSG6 I (CCEDIT=1)!(BOCEDIT=1) Q
  1. K MSG W !!
  1. S MSG(1)=" ",MSG(2)=" "
  1. S:CCEDIT=0 MSG(1)="Cost Center has not changed.",MSG(3)=" "
  1. S:BOCEDIT=0 MSG(2)="BOC has not changed.",MSG(4)=" "
  1. S MSG(5)="No further editing is being done on this obligation.",MSG(6)=" "
  1. S MSG(7)="Returning to the Obligation processing."
  1. D EN^DDIOL(.MSG) K MSG W !
  1. Q
  1. ERROR(ROUTINE,ERROR) ;
  1. I ROUTINE'="PRCUESIG" G NEXT
  1. I ERROR=-3 Q "NO SIGNATURE BLOCK IN FILE 200."
  1. I ERROR=-2 Q "TIME OUT OCCURRED DURING SIGNING PROCESS."
  1. I ERROR=-1 Q "USER CANCELLED SIGNING PROCESS."
  1. I ERROR=0 Q "INVALID SIGNATURE ENTERED."
  1. Q "PROBLEM WITH ELECTRONIC SIGNATURE. ERROR= "_ERROR_" CALLING ROUTINE "_ROUTINE
  1. NEXT I ERROR=-4 Q "CAN'T RE-SIGN RECORD."
  1. I ERROR=-3 Q "NO VALID USER NUMBER FOR FILING."
  1. I ERROR=-2 Q "NO SIGNATURE BLOCK IN FILE 200."
  1. I ERROR=-1 Q "A REQUIRED RECORD IS NULL."
  1. Q "PROBLEM WITH ELECTRONIC SIGNATURE. ERROR= "_ERROR_" CALLING ROUTINE "_ROUTINE
  1. Q