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

RMPFEM.m

Go to the documentation of this file.
  1. RMPFEM ;DDC/KAW-INACTIVATE A LINE ITEM [ 06/16/95 3:06 PM ]
  1. ;;2.0;REMOTE ORDER/ENTRY SYSTEM;;JUN 16, 1995
  1. RMPFSET I '$D(RMPFMENU) D MENU^RMPFUTL I '$D(RMPFMENU) W !!,$C(7),"*** A MENU SELECTION MUST BE MADE ***" Q ;;RMPFMENU must be defined
  1. I '$D(RMPFSTAN)!'$D(RMPFDAT)!'$D(RMPFSYS) D ^RMPFUTL Q:'$D(RMPFSTAN)!'$D(RMPFDAT)!'$D(RMPFSYS)
  1. W @IOF,!!,"INACTIVATE A LINE ITEM"
  1. W !!,"Inactivating a line item will make that item unavailable for selection in the"
  1. W !,"ordering of new products. This option should be used to disallow items no"
  1. W !,"longer under contract."
  1. SEL W !! S DIC=791811,DIC(0)="AEQM" D ^DIC G END:Y=-1 S LI=+Y
  1. S MK=$P(^RMPF(791811,LI,0),U,2),CS=$P(^(0),U,4)
  1. W !!,"Item",?22,"Make",?40,"Price"
  1. W !,"--------------------",?22,"----------------",?40,"-------"
  1. W !,$E($P(Y,U,2),1,20),?22,$E(MK,1,16),?40,"$",$J(CS,6,2)
  1. G A2:$D(^RMPF(791811,LI,"I"))
  1. A1 W !!,"Are you sure you wish to inactivate this item? NO// "
  1. D READ G END:$D(RMPFOUT)
  1. A11 I $D(RMPFQUT) W !!,"Type <Y>es to prevent the item from being ordered or <N>o to exit." G A1
  1. S:Y="" Y="N" S Y=$E(Y,1) I "NnYs"'[Y S RMPFQUT="" G A11
  1. G SEL:"Nn"[Y S $P(^RMPF(791811,LI,"I"),U)=1
  1. W !!,"*** ITEM INACTIVATED ***"
  1. G SEL
  1. A2 W !!,"This item has already been inactivated. Do you wish to re-activate? NO// "
  1. D READ G END:$D(RMPFOUT)
  1. A21 I $D(RMPFQUT) W !!,"Type <Y>es to re-activate the item. If the item is no longer",!,"under contract, any orders will be rejected from the DDC.",!,"Enter <N>o or <RETURN> to exit without change." G A2
  1. S:Y="" Y="N" S Y=$E(Y,1) I "YyNn"'[Y S RMPFQUT="" G A21
  1. G SEL:"Nn"[Y K ^RMPF(791811,LI,"I")
  1. W !!,"*** ITEM RE-ACTIVATED ***" G SEL:"Nn"[Y K ^RMPF(791811,LI,"I") G SEL
  1. END K %,CS,LI,MK,DIC,DISYS,X,Y,RMPFOUT,RMPFQUT Q
  1. READ K RMPFOUT,RMPFQUT
  1. R Y:DTIME I '$T W $C(7) R Y:5 G READ:Y="." S:'$T Y=U
  1. I Y?1"^".E S (RMPFOUT,Y)="" Q
  1. S:Y?1"?".E (RMPFQUT,Y)=""
  1. Q