示例#1
0
def fPrint_BABill(pBAClient, pBillNum):
    # ---------------------------------------------------#
    """
    backs up the database ("-before")
    prints the bill to text file
    approves the bill
    backs up the database ("-after")
    """

    baBillName = pBAClient + str(pBillNum)
    backup_Data.fBackup_Checkpoint(baBillName + "-before")

    myTools.sectionStartTimeStamp("ba bill")
    logging.debug("BA_Bill: " + baBillName)

    type("b", KeyModifier.CTRL)
    time.sleep(1)
    click("remove_filters.png")
    time.sleep(1)
    type(Key.ENTER)
    type(Key.DOWN)
    type(Key.TAB)
    type(Key.SPACE)
    type(pBAClient)
    time.sleep(1)
    type(Key.F4)
    type(Key.ENTER)

    myTools.pressSHIFTTAB(3)

    type("t")
    type(Key.ENTER)
    time.sleep(1)
    type(Settings.repFolder + "\\" + baBillName + ".txt")

    #    for checkmark in findAll("checkmark.png"):
    #        click(checkmark)

    time.sleep(1)
    type(Key.ENTER)
    time.sleep(1)

    if exists("replace_msg.png"):
        type(Key.ENTER)
        time.sleep(1)

    wait("approve_bill.png", FOREVER)
    click("approve_bill.png")
    type(Key.ENTER)
    time.sleep(1)

    if exists("select_report_to_print.png"):
        type(Key.ESC)

    type(Key.F4, KeyModifier.CTRL)
    time.sleep(1)
    type("n")

    myTools.sectionEndTimeStamp()
    backup_Data.fBackup_Checkpoint(baBillName + "-after")
def fEnter_Transactions(transMonth):
#---------------------------------------------------#

    myTools.checkProcesses()

    # enter transactions for month

    trans_SpecCredits.fCreate_SpecCredits(transMonth)
    trans_Writeoff.fCreate_Writeoffs(transMonth)
    trans_ReversePay.fCreate_RevPays(transMonth)
    trans_Discounts.fCreate_Discounts(transMonth)
    trans_Payments.fCreate_PaymentsForMonth(transMonth)
    backup_Data.fBackup_Checkpoint("payments")    
    trans_Transfers.fCreate_Transfers(transMonth)
    trans_TransfersToFunds.fCreate_TransfersToFunds(transMonth)
    backup_Data.fBackup_Checkpoint("transfers")
        
    trans_Refunds.fCreate_Refunds(transMonth)        
    trans_PaymentsToAccount.fCreate_PaymentsToAccount(transMonth)
    backup_Data.fBackup_Checkpoint("pta")
    trans_Credits.fCreate_CreditsForMonth(transMonth)
    backup_Data.fBackup_Checkpoint("credits")
    client_FinanceCharges.fCreate_FinanceCharges(transMonth)        
    backup_Data.fBackup_Checkpoint("finchar")
    
    trans_BankDepositSlip.fBankDepositSlips_Create(transMonth)
def fSetup_SplitBills():
#---------------------------------------------------#

    myTools.sectionStartTimeStamp("setup split")
    logging.debug('- set up split bills')

    myTools.getFocus()

    # open split billing rule list
    type("b",KeyModifier.ALT)
    time.sleep(1)
    type("i")
    time.sleep(1)

    fSetup_Primary("Beverly")

    # new secondary
    myTools.pressTAB(7)   
    fSetup_Secondary("Peabody",15)
    fSetup_Secondary("Saugus",20)

    # done
    myTools.pressTAB(4)
    type(Key.SPACE)

    myTools.sectionEndTimeStamp()
    backup_Data.fBackup_Checkpoint("split")    
示例#4
0
def fStartTS_CreateNewDB():
#---------------------------------------------------#
    """
    main driver
    - calls fDelete_DataFolder, fStart_TS, fCheckFor_PEP, 
    - calls fEnter_NewDBWizard, fEnter_GeneralSettings, fEnter_GettingStartedWizard
    - makes backup "-new"
    """    

    myTools.sectionStartTimeStamp("new db")    
    logging.debug('StartTS_CreateNewDB')

    popup("make sure Timeslips is closed")

    fDelete_DataFolder()
    fStart_TS()
    fCheckFor_PEP()
    fEnter_NewDBWizard()
    fEnter_GeneralSettings()
    fEnter_GettingStartedWizard()

