def fClear_Filter():
#---------------------------------------------------#

    # selection
    click("selection_button.png")
    time.sleep(1)
    # clear
    myTools.clickRemoveAll()
    # OK    
    type(Key.ENTER)
    time.sleep(1)
    # Update
    myTools.pressTAB(1)
    type(Key.ENTER)
    myTools.waitForTransList()    
def fFilter_Invoices():
#---------------------------------------------------#

    # selection
    logging.debug('- filters')
    click("selection_button.png")
    time.sleep(1)

    # clear any existing filters
    myTools.clickRemoveAll()

    # add tran type filter
    click("trans_type.png")
    time.sleep(1)
    click("add_filter-1.png")
    time.sleep(1)
    
    # unselect all
    type(Key.DELETE)
    
    # select invoice
    myTools.pressDOWN(5)    
    type(Key.F4)
    time.sleep(1)
    
    # OK
    myTools.pressTAB(1)
    type(Key.ENTER)
    time.sleep(1)
    
    # OK    
    type(Key.ENTER)
    time.sleep(1)
    
    # Update
    myTools.pressTAB(1)
    type(Key.ENTER)
    myTools.waitForTransList()    
def setupCustomSort():
#---------------------------------------------------#
    """ sets up custom sort Activity List; only used by fPrint_PreBill_2 """

    logging.debug('- setupCustomSort')

    # switch to the Sort page
    myTools.pressF6(1)
    time.sleep(1)

    # remove sorts
    myTools.clickRemoveAll()

    # switch to the activity group
    myTools.pressSHIFTTAB(1)
    type("a")
    time.sleep(1)

    # choose Activity List
    myTools.pressTAB(1)
    myTools.pressDOWN(7)
    click("add_filter.png")
    time.sleep(1)                
def Print_PayDistr(pReportMonth,pRepExt):
#---------------------------------------------------#

    myTools.sectionStartTimeStamp("print pay dist")

    # name report file: ex: PayDistr-03
    reportName = myTools.buildRepName("PayDistr",pRepExt)
    logging.debug('Print_PayDistr: ' + reportName)

    # make sure timeslips has focus
    myTools.getFocus()

    logging.debug('- open report')
    type("r",KeyModifier.ALT)
    type("a")
    time.sleep(2)
    
    type("pay")
    time.sleep(1)
    
    type("o",KeyModifier.CTRL)
    time.sleep(1)

    logging.debug('- default options')

    # options button
    myTools.pressSHIFTTAB(4)
    type(Key.ENTER)
    time.sleep(1)
    
    # default button   
    myTools.pressSHIFTTAB(4)
    type(Key.ENTER)
    time.sleep(1)

    # pay dist = with tax
    myTools.pressSHIFTTAB(3)
    type("w")
    
    # OK
    type(Key.ENTER)
    time.sleep(1)

    # on Selection page, clear any existing filters
    myTools.clickRemoveAll()

    # Sort page
    type(Key.F6)
    time.sleep(1)

    # clear any existing sorts
    myTools.clickRemoveAll()

    # sort by tran id
    type(Key.DOWN)
    time.sleep(1)
    click("add_filter.png")
    time.sleep(1)

    logging.debug('- print report')

    # move to Print To and choose CSV
    myTools.pressSHIFTTAB(3)
    type("c")
    time.sleep(1)

    # print the report
    type(Key.ENTER)    
    time.sleep(1)

    myTools.finishReport(reportName)