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

ACRFUFMD.m

Go to the documentation of this file.
  1. ACRFUFMD ;IHS/OIRM/DSD/AEF - DRIVER TO CORE OPEN DOCUMENTS MATCH FOR UFMS [ 05/21/2007 9:44 AM ]
  1. ;;2.1;ADMIN RESOURCE MGMT SYSTEM;**22**;NOV 05, 2001
  1. ;LOOP THROUGH CORE OPEN DOCUMENT FILE AND FIND MATCH IN ARMS
  1. ;New routine ACR*2.1*22 UFMS
  1. ;
  1. EN ;EP;
  1. N I,ACRX
  1. W @IOF
  1. F I=1:1 S ACRX=$P($T(DESC+I),";",3) Q:ACRX["$$END" D
  1. .W !,ACRX
  1. .I $Y>(IOSL-6) D
  1. ..K ACROUT
  1. ..D PAUSE^ACRFWARN
  1. ..W @IOF
  1. .Q:$D(ACROUT)
  1. Q:$D(ACROUT)
  1. S DIR(0)="Y"
  1. S DIR("A")="Do you want to continue and generate the reports"
  1. S DIR("B")="NO"
  1. D ^DIR
  1. Q:'Y=1
  1. ;
  1. S ACRX="Please be patient while the files are created."
  1. D BMES^XPDUTL(ACRX)
  1. D EN^ACRFUFMZ
  1. Q
  1. ; *********************************************
  1. ;
  1. DESC ;----- ROUTINE DESCRIPTION
  1. ;;
  1. ;;This routine loops through the imported CORE Open Documents file entries and
  1. ;; attempts to match the CORE document number with ARMS documents in the FMS
  1. ;; Document, FMS Document History Record and the 1166 Approvals for Payment files
  1. ;; and sets various sub-files depending on the type of match. The sub-files can
  1. ;; be uploaded into Excel spreadsheet reports and are located in the ARMS default
  1. ;; directory where the ECS files are found (generally /usr/spool/afsdata).
  1. ;;
  1. ;;Contract Health ("CHS"), GovTrip ("GTRIP"), Payroll ("PAY") and Grant ("GR")
  1. ;; documents are not found in ARMS. The documents are listed in separate reports.
  1. ;;
  1. ;;When a document is found, the routine matches the CAN, Fiscal Year, and
  1. ;; Object Class Code supplied by CORE.
  1. ;;
  1. ;;When a match is found, the routine creates additional sub-files:
  1. ;; "ACRDOC" contains ARMS document data with Vendor information
  1. ;; "NOVNDR" contains ARMS document data for obligations without a Vendor
  1. ;; "TR" contains outstanding ARMS Travel documents including those without
  1. ;; a match to an ARMS document
  1. ;; "VNDR" contains an unique listing of all Vendors found in the matches
  1. ;; "ERR" contains every document that has a Vendor with errors found in the
  1. ;; IHS Vendor file
  1. ;; "NOHIT" contains CORE documents that could not be matched in any category
  1. ;; "NOMATCH" contains documents that were found in ARMS, but did not match
  1. ;; the criteria
  1. ;; "ITEMS" contains the obligation, payment, receiving report and invoice
  1. ;; information on the line item
  1. ;; "CEIN" contains ARMS Vendor numbers that do not match the CORE Vendor
  1. ;; "TOTALS" contains the total number of documents in each report
  1. ;;
  1. ;;$$END
  1. ;
  1. ; ************************************************
  1. AUDIT ;EP; SEARCH FOR VENDORS WITH ERROR AND FIX IF POSSIBLE
  1. ;
  1. K ^ACRZ("VEINCK")
  1. S (CORP,INDV,ACR,ERR)=0
  1. S ACRNODUP=1 ;SKIP DUPLICATE CHECK
  1. F S ACR=$O(^AUTTVNDR(ACR)) Q:'ACR D
  1. .I $$IDATE^ACRFUFMU(ACR) Q
  1. .S ACRERR=""
  1. .S OLD0=$G(^AUTTVNDR(ACR,0))
  1. .S OLD11=$G(^AUTTVNDR(ACR,11))
  1. .D NAMCHK^ACRFUFMU(ACR)
  1. .D DUNSCHK^ACRFUFMU(ACR)
  1. .D EINCHK^ACRFUFMU(ACR)
  1. .D SFX2
  1. .D BANK^ACRFUFMU(ACR)
  1. .S NEW0=$G(^AUTTVNDR(ACR,0))
  1. .S NEW11=$G(^AUTTVNDR(ACR,11))
  1. DIAG .I $D(^AUTTVNDR(DT)) D
  1. ..W !,$G(^AUTTVNDR(DT,0))
  1. .I OLD0'=NEW0 W !,ACR,?8,NEW0,!?20,ACRERR
  1. .I OLD11'=NEW11 W !,ACR,?8,NEW11,!?20,ACRERR
  1. Q
  1. ; *********************************
  1. SFX2 ;
  1. S ACRSFX=$$SFX^ACRFUFMU(ACR)
  1. Q:$L(ACRSFX)=2
  1. N HIT,I
  1. S HIT=0
  1. I $L(ACREIN)=10 D Q
  1. .I ACRSFX="" F I="00":"01" D Q:HIT
  1. ..I $L(I)=1 S I="0"_I
  1. ..I '$D(^AUTTVNDR("E",ACREIN_I)) D Q
  1. ...S DIE="^AUTTVNDR("
  1. ...S DA=X
  1. ...S DR="1102////"_I
  1. ...D DIE^ACRFDIC
  1. ...S HIT=1
  1. S ^ACRZ("VEINCK","ERR",ACR)=^AUTTVNDR(ACR,0)_U_ACREIN_ACRSFX_": "_ACRERR
  1. Q
  1. CLEAN ;FIX
  1. W !,ACR,?15,^AUTTVNDR(ACR,0)
  1. S DIE="^AUTTVNDR("
  1. S DA=ACR
  1. S DR=".05////@" ;REMOVE INACTIVE DATE
  1. D DIE^ACRFDIC
  1. W !?15,^AUTTVNDR(ACR,0)
  1. Q