          SUBROUTINE (PASSER)
** Version# 61.0402[6] - 02/18/2010 - 05:05pm - SMITJR - eclipse
** Copied from BP SLS.DVR.PROD.SUM Version# 61.04 - 04/03/2007 - 10:16am - EILEENM - r8.0base
*** V61.0402 Change - Custom Coding CUSTOM - 02/18/2010 - SMITJR - eclipse
*** V61.04 Change - No Develop Ver Yet CUS183 - 04/03/2007 - EILEENM - r8.0base
*** V61.03 Change - No Develop Ver Yet CUP051 - 03/09/2007 - EILEENM - r8.0base
*** V61.02 Change - No Develop Ver Yet CQS896 - 03/07/2007 - ANNEM - r8.0base
*** V61.01 Change - No Develop Ver Yet CUA452 - 02/06/2007 - EILEENM - r8.0base

*** Subroutine - SLS.DVR.PROD.SUM
*-------------------------------------------------------------------------*
*** This is the Driver routine for the Product Sales Report. It will print
*** a report of all products that were sold within a specified date range,
*** and that match any criteria specified by the User from the Driver.
*-------------------------------------------------------------------------*
*** PASSER (not used)                                                 (IN)
*-------------------------------------------------------------------------*
*** COMMON variables used: MOVE, OPTION, DRPT$
*-------------------------------------------------------------------------*

          *** Call up the Screen for our program...
          SCREEN

          *** Go initialize the data we'll need to run this program...
          GOSUB INIT

*-------------------------------------------------------------------------*
*** The Branch/TR/All Input...
INBR:     INP.BR 17,3,50,BR,NAME,BRCHS,TERR.OK
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INBR,INBR,INBR,INBR
*-------------------------------------------------------------------------*
*** Start Date Input...
INSD:     INP SD,17,4,10,'VD4/'
          IF F12 THEN GOTO FINISH
          *** If there isn't already an End Date specified, we'll make it
          *** the same as our Start Date...
          IF ED = '' THEN
             ED = SD
             PRINT @(17,5):OCONV(ED,'D4/')
          END

          ON MOVE+1 GOTO INSD,INSD,INBR,INSD
*-------------------------------------------------------------------------*
*** End Date Input...
INED:     INP ED,17,5,10,'VD4/'
          IF F12 THEN GOTO FINISH

          ON MOVE+1 GOTO INED,INED,INSD,INED
*-------------------------------------------------------------------------*
INSLCT:   *** Re-load our Hotkeys and allow Input for the Select by Input..

          *** Go reload our hotkeys...
          SFIELD = ''
          GOSUB LOAD.HOTKEYS

          *** Select by Input...
IN$$1:    INP SLCT,17,6,20,V_'D:':SEL.LIST1

          IF F12 THEN GOTO FINISH

          IF SLCT = 'Product Select Code' THEN
             PRINT @(2,7):'Slct Code' "L#12"
          END ELSE
             PRINT @(2,7):SLCT        "L#12"
          END

          IF CHANGED THEN
             SLIST = ''
             PRINT @(17,7):SLIST      "L#50"
          END

          *** Refresh our Additional Select arrays...
          SEL.LIST2 = SEL.LIST
          SEL.VALD2 = SEL.VALD
          SEL.CONV2 = SEL.CONV
          FCODE2    = FCODE

          SMV = 0
          IF SLCT THEN
             LOCATE SLCT IN SEL.LIST1<1> SETTING SMV ELSE GOTO INSLCT

             *** Remove the Select by option from the Additional Select
             *** options list...
             LOCATE SLCT IN SEL.LIST2<1> SETTING DELPOS THEN
                SEL.LIST2 = DELETE(SEL.LIST2,1,DELPOS)
                SEL.CONV2 = DELETE(SEL.CONV2,1,DELPOS)
                SEL.VALD2 = DELETE(SEL.VALD2,1,DELPOS)
                FCODE2    = DELETE(FCODE2,1,DELPOS)
             END
          END

          *** Allow movement in the Screen based on whether a Select by
          *** option was chosen...
          IF SLCT THEN
             ON MOVE+1 GOTO INSLCT,INSLCT,INED,INSLCT
          END ELSE
             ON MOVE+1 GOTO INSLCT,INSLCT,INED,INSLCT,INSLCT2,INSLCT2
          END
