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

ASUASEOQ.m

Go to the documentation of this file.
ASUASEOQ ;DSD/DFM - STATION TRANS ENTER EOQ TYPE CODE;  [ 04/15/98  2:46 PM ]
 ;;3.0;SAMS;**1**;AUG 20, 1993
RDEQTC ;
 S DIR("A")="9. ENTER EOQ TYPE CODE"
 S X="P" S:ASUTRNS("TRANSACTION CODE")="5C" X="PO"
 S DIR(0)=X_"^9002039.06:MXE" K X
 S DIR("?")="Enter valid Economic Type Code "
 D ^DIR
 I $D(DUOUT)!($D(DIROUT))!($D(DTOUT)) G EXIT
 S ASUTRNS(ASUTRNS,"EOQ TYPE")=$P(Y,U,2)
 S (ASUTRNS(ASUTRNS,"EOQ MOD MTHS"),ASUTRNS(ASUTRNS,"EOQ MOD QTY"),ASUTRNS(ASUTRNS,"EOQ ACT MO"))=""
 I ASUTRNS(ASUTRNS,"EOQ TYPE")']"",ASUTRNS(ASUTRNS,"REVIEW POINT QTY")']"",ASUTRNS("TRANSACTION CODE")="5C" G EXIT
 I ASUTRNS(ASUTRNS,"REVIEW POINT QTY")]""&(+ASUTRNS(ASUTRNS,"REVIEW POINT QTY")=0) G CKEQTC
 I ASUTRNS(ASUTRNS,"EOQ TYPE")="C" G RDEOQMM
 I ASUTRNS(ASUTRNS,"EOQ TYPE")="B" G RDEOQMQ
 I ASUTRNS(ASUTRNS,"EOQ TYPE")="Y"!(ASUTRNS(ASUTRNS,"EOQ TYPE")="D")!(ASUTRNS(ASUTRNS,"EOQ TYPE")="Q") G RDEOQAM
 G SETSW
CKEQTC ;
 I ASUTRNS(ASUTRNS,"EOQ TYPE")="P" G SETSW
 I ASUTRNS(ASUTRNS,"EOQ TYPE")="Y" G RDEOQAM
 W *7,!,"Review Point Quantity = 0, EOQ Type Code must be 'P' or 'Y'"
 G RDEQTC
RDEOQMM ;
 S DIR("A")="10. ENTER EOQ MODIFIER MONTHS"
 S DIR(0)="N^1:12:0" D ^DIR
 I $D(DUOUT)!($D(DIROUT))!($D(DTOUT)) G EXIT
 I $L(X)=1 S X="0"_X
 S ASUTRNS(ASUTRNS,"EOQ MOD MTHS")=X
 G SETSW
RDEOQMQ ;
 S DIR("A")="11. ENTER EOQ MODIFIER QUANTITY"
 S DIR(0)="N^1:9999:0" D ^DIR
 I $D(DUOUT)!($D(DIROUT))!($D(DTOUT)) G EXIT
 S Z="0000",X=$E(Z,1,4-$L(X))_X K Z
 S ASUTRNS(ASUTRNS,"EOQ MOD QTY")=X
 G SETSW
RDEOQAM ;READ EOQ ACTION MONTHS
 D ^ASUASQAM
 I $D(DUOUT)!($D(DIROUT))!($D(DTOUT)) G EXIT
SETSW ;
 I ASUTRNS("TRANSACTION CODE")="5C" S:ASUTRNS(ASUTRNS,"EOQ TYPE")]"" ASUSW("CHANGED")=1
EXIT ;RETURN TO CALLING ROUTINE
 K DIR,X,Y,Z
 Q