コード例 #1
0
def fBill_BillFields():
#---------------------------------------------------#

    myTools.sectionStartTimeStamp("bill fields")
    logging.debug("fBill_BillFields")    

    buName = Settings.tsVersion + "-bill-12b"
    backup_Data.fRestore_Backup(buName)

    reportName = "BillFields-13-" + Settings.tsVersion + ".txt"

    myTools.getFocus()                                # make sure timeslips has focus

    if int(Settings.tsVersion) < 2016:                # to get around a defect in pre-2016
        type("i",KeyModifier.CTRL)                    # open client info and close it to load custom fields
        time.sleep(1)
        type("o",KeyModifier.CTRL)
        time.sleep(1)
        type(Key.F4,KeyModifier.CTRL)
        time.sleep(1)
        type(Key.F4,KeyModifier.CTRL)
    
    bill_ImportLayout.fImport_BillLayout("Fields")    # import the layout    
    fSet_BillDate(12)                                 # set billing data to 12/27 for text bills 
    fPrint_BillsToText(reportName)                    # print all bills to one text file
    reports_Compare.Compare_OneReport(reportName)

    myTools.sectionEndTimeStamp()
コード例 #2
0
ファイル: ba__Common.py プロジェクト: gh-tomhinds/Test_It_All
def fRestore_BABackup():
    # ---------------------------------------------------#
    """
    restores a backup to test billing arrangements starting with no clients
    """

    ba_backup = Settings.tsVersion + "-" + "BA-00"
    backup_Data.fRestore_Backup(ba_backup)
コード例 #3
0
def fPrint_PreBill_2(pReportMonth,pRepExt,pAorB):
#---------------------------------------------------#
    """ 
    print pre-bill 2
    - uses setupCustomFilter for filters
    - uses setupCustomSort for sorts
    - setupCustomOptions for options
    - restore if prior to TS2016
    """

    myTools.sectionStartTimeStamp("print PreBill 2")

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

    # make sure timeslips has focus
    myTools.getFocus()

    logging.debug('- open worksheet')
    type("b",KeyModifier.ALT)
    type("p")    
    time.sleep(1)

    setupCustomOptions()
    setupCustomFilter()
    setupCustomSort()

    # choose text
    myTools.pressSHIFTTAB(3)
    type("t")
    time.sleep(1)

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

    myTools.finishReport(reportName)

    # RESTORE if version is prior to TS2016 (defect regarding recurring slips)
    if int(Settings.tsVersion) < 2016:
        buName = Settings.tsVersion + "-bill-" + str(myTools.padZero(pReportMonth)) + pAorB            
        backup_Data.fRestore_Backup(buName)