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")
Esempio n. 2
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")