          SUBROUTINE (PASSER)
** Version# 15.0002[1] - 06/07/2011 - 01:38pm - SMITJR - eclipse
** Copied from BP CR.DVR.CASHBOX.JRL Version# 15 - 06/11/2007 - 02:02pm - AGARZA - main

*** Subroutine: CR.DVR.CASHBOX.JRL
*-------------------------------------------------------------------------*
*** This is the driver for the Cashbox Journal Report.
*-------------------------------------------------------------------------*
*** PASSER - not used
*-------------------------------------------------------------------------*

          WINDOW ,,,,9,'CR.DVR.CASHBOX.JRL'

          MENU.LOAD  2,11,5,1,'P'
          MENU.LOAD 10,11,4,1,'H'
          MENU.LOAD 17,11,4,1,'O'
          MENU.LOAD 24,11,4,1,'S'

          DRPT$  = 'Cashbox Journal'
          SD     = DATE()
          ED     = ''
          FITEM  = ''
          STM    = 0
          ETM    = ICONV('11:59PM','MTH')
          ST     = ''
          VER    = 'W'
          SORT   = 'U'
          USR.ID = ''

          GET.TTY BR,LOC.ID
          PRINT @(15,3):OCONV(SD,'D4/')     "L#10"
          PRINT @(38,3):OCONV(STM,'MTH')    "L#7"
          PRINT @(45,3):TIME.ZONE$
          PRINT @(38,4):OCONV(ETM,'MTH')    "L#7"
          PRINT @(45,4):TIME.ZONE$
          PRINT @(15,5):BR                  "L#10"
          PRINT @(15,6):LOC.ID              "L#15"

          TERR.OK = YES
          IF BR THEN
             VERIFY.BR BR,NAME,BRCHS,TERR.OK
          END
*-------------------------------------------------------------------------*
INSD:     INP SD,15,3,10,'VD4/'
          IF F12 THEN GOTO FINISH
          IF ED = '' THEN
             ED = SD
             PRINT @(15,4):OCONV(ED,'D4/')
             END
          ON MOVE+1 GOTO INSD, INSD, INSD, INSTM, INED, INSTM
*-------------------------------------------------------------------------*
INSTM:    INP STM,38,3,7,'MTH'
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INSTM, INSD, INSTM, INSTM, INETM, INED
*-------------------------------------------------------------------------*
INED:     INP ED,15,4,10,'VD4/'
          IF NUM(SD) AND NUM(ED) THEN
             IF ED > SD AND STM#'' AND ETM='' THEN
                ETM = STM
                PRINT @(38,4):OCONV(ETM,'MTH') "L#7"
                END
             END
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INED, INED, INSD, INETM, INBR, INBR
*-------------------------------------------------------------------------*
INETM:    INP ETM,38,4,7,'MTH'
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INETM, INED, INSTM, INSTM, INBR, INBR
*-------------------------------------------------------------------------*
INBR:     INP.BR 15,5,8,BR,NAME,BRCHS,1
          IF F12 THEN GOTO FINISH
          IF QUIT THEN PRINT BELL:; GOTO INBR
          ON MOVE+1 GOTO INBR, INBR, INED, INBR, INLOC, INLOC
*-------------------------------------------------------------------------*
INLOC:    INP LOC.ID,15,6,15,V_'S:VERF.LOC.MAINT'
          IF F12 THEN GOTO FINISH
          IF QUIT THEN PRINT BELL:; GOTO INLOC
          ON MOVE+1 GOTO INLOC, INLOC, INBR, INLOC, INUID, INUID
*-------------------------------------------------------------------------*
INUID:    INP USR.ID,15,7,10,V_'INITIALS'
          IF F12 THEN GOTO FINISH
          IF QUIT THEN PRINT BELL:; GOTO INUID
          ON MOVE+1 GOTO INUID, INUID, INBR, INUID
*-------------------------------------------------------------------------*
INVER:    INP VER,27,8,6,V_'D:,Wide,Narrow'
          IF F12 THEN GOTO FINISH
          IF QUIT THEN PRINT BELL:; GOTO INVER
          ON MOVE+1 GOTO INVER, INVER, INUID, INVER, INSORT
*-------------------------------------------------------------------------*
INSORT:   INP SORT,27,9,14,V_'D:,User,Customer,Invoice Number'
          IF F12 THEN GOTO FINISH
          IF QUIT THEN PRINT BELL:; GOTO INSORT
          ON MOVE+1 GOTO INSORT,INSORT,INVER,INSORT,INSORT,INSORT
*-------------------------------------------------------------------------*
SUBS:     IF OPTION = 4 THEN GOTO FSEL
          IF SD='' THEN PRINT BELL:; RETURN TO INSD
          IF ED='' THEN PRINT BELL:; RETURN TO INED
          IF NUM(SD) AND NUM(ED) THEN
             IF SD > ED THEN
                MESS 2,1,BELL:' Start date must be before end date'
                RETURN TO INSD
                END
             END
          IF BRCHS='' THEN PRINT BELL:; RETURN TO INBR

          READV HAJO.TEST FROM CTRLFILE,'HAJOCA.SITE',1 ELSE HAJO.TEST=''
          IF HAJO.TEST THEN
             PH.EXE 'CR.PHR.CASHBOX.JRL.HAJO',SD,STM,ED,ETM,BRCHS,BR,LOC.ID,USR.ID,SORT,VER,FITEM
          END ELSE
             PH.EXE 'CR.PHR.CASHBOX.JRL.BETA',SD,STM,ED,ETM,BRCHS,BR,LOC.ID,USR.ID,SORT,VER,FITEM
          END

          IF F12 THEN RETURN

          RETURN TO FINISH
*-------------------------------------------------------------------------*
FSEL:     FILTER.INPUT 'S',FITEM
          RETURN
*-------------------------------------------------------------------------*
FINISH:   WINDOW.CLOSE
          RETURN
!SMITJR~06/07/11~13:38