# backup
    time.sleep(1)
    if exists("backup_database.png"):
        click("no_btn.png")
        time.sleep(1)
        type("n")

    fCheckFor_BillingDate()
    fCheckFor_SPS()
    fCheckFor_PEP()  
    
    myTools.sectionEndTimeStamp()
    backup_Data.fBackup_Checkpoint("new")
def fCalendar_Entries():
# - - - - - - - - - - - - - - - - - - - - - - - - - #

    logging.debug(' ')
    logging.debug('Calendar_Stuff')

    type("l", KeyModifier.ALT)
    type(Key.ENTER)
    time.sleep(1)     
    fProcess_CalEntries()
    backup_Data.fBackup_Checkpoint("cal")

    
def fSetup_TAL():
#---------------------------------------------------#

    myTools.sectionStartTimeStamp("setup tal")
    logging.debug('fSetup_TAL')

    # make sure timeslips has focus
    myTools.getFocus()

    fSetup_ChooseTAL()
    fSetup_LinkDetails()
    fLink_Accounts()
    fSetup_LinkDetailsUnmarkWIP()

    myTools.sectionEndTimeStamp()

    backup_Data.fBackup_Checkpoint("TAL")    
示例#7
0
def fReview_Arrangements():
#===================================================#

    logging.debug(' ')
    logging.debug('Review_Arrangements')

    fLogHeader()

    # make sure timeslips has focus
    myTools.getFocus()
    
    # set billing data to 12/27 for ba bills
    fSet_BillDate(12)

    ba_AdjustTotal_Time.fAdjustTotal_Time()
    ba_AdjustTotal_Exp.fAdjustTotal_Exp()
    ba_AdjustTotal_Both.fAdjustTotal_Both()
    
    ba_AdjustTimekeeper_Time.fAdjustTimekeeper_Time()
    ba_AdjustTimekeeper_Exp.fAdjustTimekeeper_Exp()
    ba_AdjustTimekeeper_Both.fAdjustTimekeeper_Both()

    ba_AdjustTask.fAdjustTask()
    ba_AdjustExpense.fAdjustExpense()

    ba_Absolute_Time.fAbsolute_Time()
    ba_Absolute_Exp.fAbsolute_Exp()
    ba_Absolute_Both.fAbsolute_Both()

    ba_Absolute_NoSlips.fAbsolute_NoSlips()

    ba_Minimum_Time.fMinimum_Time()
    ba_Minimum_Exp.fMinimum_Exp()
    ba_Minimum_Both.fMinimum_Both()
    
    ba_Maximum_Time.fMaximum_Time()
    ba_Maximum_Exp.fMaximum_Exp()
    ba_Maximum_Both.fMaximum_Both()

    ba_FlatFeePlus_Time.fFlatFeePlus_Time()
    ba_FlatFeePlus_Exp.fFlatFeePlus_Exp()
    ba_FlatFeePlus_Both.fFlatFeePlus_Both()

    ba_Contingency_Time.fContingency_Time()
    ba_Contingency_Exp.fContingency_Exp()
    ba_Contingency_Both.fContingency_Both()

    ba_MinimumHours.fMinimumHours()

    ba_Percent.fPercent()

    ba_ProgressTotal.fProgressTotal()
    ba_ProgressActivity.fProgressActivity()    
    ba_InterimTotal.fInterimTotal()    
    ba_InterimActivity.fInterimActivity()    

    ba_SlipsRoundMin.fSlipsRoundMin()
    ba_SlipsRoundDol.fSlipsRoundDol()
    ba_Precision.fPrecision()

    ba_Replacement_Time.fReplaceTimeA()
    ba_Replacement_Time.fReplaceTimeB()
    ba_Replacement_Time.fReplaceTimeC()
    ba_Replacement_Expense.fReplaceExpenseA()    

    backup_Data.fBackup_Checkpoint("after-ba")

    reports_PostBill.fPrint_PostbillReports(13,"a")
