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

ACRFPITM.m

Go to the documentation of this file.
ACRFPITM ;IHS/OIRM/DSD/THL,AEF - DISPLAY VENDORS FOR A STOCK ITEM; [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;ROUTINE TO DISPLAY VENDORS FOR A STOCK ITEM
EN D SET
 D DISPLAY
EXIT S ACRSEQ=$S($D(ACR(3)):3,$D(ACR(2)):2,1:1)
 S (ACR(1),ACRDA(1))=$S($D(ACR(1)):+ACR(1),1:+ACRDA)
 K ACRVDA,ACRVCON,ACRVON,ACRVUI,ACRVUC,ACRVSP,ACRVNAM,ACRVEIN,ACRVCIT,ACRVPHN,ACRVA1,ACRVA2,ACRVA3,ACRVZIP,ACR11,ACR13,ACRDT1,ACRFOB,ACRBR,ACRCT,ACRDT,ACRMAN,ACRVNDC
 Q
SET D PAUSE^ACRFWARN
 W @IOF
 W !?12,@ACRON,"VENDOR INFORMATION",@ACROF
 W $$DASH^ACRFMENU
 W !?11,"| PRIMARY"
 W ?34,"| SECONDARY"
 W ?57,"| TERTIARY"
 W $$DASH^ACRFMENU
 I '$O(^ACRITEM("G",D0,0)) D
 .S DA=D0
 .S DIE="^ACRITEM("
 .S DR="15////"_D0
 .D DIE^ACRFDIC
 S ACR=0
 F  S ACR=$O(^ACRITEM("G",D0,ACR)) Q:'ACR  D SET1
 Q
SET1 S ACRDT=^ACRITEM(ACR,"DT")
 S ACRDT1=$G(^ACRITEM(ACR,"DT1"))
 S ACRSEQ=$P(ACRDT1,U,3)
 I ACRSEQ="",'$O(^ACRITEM("G",D0,D0)) D
 .S DA=D0
 .S DIE="^ACRITEM("
 .S DR="26////1"
 .D DIE^ACRFDIC
 S ACRVDA=$P(ACRDT1,U)
 S ACRVCON=$P(ACRDT1,U,10)
 S ACRVON=$P(ACRDT1,U,2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U_ACRVON_U_ACRVUI_U_ACRVUC_U_ACRVSP_U_ACRE_U_ACRVNDC_U_ACRMAN_U_U_ACRFOB_U_ACRBR_U_ACRCT
 Q
DISPLAY W !,"VENDOR"
 W ?11,"|"
 S ACRP=3
 D W
 W !,"  STREET"
 W ?11,"|"
 S ACRP=4
 D W
 W !,"  CITY"
 W ?11,"|"
 S ACRP=5
 D W
 W !,"  STATE/ZIP"
 W ?11,"|"
 S ACRP=6
 D W
 W !,"  PHONE"
 W ?11,"|"
 S ACRP=7
 D W
 W !,"  EIN"
 W ?11,"|"
 S ACRP=8
 D W
 W !,"CONTRACT #"
 W ?11,"|"
 S ACRP=9
 D W
 W !,"TERMS"
 W ?11,"|"
 S ACRP=20
 D W
 W !,"EXPIRES"
 W ?11,"|"
 S ACRP=14
 D W
 W !,"MANUFACTURE|"
 S ACRP=16
 D W
 W !,"NDC"
 W ?11,"|"
 S ACRP=15
 D W
 W !,"VEN PROD #"
 W ?11,"|"
 S ACRP=10
 D W
 W !,"BIO RATING |"
 S ACRP=19
 D W
 W !,"FOB"
 W ?11,"|"
 S ACRP=18
 D W
 W !,"PURCH U/I"
 W ?11,"|"
 S ACRP=11
 D W
 W !,"PURCH U/C"
 W ?11,"|"
 S ACRP=12
 D W
 W !,"PURCH S/P"
 W ?11,"|"
 S ACRP=13
 D W
 W !,"--------------------------------------------------------------------------------"
 Q
W W:$D(ACR(1)) ?12,$P(ACR(1),U,ACRP)
 W ?34,"|"
 W:$D(ACR(2)) ?35,$P(ACR(2),U,ACRP)
 W ?57,"|"
 W:$D(ACR(3)) ?58,$P(ACR(3),U,ACRP)
 Q