- ASUCOUTP ; IHS/ITSC/LMH -CLOSEOUT PROCESS ;
- ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
- ;This routine controls the closeout processing
- S ASUP("CKP")=+($G(ASUP("CKP")))
- I ASUP("CKP")=0 S ASUP("CKP")=1 D SETSP^ASUCOSTS
- I ASUP("TYP")=2,ASUP("CKP")=1 D G:ASUP("HLT") KILL
- .;Yearly closeout
- .D CLYR^ASUMKBPS
- .I ASUP("CKY")'=5 S ASUP("HLT")=1
- .Q:ASUP("HLT")
- .S ASUP("CKY")=0 D SETSY^ASUCOSTS S ASUP("CKP")=2 D SETSP^ASUCOSTS
- E I ASUP("CKP")=1 S ASUP("CKP")=2 D SETSP^ASUCOSTS
- D ^ASUCOHKP Q:ASUP("HLT")
- I ASUP("CKP")=3 D
- .S ASUP("CKP")=4 D SETSP^ASUCOSTS
- I ASUP("TYP")=1,ASUP("CKP")=4 D
- .;Monthly Update
- .D ^ASUCOMOR
- .I ASUP("CKM")=16 D
- ..S ASUP("CKP")=5 D SETSTAT^ASUCOSTS
- .E D
- ..S ASUP("HLT")=1
- E D
- .;not monthly update
- .S ASUP("CKP")=5 D SETSTAT^ASUCOSTS
- G:$G(ASUP("HLT"))=1 KILL
- I ASUP("CKP")=5 D
- .;Sort report extracts
- .D ^ASUCORPX
- .I ASUP("CKX")=0 D
- ..S ASUP("CKP")=6 D SETSTAT^ASUCOSTS
- .E D
- ..S ASUP("HLT")=1
- Q
- KILL ;
- D SETSTAT^ASUCOSTS
- D ^ASUCOKIL
- K ASUP("LST"),ASUF
- Q
- ASUCOUTP ; IHS/ITSC/LMH -CLOSEOUT PROCESS ;
- +1 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
- +2 ;This routine controls the closeout processing
- +3 SET ASUP("CKP")=+($GET(ASUP("CKP")))
- +4 IF ASUP("CKP")=0
- SET ASUP("CKP")=1
- DO SETSP^ASUCOSTS
- +5 IF ASUP("TYP")=2
- IF ASUP("CKP")=1
- Begin DoDot:1
- +6 ;Yearly closeout
- +7 DO CLYR^ASUMKBPS
- +8 IF ASUP("CKY")'=5
- SET ASUP("HLT")=1
- +9 IF ASUP("HLT")
- QUIT
- +10 SET ASUP("CKY")=0
- DO SETSY^ASUCOSTS
- SET ASUP("CKP")=2
- DO SETSP^ASUCOSTS
- End DoDot:1
- IF ASUP("HLT")
- GOTO KILL
- +11 IF '$TEST
- IF ASUP("CKP")=1
- SET ASUP("CKP")=2
- DO SETSP^ASUCOSTS
- +12 DO ^ASUCOHKP
- IF ASUP("HLT")
- QUIT
- +13 IF ASUP("CKP")=3
- Begin DoDot:1
- +14 SET ASUP("CKP")=4
- DO SETSP^ASUCOSTS
- End DoDot:1
- +15 IF ASUP("TYP")=1
- IF ASUP("CKP")=4
- Begin DoDot:1
- +16 ;Monthly Update
- +17 DO ^ASUCOMOR
- +18 IF ASUP("CKM")=16
- Begin DoDot:2
- +19 SET ASUP("CKP")=5
- DO SETSTAT^ASUCOSTS
- End DoDot:2
- +20 IF '$TEST
- Begin DoDot:2
- +21 SET ASUP("HLT")=1
- End DoDot:2
- End DoDot:1
- +22 IF '$TEST
- Begin DoDot:1
- +23 ;not monthly update
- +24 SET ASUP("CKP")=5
- DO SETSTAT^ASUCOSTS
- End DoDot:1
- +25 IF $GET(ASUP("HLT"))=1
- GOTO KILL
- +26 IF ASUP("CKP")=5
- Begin DoDot:1
- +27 ;Sort report extracts
- +28 DO ^ASUCORPX
- +29 IF ASUP("CKX")=0
- Begin DoDot:2
- +30 SET ASUP("CKP")=6
- DO SETSTAT^ASUCOSTS
- End DoDot:2
- +31 IF '$TEST
- Begin DoDot:2
- +32 SET ASUP("HLT")=1
- End DoDot:2
- End DoDot:1
- +33 QUIT
- KILL ;
- +1 DO SETSTAT^ASUCOSTS
- +2 DO ^ASUCOKIL
- +3 KILL ASUP("LST"),ASUF
- +4 QUIT