def fCreate_PaymentsToAccount(pMonth):
#---------------------------------------------------#

    myTools.sectionStartTimeStamp("paystoaccount" + str(pMonth))
    logging.debug('Create_PaysToAccount: ' + str(pMonth))

    allClients = names_Init.fInit_Clients()
    count = 0

    myTools.getFocus()

    # open funds list
    type("f",KeyModifier.CTRL)
    myTools.waitForFundsList()    

    # create PTA for first 5 clients and then every 6th client

    for oneClient in allClients:
        count += 1
        if (count in range(6)) or ((count + pMonth) % 6 == 0):
            ptaAmount = 25 + pMonth/float(100)
            fCreate_OnePayToAccount(oneClient,count,pMonth,ptaAmount)
        else:
            logging.debug('-- skip: ' + str(pMonth) + "-" + oneClient)           
     
    type(Key.F4,KeyModifier.CTRL)
    time.sleep(1) 
    type(Key.F4,KeyModifier.CTRL)
    
    myTools.sectionEndTimeStamp()
    myTools.checkProcesses()        
def fCreate_FinanceCharges(pMonth):
#---------------------------------------------------#

    myTools.sectionStartTimeStamp("finance" + str(pMonth))
    logging.debug('Create_FinanceCharges: ' + str(pMonth))

    allClients = names_Init.fInit_Clients()
    count = 0

    myTools.getFocus()

    # client list
    type("i",KeyModifier.CTRL)

    for oneClient in allClients:
        count += 1
        
        # always create finance charge for first 5 clients 
        # then create finance charge for 1 out of 35 next clients
        
        if (count in range(6)) or ((count + pMonth) % 35 == 0):
            financeCharge = str(count) + ".99"            
            fCreate_OneFinanceCharge(oneClient,count,pMonth,financeCharge)
        else:
            logging.debug('-- skip: ' + str(pMonth) + "-" + oneClient)

    type(Key.F4,KeyModifier.CTRL)
    myTools.sectionEndTimeStamp()
Example #3
0
def fCreate_CreditsForMonth(pMonth):
    # ---------------------------------------------------#

    myTools.sectionStartTimeStamp("credits" + str(pMonth))
    logging.debug("Create_CreditsForMonth: " + str(pMonth))

    allClients = names_Init.fInit_Clients()
    count = 0

    myTools.getFocus()

    # open a/r tran list
    type("t", KeyModifier.CTRL)
    myTools.waitForTransList()

    for oneClient in allClients:
        count += 1

        # always create credits for first 5 clients
        # then create credits for 1 out of 9 next clients

        if (count in range(6)) or ((count + pMonth) % 9 == 0):
            creditAmount = pMonth + pMonth / float(100)
            fCreate_OneCredit(oneClient, count, pMonth, creditAmount)
        else:
            logging.debug("-- skip: " + str(pMonth) + "-" + oneClient)

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

    myTools.sectionEndTimeStamp()
    myTools.checkProcesses()
def Create_Slips(tmslips,exslips):
#---------------------------------------------------#

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

    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()

    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()

    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()

    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.Backup_Checkpoint("slips")
def fCreate_PaymentsForMonth(pMonth):
#---------------------------------------------------#

    myTools.sectionStartTimeStamp("payments" + str(pMonth))
    logging.debug('Create_PaymentsForMonth: ' + str(pMonth))

    allClients = names_Init.fInit_Clients()
    transferClients = ["East.Bridgewater","North.Adams","West.Boylston"]
    transferFundsClients = ["East.Brookfield","North.Andover","West.Bridgewater"]

    count = 0

    myTools.getFocus()

    # open a/r tran list
    type("t",KeyModifier.CTRL)
    myTools.waitForTransList()

    for oneClient in allClients:
        count += 1
        
        # always create payments for first 5 clients 
        # then create payments for 1 out of 5 next clients
        # always create payments for certain projects
        
        if (count in range(6)) or ((count + pMonth) % 5 == 0) or (oneClient in transferClients) or (oneClient in transferFundsClients):            
            payAmount = 100 + int(count) + pMonth/float(100)  # calc amount first, so we can log it
            fCreate_OnePayment(oneClient,count,pMonth,payAmount)
        else:
            logging.debug('-- skip: ' + str(pMonth) + "-" + oneClient)

    type(Key.F4,KeyModifier.CTRL)
    time.sleep(1)
    type(Key.F4,KeyModifier.CTRL)
    
    myTools.sectionEndTimeStamp()
    myTools.checkProcesses()    
Example #6
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")