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

ACGSVCTR.m

Go to the documentation of this file.
ACGSVCTR ;IHS/OIRM/DSD/THL,AEF - LOOKUP CONTRACT NUMBER FOR ITEM VENDOR; [ 03/27/2000   2:22 PM ]
 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
 ;;ROUTINE TO LOOKUP CONTRACT NUMBER FOR ITEM VENDOR
 ;;renovated for y2k 1/31/2000;mlp
EN D EN1
EXIT K ACGJ
 Q
EN1 K ACGCNO
 S ACGXREF=$S(ACG4'=236:"H",1:"O")
 I '$D(^ACGS(ACGXREF,ACG5DA)) W !?10,"NO CONTRACTS ON FILE FOR ",$S(ACGXREF'=236:$P(^AUTTVNDR(ACG5DA,0),U),1:ACG5DA) H 2 S:'$D(ACGNEW) ACGQUIT="" Q
 D DISPLAY,SELECT:ACGJ&'$D(ACGNC)
 I 'ACGJ S ACGQUIT="" W !?10,"NO CONTRACTS ON FILE FOR ",$S(ACGXREF'=236:$P(^AUTTVNDR(ACG5DA,0),U),1:ACG5DA) H 2
 Q
DISPLAY D HEAD
 S (ACG,ACGJ)=0
 F  S ACG=$O(^ACGS(ACGXREF,ACG5DA,ACG)) Q:'ACG!$D(ACGQUIT)  I $D(^ACGS(ACG,0)),$D(^("DT")),$D(^("DT1")) D
 .I ACG=$P(^ACGS(ACG,0),U,3) S ACG0=^(0),ACGDT=$G(^("DT")),ACGDT1=$G(^("DT1")),ACGSP=$G(^("SP")) D
 ..S ACGX=$P(ACGDT,U,2)_U_$P(ACGDT1,U,3,5)_U_$S("^15^17^"'[(U_+ACGDT_U):$P(ACGDT1,U),1:"SMALL PURCHASE")_U_$P(ACGDT1,U,2)_U_$P(ACG0,U,3)_U D DISP
 K ACGQUIT
 Q
SELECT I ACGJ=1 S Y=1 D SEL1 Q
 S DIR(0)="NO^1:"_ACGJ,DIR("A")="Which contract"
 W !
 D DIR^ACGSDIC
 Q:$D(ACGQUIT)
SEL1 ;S (ACGX,ACGCNO)=ACGX(Y),ACG22=$P(ACGCNO,U,5),ACG23=$E($P(ACGCNO,U,6),2,7),ACG24=$E($P(ACGCNO,U,2),2,7),ACG25=$E($P(ACGCNO,U,3),2,7),ACGCDA=$P(ACGCNO,U,10),ACGCNO=$P(ACGCNO,U,7)
 S (ACGX,ACGCNO)=ACGX(Y),ACG22=$P(ACGCNO,U,5),ACG23=$E($P(ACGCNO,U,6),1,7),ACG24=$E($P(ACGCNO,U,2),1,7),ACG25=$E($P(ACGCNO,U,3),1,7),ACGCDA=$P(ACGCNO,U,10),ACGCNO=$P(ACGCNO,U,7) ;y2k;mlp
 Q
DISP S ACGB=$P(ACGX,U,2)
 S ACGE=$P(ACGX,U,3)
 S:ACGB'="" ACGB=$E(ACGB,4,5)_"/"_$E(ACGB,6,7)_"/"_$E(ACGB,2,3)
 S:ACGE'="" ACGE=$E(ACGE,4,5)_"/"_$E(ACGE,6,7)_"/"_$E(ACGE,2,3)
 S ACGJ=ACGJ+1,ACGX(ACGJ)=ACGX
W W !,ACGJ,?3,$P(ACGX,U),?19,ACGB,?28,ACGE,?37,$J($FN($P(ACGX,U,4),"P",0),12),?50,$E($P(ACGX,U,5),1,30)
 D:ACGJ#20=0 HOLD^ACGSMENU
 Q
DIR D ^DIR S:$D(DIRUT) ACGQUIT="" K DIR,DIRUT,DUOUT,DTOUT Q
 .W:$D(IOF) @IOF W "CONTRACTOR: ",@ACGON,$P(^AUTTVNDR(ACG5DA,0),U),@ACGOF W !!,"#  CONTRACT NO.",?20,"BEGIN",?30,"END",?40,"AMOUNT",?59,"DESCRIPTION",!,"-- --------------- -------- -------- ------------ ------------------------------"
 I ACG4=236 D
 .W:$D(IOF) @IOF W "CONTRACTOR: ",@ACGON,ACG5DA,@ACGOF W !!,"#  CONTRACT NO.",?20,"BEGIN",?30,"END",?40,"AMOUNT",?59,"DESCRIPTION",!,"-- --------------- -------- -------- ------------ ------------------------------"
 Q