          SUBROUTINE (PASSER)
** Version# 9.0002[2] - 01/17/2017 - 05:18pm - TSMITH - eclipse
*** V9.0002 Change - Custom Coding . - 01/17/2017 - TSMITH - eclipse
** Copied from CBP CD.DVR.CHECK.REG Version# 9.0001[1] - 12/12/2016 - 12:25pm - TSMITH - eclipse

*** Subroutine: CD.DVR.CHECK.REG
*-------------------------------------------------------------------------*
*** This is the driver (user input) screen for the Check Register.
*** The check register shows all checks cut between given posting
*** dates.
*-------------------------------------------------------------------------*
*** COMMON VARIABLES : None
*-------------------------------------------------------------------------*

          WINDOW ,,,,9,'CD.DVR.CHECK.REG.AD'

          DRPT$     = 'A-D Check Register'
          SD        = ''
          ED        = ''
          BRCHS     = ''
          BANK.ID   = ''
          FITEM     = ''
          VOID      = YES
          SORTBY    = 'Check'
          GTYP      = 'Both'
          OPT       = "Detail"
          TERR.TYPE = 1

          MENU.LOAD  2,12,5,1,'P'
          MENU.LOAD 10,12,4,1,'H'
          MENU.LOAD 17,12,4,1,'O'
          MENU.LOAD 24,12,4,1,'S'
*-------------------------------------------------------------------------*
INBR:     INP.BR 17,3,10,BR,NAME,BRCHS,TERR.TYPE
          IF F12 THEN GOTO FINISH
          IF QUIT THEN PRINT BELL:; GOTO INBR
          ON MOVE+1 GOTO INBR,INBR,INBR,INBR,INSD,INSD
*-------------------------------------------------------------------------*
INSD:     INP SD,17,4,10,'VD4/'
          IF F12 THEN GOTO FINISH
          IF QUIT THEN PRINT BELL:; GOTO INSD
          IF ED='' THEN
             ED=SD
             PRINT @(17,5):OCONV(ED,'D4/')
             END
          ON MOVE+1 GOTO INSD,INSD,INBANK,INSD
*-------------------------------------------------------------------------*
INED:     INP ED,17,5,10,'VD4/'
          IF F12 THEN GOTO FINISH
          IF QUIT THEN PRINT BELL:; GOTO INED
          ON MOVE+1 GOTO INED,INED,INSD,INED
*-------------------------------------------------------------------------*
          IF BANK.ID = '' THEN
INBANK:      GET.BANK BANK.ID,BANK.DESC,BR
             PRINT @(17,6):BANK.DESC"L#20"
             IF F12 THEN GOTO FINISH
             IF QUIT THEN PRINT BELL:; GOTO INBANK
             ON MOVE+1 GOTO INBANK,INBANK,INED,INBANK
             END
*-------------------------------------------------------------------------*
INVOID:   INP VOID,31,7,1,'YN'
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INVOID,INVOID,INBR,INVOID,INSORT,INSORT
*-------------------------------------------------------------------------*
INSORT:   INP SORTBY,31,8,6,V_'D:Vendor':VM:'Check'
          IF F12 THEN GOTO FINISH
          IF SORTBY#'Check' AND SORTBY#'Vendor' THEN PRINT BELL:; GOTO INSORT
          ON MOVE+1 GOTO INSORT,INSORT,INBR,INSORT,INGTYP,INGTYP
*-------------------------------------------------------------------------*
INGTYP:   INP GTYP,25,9,8,V_'D:Manual':VM:'Computer':VM:'Both'
          IF F12 THEN GOTO FINISH
          IF GTYP#'Manual' AND GTYP#'Computer' AND GTYP#'Both' THEN PRINT BELL:;GOTO INGTYP
          ON MOVE+1 GOTO INGTYP, INGTYP, INSORT, INOPT, INOPT
*-------------------------------------------------------------------------*
INOPT:    INP OPT,25,10,7,V_'D:Detail':VM:'Summary'
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INOPT, INOPT, INGTYP, INOPT, INOPT
          GOTO INOPT
*-------------------------------------------------------------------------*
SUBS:     ON OPTION GOTO DOIT,DOIT,DOIT,FSEL
*-------------------------------------------------------------------------*
DOIT:     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
          IF BANK.ID=''   THEN PRINT BELL:; RETURN TO INBANK

          PH.SETUP.BR.ARGS BR,,TERR.TYPE,,BRDISP,BRLIST

          PH.EXE 'CD.PHR.CHECK.REG.AD',SD,ED,BRLIST,BRDISP,BANK.ID,VOID,SORTBY[1,1],GTYP,OPT,FITEM
          IF F12 THEN RETURN
          RETURN TO FINISH
*-------------------------------------------------------------------------*
FSEL:     FILTER.INPUT 'P',FITEM
          RETURN
*-------------------------------------------------------------------------*
FINISH:   WINDOW.CLOSE
          RETURN
!TSMITH~01/17/17~17:18
