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

ASURQ49P.m

Go to the documentation of this file.
ASURQ49P ; 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.
EN ;EP;PRIMARY ENTRY POINT FOR REPORT 49
 I '$D(IO) D HOME^%ZIS
 I '$D(DUZ(2)) W !,"Report must be run from Kernel option" Q
 I '$D(ASUL(1,"AR","AP")) D SETAREA^ASULARST
 S ASUK("PTRSEL")=$G(ASUK("PTRSEL")) I ASUK("PTRSEL")]"" G PSER
 S ZTRTN="PSER^ASUD49P",ZTDESC="SAMS RPT 49" D O^ASUUZIS
 I POP S IOP=$I D ^%ZIS Q
 I ASUK(ASUK("PTR"),"Q") Q
PSER ;EP;FOR TASKMAN QUEUE OF PRINT
 D:'$D(^XTMP("ASUR","R49")) ^ASURQ490
 D U^ASUUZIS
 S ASUV("E#","STA")=$O(^XTMP("ASUR","R49",0)) D ARE^ASULARST($E(ASUV("E#","STA"),1,2)),STA^ASULARST(ASUV("E#","STA"))
 S ASUL(9,"ACG")=$O(^XTMP("ASUR","R49",ASUV("E#","STA"),0)) D ACGNM^ASULDIRF(ASUL(9,"ACG"))
 S ASUV("RPT")="R49",ASUQ("HDR")="HEADER^ASURQ49P"
 S (ASUC("PG"),ASUMS("E#","STA"))=0,ASUF("BK")="",ASUV("PART")="A DETAIL LISTING"
 D ^ASUUDATA I ASUX("NDTA") G K
 F  S ASUMS("E#","STA")=$O(^XTMP("ASUR","R49",ASUMS("E#","STA"))) Q:ASUMS("E#","STA")']""  D  Q:$D(DTOUT)  Q:$D(DUOUT)
 .S ASUMS("E#","ARE")=$E(ASUMS("E#","STA"),1,2)
 .D ARE^ASULARST(ASUMS("E#","ARE")),STA^ASULARST(ASUMS("E#","STA"))
 .S ASUL(9,"ACG")=0
 .F  S ASUL(9,"ACG")=$O(^XTMP("ASUR","R49",ASUMS("E#","STA"),ASUL(9,"ACG"))) Q:ASUL(9,"ACG")']""  D  Q:$D(DUOUT)  Q:$D(DTOUT)
 ..S ASUMS("E#","IDX")=0 D ACGNM^ASULDIRF(ASUL(9,"ACG"))
 ..F  S ASUMS("E#","IDX")=$O(^XTMP("ASUR","R49",ASUMS("E#","STA"),ASUL(9,"ACG"),ASUMS("E#","IDX"))) Q:ASUMS("E#","IDX")']""  D  Q:$D(DUOUT)  Q:$D(DTOUT)
 ...S ASUMX("E#","IDX")=ASUMS("E#","IDX")
 ...D READ^ASUMXDIO D ^ASUMSTRD D:ASUF("BK") HEADER Q:$D(DUOUT)  Q:$D(DTOUT)
 ...W !!,$E(ASUMX("IDX"),1,5),".",$E(ASUMX("IDX"),6),?9,ASUMX("ACC"),?15,ASUMX("DESC",1),!
 ...S ASUC("LINE")=$G(ASUC("LINE"))+2,ASUV("ERR")=0 D:ASUC("LINE")>(IOSL-4) HEADER
 ...F  S ASUV("ERR")=$O(^XTMP("ASUR","R49",ASUMS("E#","STA"),ASUL(9,"ACG"),ASUMS("E#","IDX"),ASUV("ERR"))) Q:ASUV("ERR")']""  D  Q:$D(DUOUT)  Q:$D(DTOUT)
 ....W !?10,^XTMP("ASUR","R49",ASUMS("E#","STA"),ASUL(9,"ACG"),ASUMS("E#","IDX"),ASUV("ERR"))
 ....S ASUC("LINE")=$G(ASUC("LINE"))+1 D:ASUC("LINE")>(IOSL-1) HEADER
 ..S ASUF("BK")=1
 .S Y=^XTMP("ASUR","R49",ASUMS("E#","STA"),0),ASUC("PC")=0
 .F X="TOT","TPA","13IS","XS","AIV" S ASUC("PC")=ASUC("PC")+1,ASUC("VAL",X)=$P(Y,U,ASUC("PC"))
 .F X="TOT","13IS","XS","ZBAL","PSTDU","MOD","NOIS","NSN","R13","RPQ","LPP" S ASUC("PC")=ASUC("PC")+1 S ASUC("LI",X)=$P(Y,U,ASUC("PC"))
 .S ASUV("PART")="B STATION SUMMARY" D HEADER D SUMMARY S ASUV("PART")="A DETAIL LISTING"
 .S ASUF("BK")=1