*-------------------------------------------------------------------------*
INSLIST:  *** Re-load our Hotkeys and allow Input for Select by entities...

          *** Go reload our hotkeys...
          SFIELD = 'SLCT1'
          GOSUB LOAD.HOTKEYS

          *** Select by entity Input...
IN$$2:    INP TSLIST,17,7,50,SEL.CONV1<1,SMV>,V_SEL.VALD1<1,SMV>

          IF F12 THEN GOTO FINISH

          IF CHANGED THEN SLIST = TSLIST

          ON MOVE+1 GOTO INSLIST,INSLIST,INSLCT,INSLIST,INSLCT2,INSLCT2
*-------------------------------------------------------------------------*
INSLCT2:  *** Re-load our Hotkeys and allow Input for the Additional
          *** Select Input...

          *** Go load our hotkeys...
          SFIELD = ''
          GOSUB LOAD.HOTKEYS

          *** Additional Select Input...
IN$$3:    INP ADDL.SLCT,17,8,20,V_'D:':SEL.LIST2

          IF F12 THEN GOTO FINISH

          IF ADDL.SLCT = 'Product Select Code' THEN
             PRINT @(2,9):'Slct Code' "L#12"
          END ELSE
             PRINT @(2,9):ADDL.SLCT   "L#12"
          END

          IF CHANGED THEN
             SLIST2 = ''
             PRINT @(17,9):SLIST2     "L#50"
          END

          *** Refresh our Select by arrays...
          SEL.LIST1 = SEL.LIST
          SEL.VALD1 = SEL.VALD
          SEL.CONV1 = SEL.CONV
          FCODE1    = FCODE

          SMV2 = 0
          IF ADDL.SLCT THEN
             LOCATE ADDL.SLCT IN SEL.LIST2<1> SETTING SMV2 ELSE
                GOTO INSLCT2
             END

             *** Remove the Additional Select option from the Select by
             *** options list...
             LOCATE ADDL.SLCT IN SEL.LIST1<1> SETTING DELPOS THEN
                SEL.LIST1 = DELETE(SEL.LIST1,1,DELPOS)
                SEL.CONV1 = DELETE(SEL.CONV1,1,DELPOS)
                SEL.VALD1 = DELETE(SEL.VALD1,1,DELPOS)
                FCODE1    = DELETE(FCODE1,1,DELPOS)
             END
          END

          *** Allow movement in the Screen based on whether a Select by
          *** and/or an Additional Select option was chosen...
          BEGIN CASE
          CASE SLCT AND ADDL.SLCT
             ON MOVE+1 GOTO INSLCT2,INSLCT2,INSLIST,INSLCT2
          CASE SLCT
             ON MOVE+1 GOTO INSLCT2,INSLCT2,INSLIST,INSLCT2,INTYP,INTYP
          CASE ADDL.SLCT
             ON MOVE+1 GOTO INSLCT2,INSLCT2,INSLCT,INSLCT2
          CASE OTHERWISE
             ON MOVE+1 GOTO INSLCT2,INSLCT2,INSLCT,INSLCT2,INTYP,INTYP
          END CASE
*-------------------------------------------------------------------------*
INSLIST2: *** Re-load our Hotkeys and allow Input for Additional Select
          *** entities...

          *** Go reload our hotkeys...
          SFIELD = 'SLCT2'
          GOSUB LOAD.HOTKEYS

          *** Additional Select entity Input...
IN$$4:    INP TSLIST2,17,9,50,SEL.CONV2<1,SMV2>,V_SEL.VALD2<1,SMV2>

          IF F12 THEN GOTO FINISH

          IF CHANGED THEN SLIST2 = TSLIST2

          ON MOVE+1 GOTO INSLIST2,INSLIST2,INSLCT2,INSLIST2
