ASURQ490 ; IHS/ITSC/LMH -RPT 49 R & N ITEMS ;
;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
;This routine formats and prints report 49, List R & N Items
;from sorted extracts.
K ^XTMP("ASUR","R49")
S ^XTMP("ASUR","R49",0)=ASUK("DT","FM")+10000_U_ASUK("DT","FM")
S ASUMS("E#","STA")=0,^XTMP("ASUR","R49",0)=ASUK("DT","FM")
S (ASUC("TVAL","TOT"),ASUC("TVAL","TPA"),ASUC("TVAL","13IS"),ASUC("TVAL","XS"),ASUC("TVAL","AIV"))=0
S (ASUC("TLI","TOT"),ASUC("TLI","13IS"),ASUC("TLI","XS"),ASUC("TLI","ZBAL"),ASUC("TLI","PSTDU"),ASUC("TLI","MOD"),ASUC("TLI","NOIS"),ASUC("TLI","NSN"),ASUC("TLI","R13"),ASUC("TLI","RPQ"),ASUC("TLI","LPP"))=0
F S ASUMS("E#","STA")=$O(^ASUMS(ASUMS("E#","STA"))) Q:ASUMS("E#","STA")'?1N.N D
.F ASUMS("E#","IDX")=0:0 S ASUMS("E#","IDX")=$O(^ASUMS(ASUMS("E#","STA"),1,ASUMS("E#","IDX"))) Q:ASUMS("E#","IDX")'?1N.N D
..D ^ASUMSTRD
..S X=$L(ASUMS("PMIQ")) I $E(ASUMS("PMIQ"),X)=0 D
...S ASUMS("PMIQ")=$FN((ASUMS("PMIQ")*.1),"",0)
..S ASUMX("E#","IDX")=ASUMS("E#","IDX") D READ^ASUMXDIO,ACC^ASULDIRF(ASUMX("ACC"))
..Q:$G(ASUF("DLIDX"))=1 Q:ASUMX("ACC")'?1N
..S ASUC("VAL","TOT")=$G(ASUC("VAL","TOT"))+ASUMS("VAL","O/H"),ASUC("LI","TOT")=$G(ASUC("LI","TOT"))+1
..I ASUMS("EOQ","TP")="A" D
...S ASUC("VAL","TPA")=$G(ASUC("VAL","TPA"))+ASUMS("VAL","O/H")
...S ASUC("VAL","AIV")=$G(ASUC("VAL","AIV"))+((ASUMS("PMIV")*ASUMS("EOQ","MO")/2))+ASUMS("PMIV")
..I ASUMS("SRC")?1N,ASUMS("SRC")>0,ASUMS("SRC")<4 D
...I ASUMS("ORD#")']"",$L(ASUMX("NSN"))'>4 D ERR0,SRTXTR Q
...I ASUMS("ORD#")'?4N.N S ASUX("ERR")=1 D ERR0,SRTXTR S ASUC("LI","NSN")=$G(ASUC("LI","NSN"))+1
..I ASUMS("LSTISS")']"" D
...S ASUC("LI","NOIS")=$G(ASUC("LI","NOIS"))+1
...I ASUMS("QTY","O/H")>0 D
....S ASUX("ERR")=3 D ERR0,SRTXTR
...E D
....I ASUMS("D/I","QTY-TOT")'>0 S ASUX("ERR")=2 D ERR0,SRTXTR S ASUC("LI","ZBAL")=$G(ASUC("LI","ZBAL"))+1
..S X1=ASUMS("LSTISS"),X2=ASUK("DT","FM") D ^%DTC S ASUMS("MOSIS")=$FN((X/30),"",0)
..S ASUMS("MOSUP")=$S(+ASUMS("QTY","O/H")<1:0,+ASUMS("PMIQ")<1:0,1:$FN((ASUMS("QTY","O/H")/ASUMS("PMIQ")),"",0))
..I ASUMS("D/I","QTY-TOT")>0 D
...I ASUMS("EOQ","TP")="R" S ASUX("ERR")=6 D ERR0,SRTXTR
...I ASUMS("QTY","O/H")>0 D
....I ASUMS("MOSUP")>6 S ASUX("ERR")=4 D ERR1(ASUMS("MOSUP")),SRTXTR
....I ASUMS("MOSIS")>13 S ASUX("ERR")=8 D ERR1(ASUMS("MOSIS")),SRTXTR S ASUC("LI","13IS")=$G(ASUC("LI","13IS"))+1,ASUC("VAL","13IS")=$G(ASUC("VAL","13IS"))+ASUMS("VAL","O/H") Q
....S ASUMS("QTY","NED")=(ASUMS("PMIQ")*12)+ASUMS("RPQ") S ASUMS("QTY","XS")=ASUMS("QTY","O/H")-ASUMS("QTY","NED")
....I ASUMS("QTY","XS")>0 S ASUX("ERR")=9 D ERR1(ASUMS("QTY","XS")),SRTXTR S ASUC("VAL","XS")=$G(ASUC("VAL","XS"))+ASUMS("VAL","O/H"),ASUC("LI","XS")=$G(ASUC("LI","XS"))+1
...E D
....I ASUMS("MOSIS")>1 S ASUX("ERR")=7 D ERR1(ASUMS("MOSIS")),SRTXTR S ASUC("LI","ZBAL")=$G(ASUC("LI","ZBAL"))+1 Q
..I ASUMS("MOSIS")>7 S ASUX("ERR")=5 D ERR1(ASUMS("MOSIS")),SRTXTR Q
..I ASUMS("EOQ","TP")="P",ASUMS("DMD","CALL")>4 S ASUX("ERR")=10 D ERR0,SRTXTR S ASUC("LI","MOD")=$G(ASUC("LI","MOD"))+1
..I ASUMS("EOQ","TP")="B",ASUMS("QTY","O/H")>ASUMS("EOQ","QM") S ASUX("ERR")=11 D ERR2(ASUMS("EOQ","QM"),ASUMS("QTY","O/H")),SRTXTR S ASUC("LI","MOD")=$G(ASUC("LI","MOD"))+1
..I ASUMS("EOQ","TP")="C",ASUMS("MOSUP")>ASUMS("EOQ","MM") S ASUX("ERR")=12 D ERR2(ASUMS("EOQ","MM"),ASUMS("MOSUP")),SRTXTR S ASUC("LI","MOD")=$G(ASUC("LI","MOD"))+1
..I ASUMS("R13","TIMES")>2 D
...I ASUMS("EOQ","MO")>1.5 S ASUX("ERR")=13 D ERR1(ASUMS("R13","TIMES")),SRTXTR S ASUC("LI","R13")=$G(ASUC("LI","R13"))+1
..F Y=1:1:3 S X1=ASUMS("D/I","DT",Y),X2=ASUK("DT","FM") D ^%DTC S ASUV("PSTDU")=X I ASUV("PSTDU")>60 S ASUX("ERR")=14 D ERR0,SRTXTR S ASUC("LI","PSTDU")=$G(ASUC("LI","PSTDU"))+1
..I ASUMS("PMIQ")>1 D
...Q:ASUMS("AMIQ")=0 Q:ASUMS("AMIQ")=ASUMS("PMIQ")
...I ASUMS("PMIQ")>ASUMS("AMIQ") D
....S ASUV("%")=$FN(((ASUMS("PMIQ")-ASUMS("AMIQ")*100))/ASUMS("PMIQ"),"",0)
...E D
....S ASUV("%")=$FN(((ASUMS("AMIQ")-ASUMS("PMIQ")*100))/ASUMS("AMIQ"),"",0)
...I ASUV("%")>25 S ASUX("ERR")=15 D ERR2(ASUMS("PMIQ"),ASUMS("AMIQ")),SRTXTR S ASUC("LI","RPQ")=$G(ASUC("LI","RPQ"))+1
..I ASUMS("CST/U")>1 D
...Q:ASUMS("LPP")=0 Q:ASUMS("CST/U")=ASUMS("LPP")
...I ASUMS("LPP")>ASUMS("CST/U") D
....S ASUV("%")=$FN(((ASUMS("LPP")-ASUMS("CST/U")*100))/ASUMS("LPP"),"",0)
...E D
....S ASUV("%")=$FN(((ASUMS("CST/U")-ASUMS("LPP")*100))/ASUMS("CST/U"),"",0)
...I ASUV("%")>25 S ASUX("ERR")=16 D ERR2(ASUMS("LPP"),ASUMS("CST/U")),SRTXTR S ASUC("LI","LPP")=$G(ASUC("LI","LPP"))+1
.S ASUX("MSG")=""
.F X="TOT","TPA","13IS","XS","AIV" S ASUC("TVAL",X)=$G(ASUC("TVAL",X))+$G(ASUC("VAL",X)) S ASUX("MSG")=$G(ASUX("MSG"))_$G(ASUC("VAL",X))_U
.F X="TOT","13IS","XS","ZBAL","PSTDU","MOD","NOIS","NSN","R13","RPQ","LPP" S ASUC("TLI",X)=$G(ASUC("TLI",X))+$G(ASUC("LI",X)) S ASUX("MSG")=$G(ASUX("MSG"))_$G(ASUC("LI",X))_U
.S ^XTMP("ASUR","R49",ASUMS("E#","STA"),0)=ASUX("MSG") K ASUC("VAL"),ASUC("LI")
S ASUX("MSG")=""
F X="TOT","TPA","13IS","XS","AIV" S ASUX("MSG")=$G(ASUX("MSG"))_$G(ASUC("TVAL",X))_U
F X="TOT","13IS","XS","ZBAL","PSTDU","MOD","NOIS","NSN","R13","RPQ","LPP" S ASUX("MSG")=$G(ASUX("MSG"))_$G(ASUC("TLI",X))_U
S ^XTMP("ASUR","R49",0)=^XTMP("ASUR","R49",0)_U_ASUX("MSG")
Q
ERR0 ;
S ASUX("MSG")=$P($T(ERRMSG+ASUX("ERR")),";",3)_" "_$P($T(ERRMSG+ASUX("ERR")),";",4) Q
ERR1(X) ;
S ASUX("MSG")=$P($T(ERRMSG+ASUX("ERR")),";",3)_" "_$P($T(ERRMSG+ASUX("ERR")),";",4)_X_" "_$P($T(ERRMSG+ASUX("ERR")),";",5) Q
ERR2(X,Y) ;
S ASUX("MSG")=$P($T(ERRMSG+ASUX("ERR")),";",3)_" "_$P($T(ERRMSG+ASUX("ERR")),";",4)_X_" "_$P($T(ERRMSG+ASUX("ERR")),";",5)_Y_$P($T(ERRMSG+ASUX("ERR")),";",6) Q
SRTXTR ;
S ^XTMP("ASUR","R49",ASUMS("E#","STA"),ASUL(9,"ACG"),ASUMS("E#","IDX"),ASUX("ERR"))=ASUX("MSG")
Q
ERRMSG ;;MSG TO WRITE WHEN ERR FLAG IS SET TO DISPLACEMENT
;;01;SOURCE CODE IS 1, 3, OR 4 - NEED TO ENTER VALID STOCK NUMBER OR CHANGE SOURCE CODE
;;02;NEW ITEM - NONE ON HAND - NONE DUE IN - SHOULD THE ITEM BE ORDERED OR DELETED
;;03;NEW ITEM - NO ISSUES - DOES THE ORDERING ACTIVITY KNOW THE ITEM IS AVAILABLE
;;04;WHY ON ORDER - ; MONTH SUPPLY CURRENTLY ON HAND
;;05;WHY ON ORDER - ITEM HAS HAD NO ISSUES IN ; MONTHS
;;06;WHY ON ORDER - EOQ TYPE CODE IS R - OBSOLETE - DO NOT REORDER
;;07;NO ISSUES IN ; MONTHS - ZERO BALANCE - SHOULD THE ITEM BE DELETED OR REORDERED
;;08;NO ISSUES IN ; MONTHS - SHOULD THE QUANTITY ON HAND BE REPORTED TO A-PM AS UNREQUIRED TO YOUR NEEDS
;;09;EXCESSIVE QUANTITY ON HAND IS ;. THIS SHOULD BE REPORTED TO AREA PROPERTY MANAGEMENT
;;10;EOQ TYPE CODE IS P-STANDBY - ITEM HAS HAD 4 OR MORE ISSUE REQUESTS - TYPE CODE NEEDS TO BE UPDATED
;;11;EOQ QUANTITY MODIFIER IS ; - QUANTITY ON HAND IS ; - IS THE TYPE CODE AND/OR MODIFIER VALID
;;12;EOQ MONTHS OF SUPPLY MODIFIER IS ; MONTHS SUPPLY ON HAND IS ; IS THE TYPE CODE AND/OR THE MODIFIER VALID
;;13;;CONSECUTIVE MONTH ITEM HAS BEEN ON REQUIREMENTS REPORT - WHY -DO YOU USE REPORT #13 WHEN ORDERING
;;14;DUE IN IS 60 OR MORE DAYS PAST DILIVERY DATE - IS THE DUE IN VALID - DO YOU CHECK REPORT #14 EACH MONTH
;;15;PAMIQ IS ; - AMIQ IS ; - DOES THE PAMIQ NEED TO BE UPDATED BY CHANGING THE RPQ
;;16;LAST PURCHASE PRICE IS $; - AVERAGE UNIT COST IS $; - DOES THE LAST PURCHACE PRICE NEED TO BE UPDATED
ASURQ490 ; IHS/ITSC/LMH -RPT 49 R & N ITEMS ;
+1 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
+2 ;This routine formats and prints report 49, List R & N Items
+3 ;from sorted extracts.
+4 KILL ^XTMP("ASUR","R49")
+5 SET ^XTMP("ASUR","R49",0)=ASUK("DT","FM")+10000_U_ASUK("DT","FM")
+6 SET ASUMS("E#","STA")=0
SET ^XTMP("ASUR","R49",0)=ASUK("DT","FM")
+7 SET (ASUC("TVAL","TOT"),ASUC("TVAL","TPA"),ASUC("TVAL","13IS"),ASUC("TVAL","XS"),ASUC("TVAL","AIV"))=0
+8 SET (ASUC("TLI","TOT"),ASUC("TLI","13IS"),ASUC("TLI","XS"),ASUC("TLI","ZBAL"),ASUC("TLI","PSTDU"),ASUC("TLI","MOD"),ASUC("TLI","NOIS"),ASUC("TLI","NSN"),ASUC("TLI","R13"),ASUC("TLI","RPQ"),ASUC("TLI","LPP"))=0
+9 FOR
SET ASUMS("E#","STA")=$ORDER(^ASUMS(ASUMS("E#","STA")))
IF ASUMS("E#","STA")'?1N.N
QUIT
Begin DoDot:1
+10 FOR ASUMS("E#","IDX")=0:0
SET ASUMS("E#","IDX")=$ORDER(^ASUMS(ASUMS("E#","STA"),1,ASUMS("E#","IDX")))
IF ASUMS("E#","IDX")'?1N.N
QUIT
Begin DoDot:2
+11 DO ^ASUMSTRD
+12 SET X=$LENGTH(ASUMS("PMIQ"))
IF $EXTRACT(ASUMS("PMIQ"),X)=0
Begin DoDot:3
+13 SET ASUMS("PMIQ")=$FNUMBER((ASUMS("PMIQ")*.1),"",0)
End DoDot:3
+14 SET ASUMX("E#","IDX")=ASUMS("E#","IDX")
DO READ^ASUMXDIO
DO ACC^ASULDIRF(ASUMX("ACC"))
+15 IF $GET(ASUF("DLIDX"))=1
QUIT
IF ASUMX("ACC")'?1N
QUIT
+16 SET ASUC("VAL","TOT")=$GET(ASUC("VAL","TOT"))+ASUMS("VAL","O/H")
SET ASUC("LI","TOT")=$GET(ASUC("LI","TOT"))+1
+17 IF ASUMS("EOQ","TP")="A"
Begin DoDot:3
+18 SET ASUC("VAL","TPA")=$GET(ASUC("VAL","TPA"))+ASUMS("VAL","O/H")
+19 SET ASUC("VAL","AIV")=$GET(ASUC("VAL","AIV"))+((ASUMS("PMIV")*ASUMS("EOQ","MO")/2))+ASUMS("PMIV")
End DoDot:3
+20 IF ASUMS("SRC")?1N
IF ASUMS("SRC")>0
IF ASUMS("SRC")<4
Begin DoDot:3
+21 IF ASUMS("ORD#")']""
IF $LENGTH(ASUMX("NSN"))'>4
DO ERR0
DO SRTXTR
QUIT
+22 IF ASUMS("ORD#")'?4N.N
SET ASUX("ERR")=1
DO ERR0
DO SRTXTR
SET ASUC("LI","NSN")=$GET(ASUC("LI","NSN"))+1
End DoDot:3
+23 IF ASUMS("LSTISS")']""
Begin DoDot:3
+24 SET ASUC("LI","NOIS")=$GET(ASUC("LI","NOIS"))+1
+25 IF ASUMS("QTY","O/H")>0
Begin DoDot:4
+26 SET ASUX("ERR")=3
DO ERR0
DO SRTXTR
End DoDot:4
+27 IF '$TEST
Begin DoDot:4
+28 IF ASUMS("D/I","QTY-TOT")'>0
SET ASUX("ERR")=2
DO ERR0
DO SRTXTR
SET ASUC("LI","ZBAL")=$GET(ASUC("LI","ZBAL"))+1
End DoDot:4
End DoDot:3
+29 SET X1=ASUMS("LSTISS")
SET X2=ASUK("DT","FM")
DO ^%DTC
SET ASUMS("MOSIS")=$FNUMBER((X/30),"",0)
+30 SET ASUMS("MOSUP")=$SELECT(+ASUMS("QTY","O/H")<1:0,+ASUMS("PMIQ")<1:0,1:$FNUMBER((ASUMS("QTY","O/H")/ASUMS("PMIQ")),"",0))
+31 IF ASUMS("D/I","QTY-TOT")>0
Begin DoDot:3
+32 IF ASUMS("EOQ","TP")="R"
SET ASUX("ERR")=6
DO ERR0
DO SRTXTR
+33 IF ASUMS("QTY","O/H")>0
Begin DoDot:4
+34 IF ASUMS("MOSUP")>6
SET ASUX("ERR")=4
DO ERR1(ASUMS("MOSUP"))
DO SRTXTR
+35 IF ASUMS("MOSIS")>13
SET ASUX("ERR")=8
DO ERR1(ASUMS("MOSIS"))
DO SRTXTR
SET ASUC("LI","13IS")=$GET(ASUC("LI","13IS"))+1
SET ASUC("VAL","13IS")=$GET(ASUC("VAL","13IS"))+ASUMS("VAL","O/H")
QUIT
+36 SET ASUMS("QTY","NED")=(ASUMS("PMIQ")*12)+ASUMS("RPQ")
SET ASUMS("QTY","XS")=ASUMS("QTY","O/H")-ASUMS("QTY","NED")
+37 IF ASUMS("QTY","XS")>0
SET ASUX("ERR")=9
DO ERR1(ASUMS("QTY","XS"))
DO SRTXTR
SET ASUC("VAL","XS")=$GET(ASUC("VAL","XS"))+ASUMS("VAL","O/H")
SET ASUC("LI","XS")=$GET(ASUC("LI","XS"))+1
End DoDot:4
+38 IF '$TEST
Begin DoDot:4
+39 IF ASUMS("MOSIS")>1
SET ASUX("ERR")=7
DO ERR1(ASUMS("MOSIS"))
DO SRTXTR
SET ASUC("LI","ZBAL")=$GET(ASUC("LI","ZBAL"))+1
QUIT
End DoDot:4
End DoDot:3
+40 IF ASUMS("MOSIS")>7
SET ASUX("ERR")=5
DO ERR1(ASUMS("MOSIS"))
DO SRTXTR
QUIT
+41 IF ASUMS("EOQ","TP")="P"
IF ASUMS("DMD","CALL")>4
SET ASUX("ERR")=10
DO ERR0
DO SRTXTR
SET ASUC("LI","MOD")=$GET(ASUC("LI","MOD"))+1
+42 IF ASUMS("EOQ","TP")="B"
IF ASUMS("QTY","O/H")>ASUMS("EOQ","QM")
SET ASUX("ERR")=11
DO ERR2(ASUMS("EOQ","QM"),ASUMS("QTY","O/H"))
DO SRTXTR
SET ASUC("LI","MOD")=$GET(ASUC("LI","MOD"))+1
+43 IF ASUMS("EOQ","TP")="C"
IF ASUMS("MOSUP")>ASUMS("EOQ","MM")
SET ASUX("ERR")=12
DO ERR2(ASUMS("EOQ","MM"),ASUMS("MOSUP"))
DO SRTXTR
SET ASUC("LI","MOD")=$GET(ASUC("LI","MOD"))+1
+44 IF ASUMS("R13","TIMES")>2
Begin DoDot:3
+45 IF ASUMS("EOQ","MO")>1.5
SET ASUX("ERR")=13
DO ERR1(ASUMS("R13","TIMES"))
DO SRTXTR
SET ASUC("LI","R13")=$GET(ASUC("LI","R13"))+1
End DoDot:3
+46 FOR Y=1:1:3
SET X1=ASUMS("D/I","DT",Y)
SET X2=ASUK("DT","FM")
DO ^%DTC
SET ASUV("PSTDU")=X
IF ASUV("PSTDU")>60
SET ASUX("ERR")=14
DO ERR0
DO SRTXTR
SET ASUC("LI","PSTDU")=$GET(ASUC("LI","PSTDU"))+1
+47 IF ASUMS("PMIQ")>1
Begin DoDot:3
+48 IF ASUMS("AMIQ")=0
QUIT
IF ASUMS("AMIQ")=ASUMS("PMIQ")
QUIT
+49 IF ASUMS("PMIQ")>ASUMS("AMIQ")
Begin DoDot:4
+50 SET ASUV("%")=$FNUMBER(((ASUMS("PMIQ")-ASUMS("AMIQ")*100))/ASUMS("PMIQ"),"",0)
End DoDot:4
+51 IF '$TEST
Begin DoDot:4
+52 SET ASUV("%")=$FNUMBER(((ASUMS("AMIQ")-ASUMS("PMIQ")*100))/ASUMS("AMIQ"),"",0)
End DoDot:4
+53 IF ASUV("%")>25
SET ASUX("ERR")=15
DO ERR2(ASUMS("PMIQ"),ASUMS("AMIQ"))
DO SRTXTR
SET ASUC("LI","RPQ")=$GET(ASUC("LI","RPQ"))+1
End DoDot:3
+54 IF ASUMS("CST/U")>1
Begin DoDot:3
+55 IF ASUMS("LPP")=0
QUIT
IF ASUMS("CST/U")=ASUMS("LPP")
QUIT
+56 IF ASUMS("LPP")>ASUMS("CST/U")
Begin DoDot:4
+57 SET ASUV("%")=$FNUMBER(((ASUMS("LPP")-ASUMS("CST/U")*100))/ASUMS("LPP"),"",0)
End DoDot:4
+58 IF '$TEST
Begin DoDot:4
+59 SET ASUV("%")=$FNUMBER(((ASUMS("CST/U")-ASUMS("LPP")*100))/ASUMS("CST/U"),"",0)
End DoDot:4
+60 IF ASUV("%")>25
SET ASUX("ERR")=16
DO ERR2(ASUMS("LPP"),ASUMS("CST/U"))
DO SRTXTR
SET ASUC("LI","LPP")=$GET(ASUC("LI","LPP"))+1
End DoDot:3
End DoDot:2
+61 SET ASUX("MSG")=""
+62 FOR X="TOT","TPA","13IS","XS","AIV"
SET ASUC("TVAL",X)=$GET(ASUC("TVAL",X))+$GET(ASUC("VAL",X))
SET ASUX("MSG")=$GET(ASUX("MSG"))_$GET(ASUC("VAL",X))_U
+63 FOR X="TOT","13IS","XS","ZBAL","PSTDU","MOD","NOIS","NSN","R13","RPQ","LPP"
SET ASUC("TLI",X)=$GET(ASUC("TLI",X))+$GET(ASUC("LI",X))
SET ASUX("MSG")=$GET(ASUX("MSG"))_$GET(ASUC("LI",X))_U
+64 SET ^XTMP("ASUR","R49",ASUMS("E#","STA"),0)=ASUX("MSG")
KILL ASUC("VAL"),ASUC("LI")
End DoDot:1
+65 SET ASUX("MSG")=""
+66 FOR X="TOT","TPA","13IS","XS","AIV"
SET ASUX("MSG")=$GET(ASUX("MSG"))_$GET(ASUC("TVAL",X))_U
+67 FOR X="TOT","13IS","XS","ZBAL","PSTDU","MOD","NOIS","NSN","R13","RPQ","LPP"
SET ASUX("MSG")=$GET(ASUX("MSG"))_$GET(ASUC("TLI",X))_U
+68 SET ^XTMP("ASUR","R49",0)=^XTMP("ASUR","R49",0)_U_ASUX("MSG")
+69 QUIT
ERR0 ;
+1 SET ASUX("MSG")=$PIECE($TEXT(ERRMSG+ASUX("ERR")),";",3)_" "_$PIECE($TEXT(ERRMSG+ASUX("ERR")),";",4)
QUIT
ERR1(X) ;
+1 SET ASUX("MSG")=$PIECE($TEXT(ERRMSG+ASUX("ERR")),";",3)_" "_$PIECE($TEXT(ERRMSG+ASUX("ERR")),";",4)_X_" "_$PIECE($TEXT(ERRMSG+ASUX("ERR")),";",5)
QUIT
ERR2(X,Y) ;
+1 SET ASUX("MSG")=$PIECE($TEXT(ERRMSG+ASUX("ERR")),";",3)_" "_$PIECE($TEXT(ERRMSG+ASUX("ERR")),";",4)_X_" "_$PIECE($TEXT(ERRMSG+ASUX("ERR")),";",5)_Y_$PIECE($TEXT(ERRMSG+ASUX("ERR")),";",6)
QUIT
SRTXTR ;
+1 SET ^XTMP("ASUR","R49",ASUMS("E#","STA"),ASUL(9,"ACG"),ASUMS("E#","IDX"),ASUX("ERR"))=ASUX("MSG")
+2 QUIT
ERRMSG ;;MSG TO WRITE WHEN ERR FLAG IS SET TO DISPLACEMENT
+1 ;;01;SOURCE CODE IS 1, 3, OR 4 - NEED TO ENTER VALID STOCK NUMBER OR CHANGE SOURCE CODE
+2 ;;02;NEW ITEM - NONE ON HAND - NONE DUE IN - SHOULD THE ITEM BE ORDERED OR DELETED
+3 ;;03;NEW ITEM - NO ISSUES - DOES THE ORDERING ACTIVITY KNOW THE ITEM IS AVAILABLE
+4 ;;04;WHY ON ORDER - ; MONTH SUPPLY CURRENTLY ON HAND
+5 ;;05;WHY ON ORDER - ITEM HAS HAD NO ISSUES IN ; MONTHS
+6 ;;06;WHY ON ORDER - EOQ TYPE CODE IS R - OBSOLETE - DO NOT REORDER
+7 ;;07;NO ISSUES IN ; MONTHS - ZERO BALANCE - SHOULD THE ITEM BE DELETED OR REORDERED
+8 ;;08;NO ISSUES IN ; MONTHS - SHOULD THE QUANTITY ON HAND BE REPORTED TO A-PM AS UNREQUIRED TO YOUR NEEDS
+9 ;;09;EXCESSIVE QUANTITY ON HAND IS ;. THIS SHOULD BE REPORTED TO AREA PROPERTY MANAGEMENT
+10 ;;10;EOQ TYPE CODE IS P-STANDBY - ITEM HAS HAD 4 OR MORE ISSUE REQUESTS - TYPE CODE NEEDS TO BE UPDATED
+11 ;;11;EOQ QUANTITY MODIFIER IS ; - QUANTITY ON HAND IS ; - IS THE TYPE CODE AND/OR MODIFIER VALID
+12 ;;12;EOQ MONTHS OF SUPPLY MODIFIER IS ; MONTHS SUPPLY ON HAND IS ; IS THE TYPE CODE AND/OR THE MODIFIER VALID
+13 ;;13;;CONSECUTIVE MONTH ITEM HAS BEEN ON REQUIREMENTS REPORT - WHY -DO YOU USE REPORT #13 WHEN ORDERING
+14 ;;14;DUE IN IS 60 OR MORE DAYS PAST DILIVERY DATE - IS THE DUE IN VALID - DO YOU CHECK REPORT #14 EACH MONTH
+15 ;;15;PAMIQ IS ; - AMIQ IS ; - DOES THE PAMIQ NEED TO BE UPDATED BY CHANGING THE RPQ
+16 ;;16;LAST PURCHASE PRICE IS $; - AVERAGE UNIT COST IS $; - DOES THE LAST PURCHACE PRICE NEED TO BE UPDATED