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

ASUL07ET.m

Go to the documentation of this file.
ASUL07ET ; IHS/ITSC/LMH -TABLE 7 EDIT ROUTINE ; 
 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
 ;This routine is a utility that provides an entry point to accept
 ;data entry to properly create an entry in the Category code Table.
 S ASUV("QUO")=""""
 G ENTER
ASKAGAIN ;
 W !
 S DIR("A")="WANT TO EDIT ANOTHER CATEGORY TABLE ENTRY",DIR("B")="Y",DIR(0)="Y" D ^DIR K DIR
 I 'Y G DONE
ENTER ;
 D CLS^ASUUHDG K Y
 S DIR("A")="ENTER CATEGORY NAME OR OBJECT SUB OBJECT CODE "
 S DIR("?")="^D CATNHELP^ASUL07ET"
 S DIR(0)="FO^3:60" D ^DIR K DIR
 G:$D(DUOUT)!($D(DIROUT))!($D(DTOUT)) DONE
 I X="" G ASKAGAIN
 S DIC="^ASUL(7,"
 S DIC(0)="EZM",D="C" D IX^DIC
 G:$D(DUOUT)!($D(DIROUT))!($D(DTOUT)) DONE
 I Y<0 S ASUR("ENTRY")=X W !,ASUR("ENTRY")," NOT CURRENTLY IN TABLE" G CKADD
 S ASUR("ENTRY")=X
 S ASUL(7,"CAT","E#")=+Y,ASUL(7,"CAT","NM")=Y(0),ASUL(6,"CAT","CD")=^ASUL(7,ASUL(7,"CAT","E#",1))
 I $E(ASUR("ENTRY"))=2 G DXRF
 S ASUL(7,"CAT","NM")=ASUR("ENTRY")
 S ASUL(7,"SOBJ","E#")=$O(^ASUL(7,"C",ASUL(7,"CAT","NM"),ASUL(7,"CAT","E#"),""))
 I ASUL(7,"SOBJ","E#")']"" W !,"ERROR IN NAME LOOKUP",! G ASKAGAIN
 G UPDATE
CATNHELP ;EP ;CATEGORY NAME HELP
 S DIC="^ASUL(7,",DIC(0)="EM",D="C",DZ="??" D DQ^DICQ K DZ
 W !!,"OR YOU MAY ENTER A NEW CATEGORY NAME OR SUB OBJECT (29..) TO ADD TO THE TABLE"
 Q
DXRF ;
 S ASUL("SOBJ")=ASUR("ENTRY")
 S ASUL(7,"SOBJ","E#")=$O(^ASUL(7,"D",ASUL("SOBJ"),ASUL(7,"CAT","E#"),""))
 I ASUL(7,"SOBJ","E#")']"" W !,"ERROR IN SUB OBJECT LOOKUP",! G ASKAGAIN
UPDATE ;
 S DR=".01;1;2"
 S DIE="^ASUL(7,ASUL(7,""E#"",""CAT""),1,"
 S DA=ASUL(7,"SOBJ","E#"),DA(1)=ASUL(7,"CAT","E#")
 D ^DIE
 G ASKAGAIN
CKADD ;
 S DIR("A")="DO YOU WISH TO ADD "_ASUR("ENTRY")_" AS A NEW TABLE ENTRY",DIR("B")="N",DIR(0)="Y" D ^DIR K DIR
 G:$D(DUOUT)!($D(DIROUT))!($D(DTOUT)) DONE
 I 'Y W ! G ASKAGAIN
 I $E(ASUR("ENTRY"),1,2)=29 S ASUL("SOBJ")=ASUR("ENTRY"),ASUL(7,"CAT","NM")="" G ADDIT
 S ASUL(7,"CAT","NM")=ASUR("ENTRY"),ASUL("SOBJ")=""
ADDIT ;
 K ASUR("ENTRY")
 S DIC("A")="ENTER CATEGORY CODE FOR "_ASUL(7,"CAT","NM")_" "
 S ASUL(7,"CAT","CD")=X,DIC="^ASUL(7,",DIC(0)="AEZ",D="B" D IX^DIC
 G:$D(DUOUT)!($D(DIROUT))!($D(DTOUT)) ASKAGAIN
 I Y<0 W !," NOT FOUND" G ASKAGAIN
 S ASUL(7,"CAT","E#")=+Y
RACC ;
 S DIR(0)="P^9002039.09:EMZ^",DIR("A")="ENTER ACCOUNT CODE" D ^DIR K DIR
 G:$D(DUOUT)!($D(DIROUT))!($D(DTOUT)) ASKAGAIN
 I Y<0 G ASKAGAIN
 S ASUL(9,"ACC")=$P(Y(0),U)
 S DR=".01///"_ASUL(7,"CAT","NM")_";1///"_ASUV("QUO")_ASUL(9,"ACC")_ASUV("QUO")
 S DR(2,902039.71,1)=".01///"_ASUV("QUO")_ASUL(9,"ACC")_ASUV("QUO")_";1//"_ASUL("SOBJ")_";2//"_ASUL(7,"CAT","CD")
 S DIE="^ASUL(7,"
 S DA=ASUL(7,"CAT","E#")
 D ^DIE
 G ASKAGAIN
DONE ;
 K ASUL,ASUV,X,Y,DR,DA,DIC,DIE,DUOUT,DTOUT,DIROUT
 Q