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

ACGSVEND.m

Go to the documentation of this file.
ACGSVEND ;IHS/OIRM/DSD/THL - ADD/EDIT VENDORS; [ 03/27/2000   2:22 PM ]
 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
 ;;ROUTINE TO ADD AND EDIT VENDOR DATA
EN ;EP;TO ADD OR EDIT CIS VENDOR
 S AUTEDIT=""
 D ADD^AUTTVLK
 Q
EN4 ;EP;
 Q:'$G(Y)
 N ACGY
 S (ACGDA,ACGD0)=+Y,ACGY=$P(Y,U,3),ACGVENAM=$P(^AUTTVNDR(+Y,0),U)
 F  D EN2 Q:$D(ACGQUIT)
 K ACGQUIT
 Q
EN2 G:ACGY=1 EN3
 D VND
 S DIR(0)="YO",DIR("A")="Edit VENDOR DATA",DIR("B")="NO"
 W !
 D DIR^ACGSDIC
 I Y'=1 S ACGQUIT="" Q
EN3 S ACGY="",DIE="^AUTTVNDR(",DA=ACGDA,DR="[AUT VENDOR EDIT]"
 W !!
 S DY=18,DX=0,ACGDDIE="VND^ACGSVEND",ACGMESS=ACGVENAM
 D DIE^ACGSDIC
 I $D(ACGCWIN) X ACGCWIN
 K ACGDDIE,ACGMESS,DX,DY
 Q
VND ;EP;TO PRINT CIS VENDOR DATA
 W:$D(IOF) @IOF
 W ?9,@ACGON,"VENDOR",@ACGOF," DATA FOR: ",@ACGON,ACGVENAM,@ACGOF,!
 K DXS,DIP,DC
 S D0=ACGD0
 D ^ACGPVND
 K DXS,DIP,DC
 Q
SP ;XEP;TO ADD OR EDIT A SMALL PURCHASE VENDOR
 F  D SP1 Q:$D(ACGQUIT)
SPEXIT K ACGVENAM,ACGDA,ACGD0
 Q
SP1 K ACGY,X
 D TITLE^ACGSMENU
 W !!?28,"ADD OR EDIT SMALL PURCHASE VENDOR DATA"
 S (DIC,DIE)="^AUTTVNDR(",DIC(0)="AELMQZ",DIC("A")="VENDOR..............: ",DIC("DR")="",DLAYGO=9999999.11
 W !!!?21,"|" F ACGI=1:1:30 W "="
 W "|"
 D DIC^ACGSDIC
 I U[$E(X)!(+Y<1) S ACGQUIT="" Q
SP4 ;EP;
 Q:'$G(Y)
 N ACGY
 S (ACGDA,ACGD0)=+Y,ACGY=$P(Y,U,3),ACGVENAM=$P(^AUTTVNDR(+Y,0),U)
 F  D SP2 Q:$D(ACGQUIT)
 K ACGQUIT
 Q
SP2 G:ACGY=1 SP3
 D SPD
 S DIR(0)="YO",DIR("A")="Edit VENDOR DATA",DIR("B")="NO"
 W !
 D DIR^ACGSDIC
 I Y'=1 S ACGQUIT="" Q
SP3 S ACGY="",DIE="^AUTTVNDR(",DA=ACGDA,DR="[AUT SMALL PURCHASE VENDOR]"
 W !
 D DIE^ACGSDIC
 Q
TOB K ACGQUIT
 S DIR(0)="SO^A1:Small Business Concern;A2:Large Business Concern;A3:Domestic Outside U.S./Foreign;A4:Other Entity",DIR("A")="TYPE OF BUSINESS...."
 I $P(^AUTTVNDR(ACGDA,11),U,26)'="" S ACG1126=$P(^(11),U,26),DIR("B")=$S(ACG1126<4:"A1",ACG1126=4!(ACG1126=5):"A2",1:"A1")
 E  S DIR("B")="A1"
 D DIR^ACGSDIC
 I $D(ACGQUIT)!(X="") W !!,*7,"TYPE OF BUSINESS required" G TOB
 S ACG1126=Y
TOV K ACGQUIT
 S DIR(0)="SO^1:Small Disadvantages Business;2:Woman-Owned Small Business;3:Sheltered Workshop;4:UNICOR;5:Other",DIR("A")="TYPE OF VENDOR......"
 I $P(^AUTTVNDR(ACGDA,11),U,15)'="",$P(^(11),U,15)=1 S DIR("B")=2
 E  I $P(^AUTTVNDR(ACGDA,11),U,26)'="" S ACG1115=$P(^(11),U,26),DIR("B")=$S(ACG1115=1:1,ACG1115=10:3,1:5)
 E  S DIR("B")=5
 D DIR^ACGSDIC
 I $D(ACGQUIT)!(X="") W !!,*7,"TYPE OF VENDOR required" G TOV
 S ACG1115=Y
 S DA=ACGDA,DIE="^AUTTVNDR(",DR="1115////"_$S(ACG1115=2:1,1:2)_";1126////"_$S(ACG1115=1:1,ACG1115=3!(ACG1115=4):10,ACG1126="A2"!(ACG1126="A4"):5,1:3)
 D DIE^ACGSDIC
 Q
SPD ;EP;TO PRINT SMALL PURCHASE VENDOR DATA
 W:$D(IOF) @IOF
 W ?9,@ACGON,"VENDOR",@ACGOF," DATA FOR: ",@ACGON,ACGVENAM,@ACGOF,!!
 K DXS,DIP,DC
 S D0=ACGD0
 D ^ACGPSPD
 K DXS,DIP,DC
 Q
DIC D ^DIC K DIC,DA,DD,DR,DINUM Q
DIE L +@(DIE_DA_")"):4
 I '$T W !!,"Entry being edited.  Try Later." H 2 Q
 D ^DIE
 L -@(DIE_DA_")"):0
 K DIE,DA,DR
 Q
DIR D ^DIR S:$D(DIRUT) ACGQUIT="" K DIR,DIRUT,DUOUT,DTOUT Q