K ;
 K ASUMX,ASUMS,ASURX,ASUX,ASUC,ASUF("BK")
 Q
SUMMARY ;
 S ASUV("PART")="B STATION SUMMARY" D HEADER
 W !!?6,"01.  $",$J($FN(ASUC("VAL","TOT"),",",2),12)," TOTAL CURRENT INVENTORY VALUE"
 W !!?6,"02.  $",$J($FN(ASUC("VAL","TPA"),",",2),12)," TYPE CODE A ITEMS ONLY - CURRENT INVENTORY VALUE"
 W !!?6,"03.  $",$J($FN(ASUC("VAL","AIV"),",",2),12)," TYPE CODE A ITEMS ONLY - AVERAGE INVENTORY VALUE BASED ON EOQ PRINCIPLE OF STOCK REPLENISHMENT"
 W !!?6,"04.  $",$J($FN(ASUC("VAL","13IS"),",",2),12)," VALUE OF ITEMS WITH NO ISSUES IN 13 MONTHS OR LONGER"
 W !!?6,"05.  $",$J($FN(ASUC("VAL","XS"),",",2),12)," VALUE OF EXCESS QUANTITY ON HAND"
 W !!?6,"06.  ",$J($FN(ASUC("LI","TOT"),"",0),6)," TOTAL NUMBER OF LINE ITEMS IN INVENTORY"
 W !!?6,"07.  ",$J($FN(ASUC("LI","13IS"),"",0),6)," ITEMS HAVE HAD NO ISSUES IN 13 MONTHS OR LONGER"
 W !!?6,"08.  ",$J($FN(ASUC("LI","XS"),"",0),6)," ITEMS HAVE EXCESS QUANTITY ON HAND"
 W !!?6,"09.  ",$J($FN(ASUC("LI","ZBAL"),"",0),6)," ITEMS ARE ZERO BALANCE - ZERO DUE IN"
 W !!?6,"11.  ",$J($FN(ASUC("LI","PSTDU"),"",0),6)," DUE INS THAT ARE 60 DAYS OR MORE PAST THE DELIVERY DATE"
 W !!?6,"12.  ",$J($FN(ASUC("LI","MOD"),"",0),6)," ITEMS NEED EOQ TYPE CODE AND/OR MODIFIER REVIEWED/UPDATED"
 W !!?6,"13.  ",$J($FN(ASUC("LI","NOIS"),"",0),6)," ITEMS HAVE HAD NO ISSUES SINCE BEING ESTABLISHED"
 W !!?6,"14.  ",$J($FN(ASUC("LI","NSN"),"",0),6)," ITEMS NEED TO BE UPDATED WITH VALID NATIONAL STOCK NUMBER"
 W !!?6,"15.  ",$J($FN(ASUC("LI","R13"),"",0),6)," ITEMS HAVE APPEARED ON REQUIREMENTS ANALYSIS REPORT EXCESSIVE TIMES"
 W !!?6,"16.  ",$J($FN(ASUC("LI","RPQ"),"",0),6)," ITEMS NEED REVIEW POINT QUANTITY REVIEWED/UPDATED"
 W !!?6,"17.  ",$J($FN(ASUC("LI","LPP"),"",0),6)," ITEMS NEED TO HAVE LAST PURCHASE PRICE REVIEWED/UPDATED"
 Q
 S ASUC("PG")=$G(ASUC("PG"))+1,ASUC("LINE")=6,ASUF("BK")=0
 I ASUC("PG")>1 D PAZ^ASUURHDR Q:$D(DUOUT)  Q:$D(DTOUT)
 W @(IOF),"REPORT #49 DATA EXECEPTION ANALYSIS",?90,ASUK("DT"),?110,"PAGE",?115,$J($FN(ASUC("PG"),","),7)
 W !,"AREA:",?6,ASUL(1,"AR","AP"),?9,ASUL(1,"AR","NM"),?50,"PART ",ASUV("PART")
 W !,"STAT:",?6,ASUL(2,"STA","CD"),?9,ASUL(2,"STA","NM")
 W !,"ACCT:",?7,ASUL(9,"ACG")," ",ASUL(9,"ACG","NM")
 I $E(ASUV("PART"))="A" D
 .W !!," INDEX  A"
 .W !,"NUMBER  C",?15,"DESCRIPTION"
 Q