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

ACRF16EN.m

Go to the documentation of this file.
ACRF16EN ;IHS/OIRM/DSD/AEF - PATCH 16 ENVIRONMENT CHECK ROUTINE [ 03/09/2005  3:52 PM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**16**;NOV 05, 2001
 ;
EN ;EP -- MAIN ENTRY POINT
 ;
 ;CALL GENERIC EN^ACRFPENV(ACRPCHN,ACRPCHS,.XPDQUIT) ENVIRONMENT
 ;CHECK ROUTINE
 ;
 ;      WHERE:
 ;      ACRPCHN  =  PATCH NAME
 ;      ACRPCHS  =  PREREQUISITE PATCH NUMBERS
 ;      XPDQUIT  =  KIDS INSTALL TERMINATOR VARIABLE OUTPUT
 ;                  1 = QUIT
 ;
 K XPDQUIT
 ;
 S ACRPCHN="ACR*2.1*16"
 S ACRPCHS="1,2,3,4,5,6,7,8,12,13,14,15"          ;CHANGE AS NEEDED
 ;
 D EN^ACRFPENV(ACRPCHN,ACRPCHS,.XPDQUIT)
 Q:+$G(XPDQUIT)=1
 D CHKPAY
 I +$G(XPDQUIT)=1 D BMES^XPDUTL("Installation of patch terminated.")
 ;
 Q
 ;
CHKPAY ; Check payments made and batches cleared
 I $D(^AFSHRCDS(6,"D")) D
 .  D BMES^XPDUTL("There are payments in a Finance Red Batch.")
 .  D MES^XPDUTL("Please notify the Finance Officer.")
 . S XPDQUIT=1
 D BATCHL
 Q
 ;
BATCHL ;EP;LIST OPEN BATCHS DUE TODAY OR EARLIER
 N J,X,Y,ACRFYDA,ACRBATDA
 K ACR,ACRPAY
 S ACRFYDA=0
 F  S ACRFYDA=$O(^AFSLAFP("K","O",ACRFYDA)) Q:'ACRFYDA  D
 .S ACRFY=$P(^AFSLAFP(ACRFYDA,0),U)
 .S ACRBATDA=0
 .F  S ACRBATDA=$O(^AFSLAFP("K","O",ACRFYDA,ACRBATDA)) Q:'ACRBATDA  D PAY
 I $G(J)>0 D
 .  D BMES^XPDUTL("There are open batches in ARMS Payment Management.")
 .  D MES^XPDUTL("Please notify the Finance Officer.")
 .  S XPDQUIT=1
 Q
 ;
PAY ;EP;SET LOCAL ACRPAY ARRAY
 S X=$G(^AFSLAFP(ACRFYDA,1,ACRBATDA,0))
 Q:$P(X,U)=""!'$P(X,U,2)!($P($P(X,U,2),".")>DT)
 Q:('$D(ACREXP)&$P(X,U,5))!+$G(^AFSLAFP(ACRFYDA,1,ACRBATDA,2))
 Q:$D(ACRCERT)&'$O(^AFSLAFP(ACRFYDA,1,ACRBATDA,1,0))
 S J=$G(J)+1
 Q