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

ASURQSTD.m

Go to the documentation of this file.
ASURQSTD ; IHS/ITSC/LMH -QUATERLY UPDATE REPORTS DRIVER ; 
 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
 ;This routine is used to print the Quarterly update series of
 ;reports - R81, and R82. It involkes routines ;ASURQ81P ^ASURQ82P
 K ^XTMP("ASUR","R81"),^XTMP("ASUR","R82")
 D SETQTR^ASUUDATE G EN
PRINT ;EP; -PRINT PREVIOUS REPORTS
 I '$D(^XTMP("ASUR","R81")) D  Q
 .S ASURX="W !,""No Data Available for Quarterly Reports"",!" D ^ASUUPLOG
 .S DIR(0)="E" D ^DIR
EN ;EP;PRIMARY ENTRY POINT FOR QUARTERLY REPORTS
 I '$D(IO) D HOME^%ZIS
 I '$D(DUZ(2)) D  Q
 .S ASURX="W !,""Report must be run from Kernel option"",!" D ^ASUUPLOG
 I '$D(ASUL(1,"AR","AP")) D SETAREA^ASULARST
 S ASUK("PTRSEL")=$G(ASUK("PTRSEL")) I ASUK("PTRSEL")]"" G PSER
 S ZTRTN="PSER^ASURQUPD",ZTDESC="SAMS Quarterly Reports" D O^ASUUZIS
 I POP S IOP=$I D ^%ZIS Q
 I ASUK(ASUK("PTR"),"Q") Q
 S ASUK("PTRSEL")=1
PSER ;EP;FOR TASKMAN QUEUE OF PRINT
 I '$D(ASUP("TYP")) S ASUP("TYP")=0 D ^ASURQ25P,^ASURQ49P,^ASURQ81P,^ASURQ82P G DONE
 D TIME^ASUUDATE
 S ASURX="W !,""S.A.M.S. Quarterly Reports Printing Begun "_ASUK("DT","TIME")_"""" D ^ASUUPLOG
 ;S %H=$H D YX^%DTC
 D U^ASUUZIS
 I ASUP("CKM")=30 S ASUP("CKM")=31 D  Q:ASUP("HLT")
 .D SETSM^ASUCOSTS K ^XTMP("ASUR","R25") S ^XTMP("ASUR","R25",0)=ASUK("DT","FM")+10000_U_ASUK("DT","FM")
 .D ^ASURQ25P
 I ASUP("CKM")=31 S ASUP("CKM")=32 D  Q:ASUP("HLT")
 .D SETSM^ASUCOSTS K ^XTMP("ASUR","R49") S ^XTMP("ASUR","R49",0)=ASUK("DT","FM")+10000_U_ASUK("DT","FM")
 .D ^ASURQ49P
 I ASUP("CKM")=32 S ASUP("CKM")=33 D  Q:ASUP("HLT")
 .D SETSM^ASUCOSTS K ^XTMP("ASUR","R81") S ^XTMP("ASUR","R81",0)=ASUK("DT","FM")+10000_U_ASUK("DT","FM")
 .D NEWQTR^ASURQ81P
 I ASUP("CKM")=33 S ASUP("CKM")=34 D  Q:ASUP("HLT")
 .D SETSM^ASUCOSTS K ^XTMP("ASUR","R82") S ^XTMP("ASUR","R82",0)=ASUK("DT","FM")+10000_U_ASUK("DT","FM")
 .D ^ASURQ82P
DONE ;
 U IO(0)
 D TIME^ASUUDATE
 S ASURX="W !,""S.A.M.S. Quarterly Reports Printing Ended "_ASUK("DT","TIME")_"""" D ^ASUUPLOG
 Q:ASUP("TYP")
 D C^ASUUZIS
 K ASUSV("TRCD"),ASUK("PTRSEL")
 Q