- ASURDINV ; IHS/ITSC/LMH -DAILY UPDATE INV REPORTS ;
- ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
- ;This routine is used to print the daily update Invoice series of
- ;reports - R70, R71. It is involked both by the Daily update option
- ;and by the Invoice series print option. It involks routines
- ;^ASURD70P and ^ASURD71P.
- 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("PTR")="IRPT"
- S ZTRTN="PSER^ASURDINV",ZTDESC="SAMS INVOICE REPORTS"
- D O^ASUUZIS Q:$D(DTOUT) Q:$D(DUOUT) ;DFM P1 9/15/98
- 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
- D TIME^ASUUDATE
- S ASURX="W !,""S.A.M.S. Invoice Reports Procedure Begun "_ASUK("DT","TIME")_"""" D ^ASUUPLOG
- D U^ASUUZIS
- D:$G(ASUP("TYP"))']"" SETCTRL^ASUCOSTS
- S ASUP("CKI")=+$G(ASUP("CKI"))
- I ASUP("CKI")=0 S ASUP("CKI")=1 D SETSI^ASUCOSTS
- I ASUP("CKI")=1 D ^ASURD70P S ASUP("CKI")=2 D SETSI^ASUCOSTS
- I ASUP("CKI")=2 D ^ASURD71P S ASUP("CKI")=3 D SETSI^ASUCOSTS
- I ASUP("CKI")=3 D
- .I $D(ASUV("R72 LAST DT")) D
- ..D REPRINT^ASURD72P S ASUP("CKI")=0 D SETSI^ASUCOSTS
- .E D
- ..D ^ASURD72P S ASUP("CKI")=0 D SETSI^ASUCOSTS
- D TIME^ASUUDATE
- D C^ASUUZIS
- U IO(0)
- S ASURX="W !,""S.A.M.S. Invoice Reports Procedure Ended "_ASUK("DT","TIME")_"""" D ^ASUUPLOG
- I ASUP("CKI")=0 D
- .S ASUP("IVR")="Y",ASUP("CKP")=7 D SETSTAT^ASUCOSTS
- Q
- ASURDINV ; IHS/ITSC/LMH -DAILY UPDATE INV REPORTS ;
- +1 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
- +2 ;This routine is used to print the daily update Invoice series of
- +3 ;reports - R70, R71. It is involked both by the Daily update option
- +4 ;and by the Invoice series print option. It involks routines
- +5 ;^ASURD70P and ^ASURD71P.
- +6 IF '$DATA(IO)
- DO HOME^%ZIS
- +7 IF '$DATA(DUZ(2))
- WRITE !,"Report must be run from Kernel option"
- QUIT
- +8 IF '$DATA(ASUL(1,"AR","AP"))
- DO SETAREA^ASULARST
- +9 SET ASUK("PTR")="IRPT"
- +10 SET ZTRTN="PSER^ASURDINV"
- SET ZTDESC="SAMS INVOICE REPORTS"
- +11 ;DFM P1 9/15/98
- DO O^ASUUZIS
- IF $DATA(DTOUT)
- QUIT
- IF $DATA(DUOUT)
- QUIT
- +12 IF POP
- SET IOP=$IO
- DO ^%ZIS
- QUIT
- +13 IF ASUK(ASUK("PTR"),"Q")
- QUIT
- +14 SET ASUK("PTRSEL")=1
- PSER ;EP;FOR TASKMAN QUEUE OF PRINT
- +1 DO TIME^ASUUDATE
- +2 SET ASURX="W !,""S.A.M.S. Invoice Reports Procedure Begun "_ASUK("DT","TIME")_""""
- DO ^ASUUPLOG
- +3 DO U^ASUUZIS
- +4 IF $GET(ASUP("TYP"))']""
- DO SETCTRL^ASUCOSTS
- +5 SET ASUP("CKI")=+$GET(ASUP("CKI"))
- +6 IF ASUP("CKI")=0
- SET ASUP("CKI")=1
- DO SETSI^ASUCOSTS
- +7 IF ASUP("CKI")=1
- DO ^ASURD70P
- SET ASUP("CKI")=2
- DO SETSI^ASUCOSTS
- +8 IF ASUP("CKI")=2
- DO ^ASURD71P
- SET ASUP("CKI")=3
- DO SETSI^ASUCOSTS
- +9 IF ASUP("CKI")=3
- Begin DoDot:1
- +10 IF $DATA(ASUV("R72 LAST DT"))
- Begin DoDot:2
- +11 DO REPRINT^ASURD72P
- SET ASUP("CKI")=0
- DO SETSI^ASUCOSTS
- End DoDot:2
- +12 IF '$TEST
- Begin DoDot:2
- +13 DO ^ASURD72P
- SET ASUP("CKI")=0
- DO SETSI^ASUCOSTS
- End DoDot:2
- End DoDot:1
- +14 DO TIME^ASUUDATE
- +15 DO C^ASUUZIS
- +16 USE IO(0)
- +17 SET ASURX="W !,""S.A.M.S. Invoice Reports Procedure Ended "_ASUK("DT","TIME")_""""
- DO ^ASUUPLOG
- +18 IF ASUP("CKI")=0
- Begin DoDot:1
- +19 SET ASUP("IVR")="Y"
- SET ASUP("CKP")=7
- DO SETSTAT^ASUCOSTS
- End DoDot:1
- +20 QUIT