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

ASUCOPSP.m

Go to the documentation of this file.
  1. ASUCOPSP ; IHS/ITSC/LMH -CLOSEOUT PRINTER SPOOLING ;
  1. ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
  1. PRTSPLI ;EP ; print invoice to spool
  1. I $P($G(^ASUSITE(1,0)),U,7)'["HFS" W !,"Invoice reports not being spooled to UNIX - this option not useable" Q ;DFM P1 8/28/98
  1. S ASUU("PDST")=$P($G(^ASUSITE(1,3)),U,7),ASUU("LST")="I"
  1. S ASUU("FILE")=$G(ASUU("FILE"))
  1. I $G(ASUK("DT","DA")) D
  1. .S DIR(0)="Y",DIR("A")="Do you want today's report" D ^DIR
  1. .I 'Y D ASKDATE^ASUUDATE
  1. E D
  1. .D ASKDATE^ASUUDATE
  1. I '$D(ASUK("DT","DA")) W !,"Report date not selected" Q
  1. I ASUU("FILE")']"" S ASUU("FILE")="ASU"_ASUK("DT","MO")_ASUK("DT","DA")_".I"_$S($G(ASUL(2,"STA","CD")):ASUL(2,"STA","CD"),1:"RP")
  1. G PRNTIT
  1. PRTSPLS ;EP ; print standard to spool
  1. I $P($G(^ASUSITE(1,0)),U,6)'["HFS" W !,"Standard reports not being spooled to UNIX - this option not useable" Q
  1. S ASUU("PDST")=$P($G(^ASUSITE(1,3)),U,6),ASUU("LST")="S"
  1. S ASUU("FILE")=$G(ASUU("FILE"))
  1. I $G(ASUK("DT","DA")) D
  1. .S DIR(0)="Y",DIR("A")="Do you want today's report" D ^DIR
  1. .I 'Y D ASKDATE^ASUUDATE
  1. E D
  1. .D ASKDATE^ASUUDATE
  1. I '$D(ASUK("DT","DA")) W !,"Report date not selected" Q
  1. I ASUU("FILE")']"" S ASUU("FILE")="ASU"_ASUK("DT","MO")_ASUK("DT","DA")_".S"_$S($G(ASUL(2,"STA","CD")):ASUL(2,"STA","CD"),1:"RP")
  1. PRNTIT ;
  1. S ASUU("HOSTCMD")="lp"_$S($G(ASUU("PDST"))]"":" -d"_ASUU("PDST"),1:"")_" /usr/spool/uucppublic/"_ASUU("FILE") K ASUU("FILE")
  1. W !,"Requesting report file be printed:"
  1. HOSTCMD ;
  1. U IO(0)
  1. I ^%ZOSF("OS")'["MSM-UNIX" W !,"This option only available with MSM mumps running under UNIX" G KILL
  1. W !,"Unix response to request is: ",!
  1. S X=$$TERMINAL^%HOSTCMD(ASUU("HOSTCMD")) ;SAC exception granted 1/30/97
  1. D PAZ^ASUURHDR
  1. KILL ;
  1. K ASUU,X,Y
  1. Q
  1. GDIR ;EP ;Get archive directory DFM P1 8/28/98
  1. S ASUP("INV","DIR")=$P($P($G(^ASUSITE(1,0)),U,7),":",4) ;DFM P1 8/28/98
  1. S ASUP("STD","DIR")=$P($P($G(^ASUSITE(1,0)),U,6),":",4) ;DFM P1 8/28/98
  1. S XBDIR=$S(ASUP("STD","DIR")]"":ASUP("STD","DIR"),ASUP("INV","DIR")]"":ASUP("INV","DIR"),1:"") ;DFM P1 8/28/98
  1. I XBDIR="" D ;WAR 7/27/99
  1. .W !,"No reports archived to disk"
  1. .D PAZ^ASUURHDR
  1. Q ;DFM P1 8/28/98
  1. BZLIST ;EP ; list archive files
  1. D GDIR Q:XBDIR']"" S ASUU("HOSTCMD")="l -l "_XBDIR_"ASU*" D HOSTCMD ;DFM P1 8/28/98
  1. Q
  1. GFILE ;EP ;Get file to browse ;COMPLETE SUB ROUTINE DFM P1 8/28/98
  1. S XBFIL="ASU" S DIR("A")="Select report type",DIR(0)="SOB^S:Standard;I:Invoice;M:Monthly",DIR("B")="S" D ^DIR S:$G(X)]"" XBFIL=XBFIL_X_"R"_$G(ASUL(2,"STA","CD"))
  1. S DIR("A")="Enter date of report",DIR(0)="DO",DIR("B")=$G(ASUK("DT","FM")) D ^DIR S:Y XBFIL=XBFIL_"."_$E(Y,4,7)
  1. Q
  1. BROWSE ;EP ; brouse listings
  1. D GDIR Q:XBDIR']"" D GFILE Q:XBFIL']"" ;DFM P1 8/28/98
  1. D FILE^XBLM(XBDIR,XBFIL)
  1. Q