*-------------------------------------------------------------------------*
INTYP:    *** Re-load our Hotkeys and allow Input for the Location
          *** Quantity Type...

          *** Go reload our hotkeys...
          SFIELD = ''
          GOSUB LOAD.HOTKEYS

          *** Qty Type Input...
IN$$5:    INP TYP,17,10,11,V_VALID.LTYPS

          IF F12 THEN GOTO FINISH

          IF ADDL.SLCT THEN
             ON MOVE+1 GOTO INTYP,INTYP,INSLIST2,INTYP
          END ELSE
             ON MOVE+1 GOTO INTYP,INTYP,INSLCT2,INTYP
          END
*-------------------------------------------------------------------------*
*** limit the report to a specific product status code...
INSTAT:   INP TSTAT,17,11,15,V_"D:":PRD.STAT:VM:'ALL'
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INSTAT,INSTAT,INTYP,INSTAT,INSORT,INSORT
*-------------------------------------------------------------------------*
*** Specify how you want to sort the report...
INSORT:   INP SORTBY,17,12,26,V_VALID.SORTBY
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INSORT,INSORT,INSTAT,INSORT,INPGBRK,INPGBRK
*-------------------------------------------------------------------------*
*** Page break Y/N Input...
INPGBRK:  INP PG.BRK,57,12,3,V_'D:Yes':VM:'No'
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INPGBRK,INPGBRK,INSORT,INPGBRK,INSBR,INSBR
*-------------------------------------------------------------------------*
*** Specify the Branch Type you want to run the report for
INSBR:    INP SBR,19,13,8,V_'D:Pricing':VM:'Shipping'
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INSBR,INSBR,INPGBRK,INSBR,INBS,INBS
*-------------------------------------------------------------------------*
*** Sepcifiy the Customer Type you want to display data for
INBS:     INP LEVEL,19,14,7,V_'D:,Bill-To,Ship-To,Parent'
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INBS,INBS,INSBR,INBS,INOPT,INOPT
*-------------------------------------------------------------------------*
*** Detail/Summary Input...
INOPT:    INP OPT,19,15,7,V_'D:Summary':VM:'Detail'
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INOPT,INOPT,INBS,INOPT,INSNS,INSNS
*-------------------------------------------------------------------------*
*** Print serial numbers on report...
INSNS:    INP SHOW.SNS,27,16,1,V_'D:,A - All,I - Inbound,N - None'
          IF F12 THEN GOTO FINISH
          ON MOVE+1 GOTO INSNS,INSNS,INOPT,INSNS,INCOSTS,INCOSTS
*-------------------------------------------------------------------------*
*** Indicate whether or not to show costs in the report...
INCOSTS:  INP COSTS,27,17,4,V_'D:Yes':VM:'No':VM:'Only'
          IF F12 THEN GOTO FINISH
          IF COSTS = '' THEN GOTO INCOSTS
          ON MOVE+1 GOTO INCOSTS,INCOSTS,INSNS,INCOSTS,INKITS,INKITS
*-------------------------------------------------------------------------*
*** Indicate whether or not to show Kit Components on the report...
INKITS:   INP KIT.COMPS,39,18,4,V_'D:Yes':VM:'No':VM:'Only'
          IF F12 THEN GOTO FINISH
          IF KIT.COMPS = '' THEN GOTO INKITS
          ON MOVE+1 GOTO INKITS,INKITS,INCOSTS,INKITS,INKITS,INKITS
*-------------------------------------------------------------------------*
SUBS:     ON OPTION GOTO DOIT,DOIT,DOIT,FSEL,STATUS,INC.EXC,MULTI
*-------------------------------------------------------------------------*
FSEL:     *** Additional Select Criteria Input Window...
          FILTER.INPUT "S",FITEM
          RETURN