示例#8
0
def fCreateImportEdit_Names():
#---------------------------------------------------#
 
#    editDefaultClient.Edit_DefaultClient()

#---------------------------------------------------#

    timekeeper_Import.fImport_Timekeepers()
    timekeeper_Edit.fEdit_Timekeeper()
    backup_Data.fBackup_Checkpoint("timekeepers")

    task_Create.fCreate_Task()
    task_Import.fImport_Tasks()
    task_Edit.fEdit_Task()
    backup_Data.fBackup_Checkpoint("tasks")    

    expense_Create.fCreate_Expense()
    expense_Import.fImport_Expenses()
    expense_Edit.fEdit_Expense()
    expense_Markup.fSetup_ExpMarkups()    
    backup_Data.fBackup_Checkpoint("expenses")

    client_Create.fCreate_Client("ZZZlient","Client001","9999 - First Client","In Ref to","Client Notes")   
    client_Import.fImport_Clients()
    backup_Data.fBackup_Checkpoint("clients-import")
    
    client_Edit.fEdit_Client()    
    client_FundsEdit.fEdit_ClientFunds()
    backup_Data.fBackup_Checkpoint("client-funds")
    
    report_FundsAccountList.fPrint_Funds("FundsSettings-01" + ".csv")
    
    client_Hold.fSetup_ClientHold()
    client_FeeAlloc.fSetup_FeeAlloc()
    taxes_Setup.fSetup_Taxes()
    backup_Data.fBackup_Checkpoint("client-taxes")

    client_PayDistrib.fSetup_PayDist()
    backup_Data.fBackup_Checkpoint("pay-dist")

    client_FundsNew.fFundsAccouts_Setup()
    backup_Data.fBackup_Checkpoint("fundsaccts")

    ref_Create.fCreate_Refs()
    ref_Import.fImport_Refs()
    backup_Data.fBackup_Checkpoint("refs")

    budget_Setup.fBudget_Setup()

#    report_TimekeeperInfo.fPrint_TimekeeperInfo("Timekeepers-01" + Settings.tsVersion + ".csv")
#    report_ClientInfo.fPrint_ClientInfo("Clients-01-" + Settings.tsVersion + ".csv")

    backup_Data.fBackup_Checkpoint("names")
示例#9
0
def Create_Slips(tmslips,exslips):
#---------------------------------------------------#

    myTools.sectionStartTimeStamp("init names")
    logging.debug('Init Names')    

    clients = names_Init.fInit_Clients()
    timekeepers = names_Init.fInit_Timekeepers()
    tasks = names_Init.fInit_Tasks()
    expenses = names_Init.fInit_Expensess()
    count = 0
    myTools.sectionEndTimeStamp()

    myTools.sectionStartTimeStamp("create time slips")
    Open_SlipList()    

    for slip in range(tmslips):
        Create_OneSlip("t",timekeepers[count%len(timekeepers)],tasks[count%len(tasks)],clients[count%len(clients)],count+1)
        count += 1
    Close_SlipUI()

    Import_TimeSlips()

    myTools.sectionStartTimeStamp("create expense slips")
    # increase count to account for imported slips
    count += 692

    Open_SlipList()    
    Open_LastSlip()

    for slip in range(exslips):
        Create_OneSlip("e",timekeepers[count%len(timekeepers)],expenses[count%len(expenses)],clients[count%len(clients)],count+1)
        count += 1        
    Close_SlipUI()

    Import_ExpenseSlips()

#---------------------------------------------------#
# remove this later
#
#    myTools.sectionStartTimeStamp("create time slips")
#    Open_SlipList()    
#    Open_LastSlip()
#
#    for slip in range(tmslips):
#        Create_OneSlip("t",timekeepers[count%len(timekeepers)],tasks[count%len(tasks)],clients[count%len(clients)],count+1)
#        count += 1
#    Close_SlipUI()
#
#    myTools.sectionStartTimeStamp("create expense slips")
#    Open_SlipList()
#    Open_LastSlip()
#    
#    for slip in range(exslips):
#        Create_OneSlip("e",timekeepers[count%len(timekeepers)],expenses[count%len(expenses)],clients[count%len(clients)],count+1)
#        count += 1        
#    Close_SlipUI()

