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

ASURD01P.m

Go to the documentation of this file.
  1. ASURD01P ; IHS/ITSC/LMH -TRANS COUNTS REPORT ;
  1. ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
  1. ;This routine formats and prints report 1 from sorted extracts.
  1. EN ;EP;PRIMARY ENTRY POINT FOR REPORT 01
  1. ; JDH
  1. I '$D(IO) D HOME^%ZIS
  1. I '$D(DUZ(2)) W !,"Report must be run from Kernel option" Q
  1. I '$D(ASUL(1,"AR","AP")) D SETAREA^ASULARST
  1. S ASUK("PTRSEL")=$G(ASUK("PTRSEL")) I ASUK("PTRSEL")]"" G PSER
  1. S ZTRTN="PSER^ASURD01P",ZTDESC="SAMS RPT 01" D O^ASUUZIS
  1. I POP S IOP=$I D ^%ZIS Q
  1. I ASUK(ASUK("PTR"),"Q") Q
  1. PSER ;EP;FOR TASKMAN QUEUE OF PRINT
  1. ; JDH
  1. D U^ASUUZIS
  1. I ($D(ASUK("DT"))#10)=0 D ^ASUUDATE
  1. ;N X,Y S (X,Y)=$P(^XTMP("ASUR","R01",0),U,2) I Y'=ASUK("DT","FM") D SETDT^ASUUDATE(X)
  1. ; JDH N X,Y S (X,Y)=$P(^XTMP("ASUR01",0),U,2) I Y'=ASUK("DT","FM") D SETDT^ASUUDATE(X)
  1. D HEADER
  1. S ASUR("TR")="",ASUV("TY")=""
  1. F S ASUR("TR")=$O(^XTMP("ASUR","R01",3,ASUR("TR"))) Q:ASUR("TR")']"" D
  1. .D TRN^ASULARST(ASUR("TR"))
  1. .I ASUL(11,"TRN","TYPE")'=ASUV("TY") D
  1. ..I $G(ASUC(1))]"" W !?50,"_______",?60,"_______",?70,"_______",!?33,"SUB TOT:",?50,$J($FN($P(ASUC(1),U,1),",",0),7),?60,$J($FN($P(ASUC(1),U,2),",",0),7),?70,$J($FN($P(ASUC(1),U,3),",",0),7)
  1. ..F X=1:1:3 S $P(ASUC(2),U,X)=$P($G(ASUC(2)),U,X)+$P($G(ASUC(1)),U,X)
  1. ..K ASUC(1)
  1. ..W !!?2,ASUL(11,"TRN","TYPN") S ASUV("TY")=ASUL(11,"TRN","TYPE")
  1. .E D
  1. ..W !
  1. .W ?14,ASUL(11,"TRN","DBCR"),?22,ASUL(11,"TRN","EXTN")," ",$S(ASUL(11,"TRN","REV")=1:"REVERSAL",1:"")
  1. .S ASUC(0)=$P($G(^XTMP("ASUR","R01",1,ASUR("TR"))),U,2)_U_$P($G(^XTMP("ASUR","R01",2,ASUR("TR"))),U,2)_U_$P($G(^XTMP("ASUR","R01",3,ASUR("TR"))),U,2)
  1. .W ?50,$J($FN($P(ASUC(0),U,1),",",0),7),?60,$J($FN($P(ASUC(0),U,2),",",0),7),?70,$J($FN($P(ASUC(0),U,3),",",0),7)
  1. .F X=1:1:3 S $P(ASUC(1),U,X)=$P($G(ASUC(1)),U,X)+$P($G(ASUC(0)),U,X)
  1. I $G(ASUC(1))]"" W !?50,"_______",?60,"_______",?70,"_______",!?33,"SUB TOT:",?50,$J($FN($P(ASUC(1),U,1),",",0),7),?60,$J($FN($P(ASUC(1),U,2),",",0),7),?70,$J($FN($P(ASUC(1),U,3),",",0),7)
  1. F X=1:1:3 S $P(ASUC(2),U,X)=$P($G(ASUC(2)),U,X)+$P($G(ASUC(1)),U,X)
  1. W !!?50,"_______",?60,"_______",?70,"_______",!?30,"TOTAL:",?50,$J($FN($P($G(ASUC(2)),U,1),",",0),7),?60,$J($FN($P($G(ASUC(2)),U,2),",",0),7),?70,$J($FN($P($G(ASUC(2)),U,3),",",0),7)
  1. D PAZ^ASUURHDR
  1. K ASUX("E#"),ASUR,ASUR,ASUTR,ASUT,ASUC
  1. K DA,ASUX(0),DI,DIC,DIE,DQ,DR,X
  1. I $G(ASUK("PTRSEL"))]"" W @IOF Q
  1. D C^ASUUZIS
  1. Q
  1. S ASUC("PG")=$G(ASUC("PG"))+1
  1. D CLS^ASUUHDG
  1. W !?2,"REPORT #1. TRANSACTION COUNTS",?50,"DATE: ",ASUK("DT","MO"),"/",ASUK("DT","DA"),"/",ASUK("DT","YR"),?65,"PAGE: ",ASUC("PG")
  1. W !?2,"TYPE",?13,"Db/Cr",?21,"TRANSACTION",?54,"DAILY MONTHLY YR TO DT",!?54,"COUNT COUNT COUNT"
  1. W !,"-------------------------------------------------------------------------------",!!
  1. Q