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

ASUURANG.m

Go to the documentation of this file.
  1. ASUURANG ; IHS/ITSC/LMH -RPT 10 -VOUCHER SUMMARY ;
  1. ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
  1. ;This routine selects a range of dates for report data
  1. S DIR(0)="Y",DIR("B")="YES",DIR("A")="Date range for report(s) to be today's transactions only" D ^DIR Q:$D(DIRUT)
  1. S X=Y
  1. D RANGE(X)
  1. Q
  1. RANGE(X) ;EP ;Set report date range
  1. S ASUN("TYP")=X
  1. D:$G(ASUL(2,"STA","E#"))']"" STA^ASULARST($G(ASUL("ST#")))
  1. S (ASUN("BKY"),ASUN("EKY"))=ASUL(2,"STA","E#")
  1. I X D
  1. .S (Y,ASUN("BDT"),ASUN("EDT"))=ASUK("DT","FM")
  1. .S (ASUN("KEY"),ASUN("BKY"))=ASUN("BKY")_"-"_Y_"-"_"0000000"
  1. .S ASUN("EKY")=ASUN("EKY")_"-"_$S(X=1:Y,1:$E(Y,1,5)_"32")_"-"_"9999999"
  1. E D
  1. .W !,"Enter report date range"
  1. .N DIR S DIR(0)="D",DIR("B")="T",DIR("A")="Enter beginning date" D ^DIR Q:$D(DIRUT)
  1. .Q:Y<0
  1. .S ASUN("BDT")=Y
  1. .S (ASUN("KEY"),ASUN("BKY"))=ASUN("BKY")_"-"_Y_"-0000000"
  1. .S DIR("A")="Enter ending date" D ^DIR Q:$D(DIRUT)
  1. .Q:Y<0
  1. .S ASUN("EDT")=Y
  1. .S ASUN("EKY")=ASUN("EKY")_"-"_Y_"-9999999"
  1. Q:Y<0
  1. S ASUN("B#")=$O(^ASUH("B",ASUN("BKY"))),ASUN("E#")=$O(^ASUH("B",ASUN("EKY")),-1)
  1. Q:ASUN("B#")="" Q:ASUN("E#")=""
  1. S ASUN("B#")=$O(^ASUH("B",ASUN("B#"),"")),ASUN("E#")=$O(^ASUH("B",ASUN("E#"),"")),ASUHDA=ASUN("B#")-1
  1. Q