*-------------------------------------------------------------------------*
MULTI:    *** This is a window for inputting Multiple Selections for
          *** either the 'Select by' entity or the 'Additional Select'
          *** entity...

          *** Determine which entity Select we're allowing the multiple
          *** selection for...
          IF SFIELD = 'SLCT1' THEN
             MSLCT  = SLCT
             MLIST  = SLIST
             MVALID = SEL.VALD1<1,SMV>
             MCONV  = SEL.CONV1<1,SMV>
             MFCODE = FCODE1<1,SMV>
          END ELSE
             MSLCT  = ADDL.SLCT
             MLIST  = SLIST2
             MVALID = SEL.VALD2<1,SMV2>
             MCONV  = SEL.CONV2<1,SMV2>
             MFCODE = FCODE2<1,SMV2>
          END

          BEGIN CASE
          CASE MSLCT = 'Price Line'
             PHYS.PLINE.SELECT MLIST
          CASE MSLCT = 'Buy Line'
             PHYS.BLINE.SELECT MLIST
          CASE OTHERWISE
             MTITLE = 'Multiple ':MSLCT
IN$$6:       INP.MULTI MLIST,99,'L',MVALID,MCONV,MTITLE,MFCODE
          END CASE

          IF DCOUNT(MLIST,VM) > 1 THEN
             MSLIST = '*Multi*'
          END ELSE
             ** Needed to allow product desc to show in input field
             ** Also allows the user to advance to the next input field
             IF MSLCT = 'Product' THEN
                READV TSLIST FROM PRDFILE,MLIST,1 ELSE TSLIST = MLIST
                MSLIST = TSLIST
             END ELSE
                MSLIST = MLIST
             END
          END

          *** Store what was entered in the Multiple Selection window and
          *** then set our position for where these results should be
          *** redisplayed in the report driver...
          IF SFIELD = 'SLCT1' THEN
             SLIST     = MLIST
             PRINT.POS = 7
          END ELSE
             SLIST2    = MLIST
             PRINT.POS = 9
          END

          *** Print out the results...
          PRINT @(17,PRINT.POS):MSLIST "L#50"

          RETURN
*-------------------------------------------------------------------------*
STATUS:   *** Product Status Input...

          IF TSTAT = 'ALL' THEN
             STAT  = PRD.STAT
          END ELSE
             IF TSTAT # '*Multi*' THEN STAT = TSTAT
          END

IN$$7:    INP.MULTI STAT,20,'L',"C:PROD.STATUS",,'Product Status'

          IF DCOUNT(STAT,VM)>1 THEN
             IF DCOUNT(STAT,VM) = DCOUNT(PRD.STAT,VM) THEN
                TSTAT = 'ALL'
             END ELSE
                TSTAT = '*Multi*'
             END
          END ELSE
             TSTAT = STAT
          END

          PRINT @(17,11):TSTAT "L#15"

          RETURN
*-------------------------------------------------------------------------*
INC.EXC:  *** Include/Exclude Input window...
          INC.EXC.INP INC.STOCK,INC.TRANS,INC.CREDS,INC.DIRS,INC.VCSN,INC.CCSN,INC.VENCUST,VCSN,CCSN
          RETURN
*-------------------------------------------------------------------------*
DOIT:     *** Validate the Inputs and the Phantom for our Report...

*** Validate the Inputs...

          *** Validate the Start and End Dates...
          REQ.FLDS = ''
          IF NUM(SD) AND NUM(ED) THEN
             *** If they haven't entered an End Date...
             IF ED + 0 < 1 THEN
                REQ.FLDS<-1> = 'End Date'
             END ELSE
                IF SD > ED THEN
                   ERR.MESS 4,1,BELL:' Start Date must be before End Date'
                   RETURN TO INSD
                END
             END

             *** If they haven't entered a Start Date...
             IF SD + 0 < 1 THEN REQ.FLDS<-1> = 'Start Date'
          END

          IF TSTAT = '' THEN REQ.FLDS<-1> = 'Status'
          IF LEVEL = '' THEN REQ.FLDS<-1> = 'Customer Level'

          *** If any required fields are missing, warn the User and send
          *** them back...
          IF REQ.FLDS # '' THEN
             ERR.MESS 8,3,BELL:'Missing Required Field(s):  ':AM:REQ.FLDS
