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

ACRFEA42.m

Go to the documentation of this file.
ACRFEA42 ;IHS/OIRM/DSD/THL,AEF - EDIT FINANCIAL DATA - CON'T;  [ 03/28/2007   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**22**;NOV 05, 2001
 ;;UTILITY ROUTINE WITH MULTIPLE ENRY POINTS FOR VARIOUS DOCUMENT
 ;;EDITING AND PROCESSING FUNCTIONS
PR ;EP;TO PRINT DOCUMENT DURING DATA ENTRY/EDIT
 I ACRENTRY["OBL"!(ACRENTRY="PO"),'$D(ACRSS6),'$D(ACROUT) D
 .S ACRTXDA=$P(ACROBLAP,U,4)
 .I ACRTXDA=11 D  Q:$D(ACROUT)
 ..S DIR("A")="Include Purchase Order Terms and Conditions?  "
 ..D OUT^ACRFEA2
 ..Q:$D(ACROUT)!$D(ACRQUIT)
 ..S:ACRY=1 ACRPOTC=""
 .D PRINT^ACRFSHIP
 .D PSC^ACRFPO1:ACRREFX=103!(ACRREFX=349)!(ACRREFX=326)
 .Q:$D(ACROUT)
 .K ACRQUIT
 .S (ACRPRT,ACRREQST)=""
 .I $D(ACRREV),ACRREF=103!(ACRREF=349)!(ACRREF=326)!(ACRREF=210) D
 ..S ACRREF=116
 ..S ACRREFDA=$O(^AUTTDOCR("B",ACRREF,0))
 .N ACRREV
 .S ACRREFX=$S(ACRENTRY'="PO":ACRREF,1:ACRREFX)
 .D REQ^ACRFQ
 .K ACRPRT,ACRREQST
 K ACRQUIT
 Q
NJ ;EP;EDIT NARRATIVE OR JUSTIFICATION
 I ACRREF=148 D COURSE^ACRFSS3 Q
 I "^103^349^326^116^204^210^"[(U_ACRREFX_U),'$D(ACRDIE)!($G(ACRDR)="") S ACRDIE="^ACROBL(",ACRDR="[ACR REQUEST INFO]"
 D SCREEN^ACRFAU
 D:'$D(ACRSCREN) DISP
 N ACRI
 I '$D(ACRZDA)#2,$D(ACRDOCDA)#2 S ACRZDA=ACRDOCDA
 S:'$D(ACRENTRY)#2 ACRENTRY=""
 I $D(ACRSCREN) D EDIE1^ACRFEA2 Q
 D EDIE^ACRFEA2
 Q
QD ;EP;EDIT QUANTITY DISCOUNT INFO
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR="[ACR QUANTITY DISCOUNT]"
 D DIE^ACRFDIC
 Q
AP ;EP;SEND DOCUMENT FOR APPROVAL
 I '$D(ACRPRCS),'$D(ACRREV),$D(^ACRSS("C",ACRDOCDA)) D APPROVE^ACRFEA21
 K ACRQUIT,ACRPRT,ACROUT
 Q
ASUM ;EP;TO PRINT ACCOUNT SUMMARY
 S ACRENTR1="LOCBAMT"
 S ACRDISDX=""
 S ACRGREF="^ACRLOCB"
 S ACRY="DEPARTMENT",DA=$P(ACRDOC0,U,6)
 W !!?5,"ACCOUNT SUMMARY YEAR-TO-DATE:"
 W !,"----------------------------------"
 D EN^ACRFDTP2
 D SUBSET^ACRFDTP2
 N ACRX
 F ACRX=ACR0,ACR2,ACR16,ACR5,ACR17 W @ACRX
 I $E(IOST,1,2)="C-",$D(ACRREV) D PAUSE^ACRFWARN
 Q
CR ;EP;CHANGE TYPE OF REQUEST
 S DIR("A")="    Change Type of Request? "
 D OUT^ACRFEA2
 Q:$D(ACROUT)!$D(ACRQUIT)
 Q:ACRY'=1
CR1 S DA=ACRDOCDA,DR="907      Type of Request"
 S DIE="^ACROBL("
 D DIE^ACRFDIC
 S ACRTXDA=$P(ACROBLAP,U,4)
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR=".04////"_ACRTXDA_";.07////"_ACRTXDA
 D DIE^ACRFDIC
 S DA=ACRDOCDA
 S DIE="^ACROBL("
 S DR="907////"_ACRTXDA
 D DIE^ACRFDIC
 Q
BP ;EP;
 D BAPPEND^ACRFBOIL
 S DIR("A")="Add Boiler Plate Statement? "
 D OUT^ACRFEA2
 Q:$D(ACROUT)!$D(ACRQUIT)
 Q:ACRY'=1
BP1 D DOCBOIL^ACRFBOIL
 Q
RV ;EP;TO ENTER REQUESTED VENDOR DATA
 F  D RV2 Q:$D(ACRQUIT)!$D(ACROUT)
 K ACRQUIT
 Q
RV2 ;S DIR("A")="Enter/Edit Requested Vendor? "          ;ACR*2.1*22.11l
 ;D ADD^ACRFVLK                                       ;ACR*2.1*22.11l
 ;Q:$D(ACRQUIT)                                       ;ACR*2.1*22.11l
 ;Q:$D(ACROUT)                                        ;ACR*2.1*22.11l
 W !
 ;I $P(^ACRDOC(ACRDOCDA,0),U,4)=30,'$P($G(^ACRDOC(ACRDOCDA,"PO")),U,5) S ACRY=1  ;ACR*2.1*22.11l
 ;E  D OUT^ACRFEA2                             ;ACR*2.1*22.11l
 ;Q:$D(ACROUT)!$D(ACRQUIT)                     ;ACR*2.1*22.11l
 ;Q:ACRY'=1                                    ;ACR*2.1*22.11l
RV1 ;EP;TO ENTER REQUESTED VENDOR DATA ;HEAVILY MODIFIED TO ALLOW SELECTION ONLY;ACR*2.1*22.11l 
 ;THE CODE BELOW WILL CHECK TO SEE IF THE VENDOR IS ACTIVE
 ;AND WILL NOT ALLOW USER TO CHOOSE AN INACTIVE VENDOR
 D FINDVND                                     ; ACR*2.1*22.11l
 Q:ACRQUIT=1                                   ; ACR*2.1*22.11l
 ;
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR=$S(ACRREF'=148:"103070",1:"148181")   ;CONTRACTOR OR TRAINING PAY FIELDS
 ;S DR=DR_"///"_ACRVND                      ; ACR*2.1*22.11l
 S DR=DR_"////"_+ACRVND                     ;STUFF POINTER; ACR*2.1*22.11l
 ;W !!?21,"|==============================|"
 D DIE^ACRFDIC
 D DISP^ACRFVLK                           ; ACR*2.1*22.11l
 S ACRQUIT=""                             ; ACR*2.1*22.11l
 S ACRDOC0=^ACRDOC(ACRDOCDA,0)            ;REFRESH VARIABLE ACR*2.1*22.11l
 I ACRREF'=148,$P($G(^ACRDOC(ACRDOCDA,"PO")),U,5) Q
 I ACRREF=148,+$G(^ACRDOC(ACRDOCDA,"TRNG3")) Q
 I $P(^ACRDOC(ACRDOCDA,0),U,4)=30,'$P($G(^ACRDOC(ACRDOCDA,"PO")),U,5) D  Q
 .W !!,"You must enter a vendor from the STANDARD Vendor list"
 .W !,"before the OBLIGATE/PAY transaction can be completed."
 .D PAUSE^ACRFWARN
 ;.G RV1                                  ;ACR*2.1*22.11l
 ;S DA=ACRDOCDA                           ;ACR*2.1*22.11l
 ;S DIE="^ACRDOC("                        ;ACR*2.1*22.11l
 ;S DR="[ACR TMP VENDOR DATA]"            ;ACR*2.1*22.11l
 ;D DDS^ACRFDIC                           ;ACR*2.1*22.11l
 Q:'$D(ACRSCREN)
 K ACRSCREN
 W !!,"You did not select a Vendor from the Standard Vendor table."
 W !,"You may enter data on the requested Vendor."
 W !
 D DIE^ACRFDIC
 Q
DISP ;EP;TO DISPLAY FINANCIAL ACCOUNT DATA
 W @IOF
 W ?20,"Current data:"
 W !
 N DXS,DIP,DC,DN
 I $D(ACRREF),ACRREF=130!(ACRREF=600) S ACRRTN="^ACRTVL"
 S D0=$S($D(ACRZDA):ACRZDA,1:ACRDOCDA)
 D:$G(ACRRTN)]"" @ACRRTN
 Q
ATTACH ;EP;TO INDICATE NUMBER OF ATTACHMENTS
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR="13T;S:X<1 Y=""@1"";13.1;@1"
 W !
 D DIE^ACRFDIC
 Q
RS ;EP;TO REVIEW STATUS OF DOCUMENT
 S D0=ACRDOCDA
 D SETDOC^ACRFEA1
 S:'$D(ACRREFX) ACRREFX=ACRREF
 S ACRCSI=""
 D ^ACRFPAPV
 K ACRCSI
 Q
DOCSTAT ;EP;TO EDIT THE STATUS OF THE DOCUMENT IN PROCUREMENT PROCESSING
 W !!,"Describe below the current status of this document in procurement."
 W !
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR=1201
 D DIE^ACRFDIC
 Q
PDOCSTAT ;EP;TO PRINT DOCUMENT STATUS REPORT
 Q:'$D(ACRDOCDA)
 Q:'ACRDOCDA!'$D(^ACRDOC(+ACRDOCDA,12,1))
 W !!,"Procurement status report:"
 N DXS,DIP,DC,DN
 S D0=ACRDOCDA
 D ^ACRPDS
 Q
FINDVND ; Ask / Lookup Vendor               ;ACR*2.1*22.11l NEW SUBROUTINE
 W:$D(IOF) @IOF
 K DD,DO,X,Y,DIC,DA,DR,DINUM,D,DLAYGO
 S ACRQUIT=0
 S DIC="^AUTTVNDR("
 S DIC(0)="AEMQZ"
 S DIC("A")="Which Vendor? "
 S ACRVND=$$VENDOR^ACRFUFMU(ACRDOCDA)
 S DIC("B")=$S(ACRVND>0:ACRVND,1:"")     ;SET DEFAULT TO CURRENT VENDOR
 S DIC("S")="I '$$IDATE^ACRFUFMU(+Y)"    ;DO NOT ALLOW SELECTION OF INACTIVE
 D ^DIC
 I +Y<1 S ACRQUIT=1 Q
 S ACRVND=Y
 S ACRVND(0)=Y(0)
 Q