- ASURDRNG ; IHS/ITSC/LMH -RPT 10 -VOUCHER SUMMARY ;
- ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
- ;This routine selects a range of dates for report data
- D:$G(ASUL(2,"STA","E#"))']"" STA^ASULARST($G(ASUL("ST#")))
- S (ASURR("RNG","BEG"),ASURR("RNG","END"))=ASUL(2,"STA","E#")
- S DIR(0)="Y",DIR("B")="YES",DIR("A")="Create report(s) for today's transactions" D ^DIR Q:$D(DIRUT)
- I Y D
- .S ASURR("RNG","BEG")=ASURR("RNG","BEG")_"-"_ASUK("DT","FM")_"-"_"0000000"
- .S ASURR("RNG","END")=ASURR("RNG","END")_"-"_ASUK("DT","FM")_"-"_"9999999"
- E D
- .N DIR S DIR(0)="D",DIR("B")="T",DIR("A")="Enter beginning date" D ^DIR Q:$D(DIRUT)
- .S ASURR("RNG","BEG")=ASURR("RNG","BEG")_"-"_Y_"-0000000"
- .S DIR("A")="Enter ending date" D ^DIR Q:$D(DIRUT)
- .S ASURR("RNG","END")=ASURR("RNG","END")_"-"_Y_"-9999999"
- S ASURR("BEG")=$O(^ASUH("B",ASURR("RNG","BEG"))),ASURR("END")=$O(^ASUH("B",ASURR("RNG","END")),-1)
- Q:ASURR("BEG")="" Q:ASURR("END")=""
- S ASURR("BEG")=$O(^ASUH("B",ASURR("BEG"),"")),ASURR("END")=$O(^ASUH("B",ASURR("END"),"")),ASUTDA=ASURR("BEG")-1
- Q
- ASURDRNG ; IHS/ITSC/LMH -RPT 10 -VOUCHER SUMMARY ;
- +1 ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
- +2 ;This routine selects a range of dates for report data
- +3 IF $GET(ASUL(2,"STA","E#"))']""
- DO STA^ASULARST($GET(ASUL("ST#")))
- +4 SET (ASURR("RNG","BEG"),ASURR("RNG","END"))=ASUL(2,"STA","E#")
- +5 SET DIR(0)="Y"
- SET DIR("B")="YES"
- SET DIR("A")="Create report(s) for today's transactions"
- DO ^DIR
- IF $DATA(DIRUT)
- QUIT
- +6 IF Y
- Begin DoDot:1
- +7 SET ASURR("RNG","BEG")=ASURR("RNG","BEG")_"-"_ASUK("DT","FM")_"-"_"0000000"
- +8 SET ASURR("RNG","END")=ASURR("RNG","END")_"-"_ASUK("DT","FM")_"-"_"9999999"
- End DoDot:1
- +9 IF '$TEST
- Begin DoDot:1
- +10 NEW DIR
- SET DIR(0)="D"
- SET DIR("B")="T"
- SET DIR("A")="Enter beginning date"
- DO ^DIR
- IF $DATA(DIRUT)
- QUIT
- +11 SET ASURR("RNG","BEG")=ASURR("RNG","BEG")_"-"_Y_"-0000000"
- +12 SET DIR("A")="Enter ending date"
- DO ^DIR
- IF $DATA(DIRUT)
- QUIT
- +13 SET ASURR("RNG","END")=ASURR("RNG","END")_"-"_Y_"-9999999"
- End DoDot:1
- +14 SET ASURR("BEG")=$ORDER(^ASUH("B",ASURR("RNG","BEG")))
- SET ASURR("END")=$ORDER(^ASUH("B",ASURR("RNG","END")),-1)
- +15 IF ASURR("BEG")=""
- QUIT
- IF ASURR("END")=""
- QUIT
- +16 SET ASURR("BEG")=$ORDER(^ASUH("B",ASURR("BEG"),""))
- SET ASURR("END")=$ORDER(^ASUH("B",ASURR("END"),""))
- SET ASUTDA=ASURR("BEG")-1
- +17 QUIT