IN$$8:       INPNO A,,,0

             BEGIN CASE
             CASE REQ.FLDS<1> = 'Start Date'         ;RETURN TO INSD
             CASE REQ.FLDS<1> = 'End Date'           ;RETURN TO INED
             CASE REQ.FLDS<1> = 'Status'             ;RETURN TO INSTAT
             CASE REQ.FLDS<1> = 'Customer Level'     ;RETURN TO INBS
             END CASE
          END

          *** Set up some MV lists to handle multiple parameters...
          INC.ITEMS      = ''
          INC.ITEMS<1,1> = INC.STOCK    ;* Stock
          INC.ITEMS<1,2> = INC.TRANS    ;* Transfers
          INC.ITEMS<1,3> = INC.CREDS    ;* Credits
          INC.ITEMS<1,4> = INC.DIRS     ;* Directs
          INC.ITEMS<1,5> = INC.VCSN     ;* Vendor Consignment
          INC.ITEMS<1,6> = INC.CCSN     ;* Customer Consigment
          INC.ITEMS<1,7> = INC.VENCUST  ;* Vendor to Customer Consignment
          INC.ITEMS<1,8> = VCSN         ;* Vendor ID
          INC.ITEMS<1,9> = CCSN         ;* Customer ID

          COST.TYPE = ''
          IF OPTION < 3 THEN
             *** Set the Cost Type to show on the report...
             IF COSTS # 'No' THEN
                PH.COST.AUTH.CHECK COST.TYPE
                IF F12 THEN RETURN
                IF COST.TYPE = '' THEN RETURN
             END ELSE
                *** If they don't want to 'Show Costs' then
                *** set our our Cost Type to 3 (None)...
                COST.TYPE = 3
             END

             IF TSTAT = 'ALL' THEN
                STAT = PRD.STAT
             END ELSE
                IF TSTAT # '*Multi*' THEN STAT = TSTAT
             END
             PRD.STAT = RAISE(PRD.STAT)
             FOR J = 1 TO DCOUNT(STAT,VM)
                LOCATE STAT<1,J> IN PRD.STAT SETTING NUM ELSE NUM = 0
                STAT<1,J> = NUM
             NEXT J

             * Save user screen data
             UOPTS       = ''
             IF NOT(NUM(SD)) THEN UOPTS<1,1> = SD
             IF NOT(NUM(ED)) THEN UOPTS<1,2> = ED
             UOPTS<1,3>  = SORTBY
             UOPTS<1,4>  = SBR
             UOPTS<1,5>  = LEVEL
             UOPTS<1,6>  = OPT
             UOPTS<1,7>  = SHOW.SNS
             UOPTS<1,8>  = COSTS
             UOPTS<1,9>  = KIT.COMPS
             SET.SCREEN.INFO 'SLS.DVR.PROD.SUM','OPTS',UOPTS
             SET.SCREEN.INFO 'SLS.DVR.PROD.SUM','INC.ITEMS',INC.ITEMS
          END

          COSTS        = COSTS[1,1]
          OPT          = OPT:VM:PG.BRK
          SORT.LVL     = SORTBY:VM:LEVEL
          COST.DATA    = COST.TYPE:VM:COSTS
          INCLUDE.DATA = INC.ITEMS:'~':SHOW.SNS:'~':KIT.COMPS
          SELECT1      = SLCT:VM:SLIST
          SELECT2      = ADDL.SLCT:VM:SLIST2

          * Run the Phantom for this report...
          PH.EXE 'SLS.PHR.PROD.SUM.TEST',BRCHS,BR,SD,ED,SELECT1,SELECT2,TYP,SORT.LVL,COST.DATA,OPT,STAT,FITEM,SBR,INCLUDE.DATA

          IF F12 THEN RETURN

          RETURN TO FINISH