#---------------------------------------------------#

    backup_Data.fBackup_Checkpoint("slips")
示例#10
0
def fStartTS_CreateNewDB():
#---------------------------------------------------#

    myTools.sectionStartTimeStamp("new db")
    
    logging.debug('StartTS_CreateNewDB')

    popup("make sure Timeslips is closed")

    fDelete_DataFolder()
    fStart_TS()
    fCheckFor_PEP()

# start the new db process
    logging.debug('- Check for database')
    time.sleep(3)

    if exists("database_not_found.png"):
        logging.debug('-- TS2014 db not found')
        type(Key.ENTER)
        time.sleep(2)
        type("n")
    elif exists("fb_encountered_error.png"):
        logging.debug('-- TS2016 db not found')
        type(Key.ENTER)
        time.sleep(2)
        type("n")
    else:
        logging.debug('-- db found')
        if exists("supervisor.png"):
            type(Key.ENTER)        
            time.sleep(1)
        fCheckFor_Sample()
        fCheckFor_PEP()
        fCheckFor_BillingDate()
        fCheckFor_SPS()
        time.sleep(1)

        # File > New > Database
        logging.debug('- create new database')
        type("f",KeyModifier.ALT)
        type("n")
        type("d")
        
    time.sleep(1)
    
# Empty database, press Next
    type("n",KeyModifier.ALT)

# For TS2016, choose Local, press Next
    if int(Settings.tsVersion) > 2015:
        myTools.pressDOWN(1)
        type("n",KeyModifier.ALT)        

# new db path and settings
    logging.debug('- enter path')
    type(Settings.dbFolder)
    type(Key.ENTER)

# Firm name
    type("TS Handyman Services")
    type(Key.ENTER)    
    logging.debug('- db settings')

# Decimals
    time.sleep(1)     
    type(Key.ENTER)        

# set Fiscal month to July
    myTools.pressDOWN(6)
    type(Key.ENTER)

# starting invoice number    
    type("12345")
    type(Key.ENTER)

# bill with firm heading    
    myTools.pressDOWN(2)
# mark cover page
    type(Key.TAB,KeyModifier.SHIFT)
    type(Key.SPACE)
    time.sleep(1)        
    type(Key.ENTER)    
    
#    click("do_not_use_tal.png")    
    time.sleep(1)        
    type(Key.ENTER)

# unmark outlook
    type(Key.SPACE)
    time.sleep(1)        
    type(Key.ENTER)

# Ready to Create Your Database
    time.sleep(1)     
    type(Key.ENTER)

# Wait for db to be created    
    wait("finish.png",FOREVER)

# press Finish    
    type(Key.ENTER)
    time.sleep(1)

# wait for address info
    wait("address_info.png",60)

# Firm name/address
    type(Key.TAB)
    type("239 Western Avenue")
    myTools.pressTAB(2)
    type("Essex")
    type(Key.TAB)
    type("MA")
    type(Key.TAB)
    type("01929")
    type(Key.TAB)
    type("USA")
    type(Key.TAB)
    type("508-768-6100")
    time.sleep(1)

# project separator
    myTools.pressF6(6)
    time.sleep(1)
    type(".")

# close General settings
    type(Key.ENTER)    

# getting started
    logging.debug('- getting started wiz')
    wait("enter_your_name.png",FOREVER)
    type("Xander Yakuza Zork")
    type(Key.TAB)
    time.sleep(1)     
    type(Key.ENTER)    
    type("XanderZ")
    type(Key.TAB)
    type("XZork")
    type("f",KeyModifier.ALT)

# backup
    time.sleep(1)
    if exists("backup_database.png"):
        click("no_btn.png")
        time.sleep(1)
        type("n")

    fCheckFor_BillingDate()
    fCheckFor_SPS()
    fCheckFor_PEP()  
    
    myTools.sectionEndTimeStamp()
    backup_Data.fBackup_Checkpoint("new")