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

ASURM78P.m

Go to the documentation of this file.
ASURM78P ; IHS/ITSC/LMH -PRINT RPT 78 DATA FROM ASURX(76 ; 
 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
 ;This routine formats and prints report 78, Analysis of Issues by
 ;Area Report.
EN ;EP;PRIMARY ENTRY POINT FOR REPORT 78
 Q  ;WAR 5/21/99
 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^ASURM78P",ZTDESC="SAMS RPT 78" D O^ASUUZIS
 I POP S IOP=$I D ^%ZIS Q
 I ASUK(ASUK("PTR"),"Q") Q
 I ($D(ASUK("DT"))#10)'=1 D DATE^ASUUDATE
PSER ;EP;FOR TASKMAN QUEUE OF PRINT
 D U^ASUUZIS
 S ASUV("RPT")="R78",ASUC("PG")=""
 I ($D(ASUK("DT"))#10)'=1 D DATE^ASUUDATE
 D EN1,P1^ASURO76P
 S (ASUX("SST"),ASUX("USR"),ASUX("ACC"))=""
 F  S ASUX("SST")=$O(^XTMP("ASUR","R76",ASUX("SST"))) Q:ASUX("SST")=""  D
 .F  S ASUX("USR")=$O(^XTMP("ASUR","R76",ASUX("SST"),ASUX("USR"))) Q:'ASUX("USR")  D
 ..S ASUX("REQ")=ASUX("SST")_$E(ASUX("USR"),3,6)
 ..F ASUX("ACC")=0:0 S ASUX("ACC")=$O(^XTMP("ASUR","R76",ASUX("SST"),ASUX("USR"),ASUX("ACC"))) Q:'ASUX("ACC")  S ASUC("TR")=^(ASUX("ACC")) D
 ...F ASUV("FIELD")=2:1:22 D
 ....S ASUC(ASUV("FIELD"),1,ASUX("ACC"))=ASUC(ASUV("FIELD"),1,ASUX("ACC"))+$P(ASUC("TR"),U,ASUV("FIELD"))
 D SBK,P3^ASURO76P,HEADER^ASURO76P,P1^ASURO76P,EN1
 D ZAP0^ASURO76P
 D PAZ^ASUURHDR
 I ASUK("PTRSEL")]"" W @IOF Q
 D C^ASUUZIS
 Q
SBK ;
 F ASUV("ACC")=1,2,3,4,5,9 D
 .F ASUV("FIELD")=2:1:22 D
 ..S ASUC(ASUV("FIELD"),0,ASUV("ACC"))=ASUC(ASUV("FIELD"),1,ASUV("ACC"))
 Q
EN1 ;
 F ASUV("ACC")=1,2,3,4,5,9 D
 .F ASUV("FIELD")=2:1:26 D
 ..S ASUC(ASUV("FIELD"),1,ASUV("ACC"))=0
 Q