*-------------------------------------------------------------------------*
INIT:     *** Initialize the data we'll need to run this program...

          DRPT$     = 'Product Sales Report'
          BR        = ''
          BRCHS     = ''
          TYP       = ''
          PG.BRK    = 'No'
          TERR.OK   = YES
          SFIELD    = ''
          SLCT      = ''
          SLIST     = ''
          TSLIST    = ''
          ADDL.SLCT = ''
          SLIST2    = ''
          TSLIST2   = ''
          MLIST     = ''
          MSLCT     = ''
          MSLIST    = ''
          FITEM     = ''

          READ PRD.STAT FROM CTRLFILE, 'PROD.STATUS' ELSE PRD.STAT = ''
          STAT  = PRD.STAT
          TSTAT = 'ALL'

          * Set up field validation lists.
          VALID.SORTBY  = 'D:,Customer,Product,Writer,In Salesperson,'
          VALID.SORTBY := 'Out Salesperson,Zip Code,3 Digit Zip,'
          VALID.SORTBY := 'Select Code,Product Select Code,Buy Line,'
          VALID.SORTBY := 'Line (Price),State,Branch,Branch by Price Line,'
          VALID.SORTBY := 'Cust PO#,Customer by Budget Group,'
          VALID.SORTBY := 'Commodity Code,Customer by Commodity Code,'
          VALID.SORTBY := 'Sales Order Picker,Buy Group,Sell Group,'
          VALID.SORTBY := 'Customer by Sell Group,Customer by Product'

          VALID.LTYPS   = '*1D:,S - Stock,O - Over Shipment,F - DeFective,'
          VALID.LTYPS  := 'R - Review,L - DispLay,T - Tagged'

          * Build arrays for the Select By and Add'l Select options.
          SEL.LIST      = 'Price Line'
          SEL.VALD      = 'PRICE.LINE'
          SEL.CONV      = ''
          FCODE         = ''

          SEL.LIST<1,2> = 'Sell Group'
          SEL.VALD<1,2> = 'PRICE-GRP,1'

          SEL.LIST<1,3> = 'Buy Line'
          SEL.VALD<1,3> = 'BUY.LINE'

          SEL.LIST<1,4> = 'Buy Group'
          SEL.VALD<1,4> = 'PRICE-GRP,1'

          SEL.LIST<1,5> = 'Product'
          SEL.VALD<1,5> = 'S:VERF.PRD.ID'
          SEL.CONV<1,5> = 'TPRODUCT;X;1;1'
          FCODE<1,5>    = 'PNLIST'

          SEL.LIST<1,6> = 'Product Select Code'
          SEL.VALD<1,6> = 'C:VALID.PRD.SELECT'
          FCODE<1,6>    = 'SCD'

          SEL.LIST<1,7> = 'Amer Std Category'
          SEL.VALD<1,7> = 'PRODUCT,200'

          SEL.LIST<1,8> = 'Amer Std Family'
          SEL.VALD<1,8> = 'PRODUCT,201'

          SEL.LIST<1,9> = 'Amer Std Description'
          SEL.VALD<1,9> = 'PRODUCT,202'

          * Load the Select, Validation and Conversion lists for the
          * first Select by.
          SEL.LIST1 = SEL.LIST
          SEL.VALD1 = SEL.VALD
          SEL.CONV1 = SEL.CONV
          FCODE1    = FCODE

          * Load the Select, Validation and Conversion lists for the
          * Additional Select.
          SEL.LIST2 = SEL.LIST
          SEL.VALD2 = SEL.VALD
          SEL.CONV2 = SEL.CONV
          FCODE2    = FCODE

          * Get users last options
          GET.SCREEN.INFO 'SLS.DVR.PROD.SUM','OPTS',UOPTS
          IF UOPTS THEN
             SD        = UOPTS<1,1>
             ED        = UOPTS<1,2>
             SORTBY    = UOPTS<1,3>
             SBR       = UOPTS<1,4>
             LEVEL     = UOPTS<1,5>
             OPT       = UOPTS<1,6>
             SHOW.SNS  = UOPTS<1,7>
             COSTS     = UOPTS<1,8>
             KIT.COMPS = UOPTS<1,9>
          END ELSE
             SD        = ''
             ED        = ''
             SORTBY    = 'Customer'
             SBR       = 'Pricing'
             LEVEL     = 'Ship-To'
             OPT       = 'Detail'
             SHOW.SNS  = 'N'
             COSTS     = 'Yes'
             KIT.COMPS = 'No'
          END

          GET.SCREEN.INFO 'SLS.DVR.PROD.SUM','INC.ITEMS',INC.ITEMS
          IF INC.ITEMS THEN
             INC.STOCK   = INC.ITEMS<1,1>;* Stock/Non-Stock
             INC.TRANS   = INC.ITEMS<1,2>;* Transfers
             INC.CREDS   = INC.ITEMS<1,3>;* Credits
             INC.DIRS    = INC.ITEMS<1,4>;* Directs
             INC.VCSN    = INC.ITEMS<1,5>;* Vendor Consignment
             INC.CCSN    = INC.ITEMS<1,6>;* Customer Consigment
             INC.VENCUST = INC.ITEMS<1,7>;* Vendor to Customer Consignment
             VCSN        = INC.ITEMS<1,8>;* Vendor ID
             CCSN        = INC.ITEMS<1,9>;* Customer ID
          END ELSE
             INC.STOCK   = 'Include'     ;* Stock/Non-Stock
             INC.TRANS   = 'Exclude'     ;* Transfers
             INC.CREDS   = 'Include'     ;* Credits
             INC.DIRS    = 'Include'     ;* Directs
             INC.VCSN    = 'Include'     ;* Vendor Consignment
             INC.CCSN    = 'Include'     ;* Customer Consigment
             INC.VENCUST = 'Include'     ;* Vendor to Customer Consignment
             VCSN        = ''            ;* Vendor ID
             CCSN        = ''            ;* Customer ID
          END

          IF DCOUNT(STAT,VM) > 1 THEN
             IF DCOUNT(STAT,VM) = DCOUNT(PRD.STAT,VM) THEN
                TSTAT = 'ALL'
             END ELSE
                TSTAT = '*Multi*'
             END
          END ELSE
             TSTAT = STAT
          END

          PRINT @(64,0):REV$:"Save":NORM$:
          PRINT @(17,4) :OCONV(SD,'D4/')  "L#10"
          PRINT @(17,5) :OCONV(ED,'D4/')  "L#10"
          PRINT @(17,11):TSTAT            "L#15"
          PRINT @(17,12):SORTBY           "L#26"
          PRINT @(57,12):PG.BRK           "L#4"
          PRINT @(19,13):SBR              "L#10"
          PRINT @(19,14):LEVEL            "L#10"
          PRINT @(19,15):OPT              "L#10"
          PRINT @(27,16):SHOW.SNS         "L#4"
          PRINT @(27,17):COSTS            "L#4"
          PRINT @(39,18):KIT.COMPS        "L#4"

          GOSUB LOAD.HOTKEYS

          RETURN
*-------------------------------------------------------------------------*
LOAD.HOTKEYS: *** Load the Hotkeys...

          *** Always need to clear the menu out first...
          MENU.CLEAR

          MENU.LOAD  2,20,5,1,'P'
          MENU.LOAD 10,20,4,1,'H'
          MENU.LOAD 17,20,4,1,'O'
          MENU.LOAD 24,20,4,1,'S'
          MENU.LOAD 31,20,6,2,'T'
          MENU.LOAD 40,20,7,1,'I'
          *** Determine whether the Multi Hotkey should be active...
          BEGIN CASE
          CASE SFIELD = 'SLCT1' AND SLCT
             MENU.LOAD 50,20,5,1,'M'
          CASE SFIELD = 'SLCT2' AND ADDL.SLCT
             MENU.LOAD 50,20,5,1,'M'
          CASE OTHERWISE
             MENU.LOAD ,,,,
          END CASE

          RETURN
*-------------------------------------------------------------------------*
FINISH:   *** Close our report Driver and exit the program..
          WINDOW.CLOSE
          RETURN
*-------------------------------------------------------------------------*
!SMITJR~02/18/10~17:05
