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

ACRFPQT.m

Go to the documentation of this file.
ACRFPQT ;IHS/OIRM/DSD/THL,AEF - PREPARE REQUEST FOR QUOTES: [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
EN ;EP;TO ADD BIDDERS TO THE BIDDERS LIST
 F  D EN1 Q:$D(ACRQUIT)!$D(ACROUT)
EXIT K ACR,ACRQUIT,ACRX,ACRY,ACRZ
 Q
EN1 ;
 N ACR,ACRJ,ACRVDA
 D BIDDERS:$D(^ACRDOC(ACRDOCDA,60,0))
 D CHOICE
 Q
CHOICE S DIR(0)="SO^1:ADD Vendor to BIDDER'S List"_$S($D(^ACRDOC(ACRDOCDA,60,0)):";2:REMOVE Vendor from BIDDER'S List;3:PRINT Request for Quote for each BIDDER",1:"")
 S DIR("A")="Which one"
 W !
 D DIR^ACRFDIC
 Q:$D(ACRQUIT)!$D(ACROUT)
 I '$G(Y) S ACRQUIT="" Q
 I Y=1 D ADD S Y=1
 I Y=2 D REMOVE S Y=2
 I Y=3 D PRINT S Y=2
 Q
ADD F  D A Q:$D(ACROUT)!$D(ACRQUIT)
 K ACRQUIT
 Q
A S DIC="^AUTTVNDR("
 S DIC(0)="AEMQZ"
 S DIC("A")="Vendor/Contractor: "
 W !
 D DIC^ACRFDIC
 I $D(ACRQUIT)!$D(ACROUT)!($G(Y)<1) S ACRQUIT="" Q
 S:'$D(^ACRDOC(ACRDOCDA,60,0)) ^ACRDOC(ACRDOCDA,60,0)="^9002196.09P"
 S X=+Y
 S (DA,DA(1))=ACRDOCDA
 S DIC="^ACRDOC("_ACRDOCDA_",60,"
 S DIC(0)="L"
 D FILE^ACRFDIC
 Q
BIDDERS W @IOF
 W !?15,"BIDDERS FOR REQUISITION NO. ",ACRDOC
 W !?15,"-------------------------------------------"
 S (ACR,ACRJ)=0
 F  S ACR=$O(^ACRDOC(ACRDOCDA,60,ACR)) Q:'ACR  D
 .S ACRJ=ACRJ+1
 .S ACRVDA=+$G(^ACRDOC(ACRDOCDA,60,ACR,0))
 .Q:'ACRVDA
 .Q:'$D(^AUTTVNDR(ACRVDA,0))
 .S ACR(ACRJ)=ACR_U_ACRVDA
 .W !?15,ACRJ
 .W ?20,$P(^AUTTVNDR(ACRVDA,0),U)
 Q
REMOVE ;REMOVE BIDDERS FROM THE BIDDERS LIST
 S DIR(0)="LO^1:"_ACRJ
 S DIR("A")="Remove which Bidder"_$S(ACRJ>1:"s",1:"")
 W !
 D DIR^ACRFDIC
 I $D(ACROUT)!$D(ACRQUIT)!'$G(Y) K ACRQUIT Q
 S ACRZ=Y
 N J
 F J=1:1 S ACRX=$P(ACRZ,",",J) Q:ACRX=""  I $D(ACR(ACRX)) D
 .S DA=+ACR(ACRX)
 .S DA(1)=ACRDOCDA
 .S DIK="^ACRDOC("_ACRDOCDA_",60,"
 .D ^DIK
 Q
PRINT ;PRINT RFQ FOR EACH BIDDER
 S ZTDESC="PRINT BIDDER'S LIST FOR "_ACRDOC
 S (ZTRTN,ACRRTN)="P^ACRFPQT"
 D ^ACRFZIS
 Q
P ;EP;TO PRINT RFQ FOR EACH BIDDER
 N ACRPQT,ACRJ,ACRVDA,ACRVEND
 S ACRVEND=$P($G(^ACRDOC(ACRDOCDA,"PO")),U,5)
 S (ACRPQT,ACRJ)=0
 F  S ACRPQT=$O(^ACRDOC(ACRDOCDA,60,ACRPQT)) Q:'ACRPQT  D
 .S ACRJ=ACRJ+1
 .S ACRVDA=+$G(^ACRDOC(ACRDOCDA,60,ACRPQT,0))
 .Q:'ACRVDA
 .Q:'$D(^AUTTVNDR(ACRVDA,0))
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR="103070////"_ACRVDA
 .D DIE^ACRFDIC
 .S D0=ACRDOCDA
 .D ^ACRPQT
 .W @IOF
 I ACRVEND D
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR="103070////"_ACRVEND
 .D DIE^ACRFDIC
 Q