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()
def fFundsAccouts_Setup():
# - - - - - - - - - - - - - - - - - - - - - - - - - #

    myTools.sectionStartTimeStamp("funds account")
    logging.debug('FundsAccount_Setup')

    # make sure timeslips has focus
    myTools.getFocus()
    # switch date to 1/27/13
    fSet_BillDate(1)

    fBankAccount_Create()

    # open client list
    type("i",KeyModifier.CTRL)
    time.sleep(1)

    clientList = ["Hadley","Halifax"]
    count = 0    

    for oneCli in clientList:
        count += 1
        fFundsAccount_Create(oneCli,count)

    type(Key.F4,KeyModifier.CTRL)
    myTools.sectionEndTimeStamp()
def fBill_BillFields():
#---------------------------------------------------#

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

    reportName = myTools.monthToName(13,"-BillFields-",".txt")

    myTools.getFocus()                                # make sure timeslips has focus
    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()
def create_Layouts():
#---------------------------------------------------#

    myTools.sectionStartTimeStamp("create layouts")
    logging.debug('create_Layouts')

    myTools.getFocus()
    fSet_BillDate(1)                                        # set bill date to prep delete of dates from layout

    report_UDSlip.fCreate_SlipListDetailed()
    report_UDSlip.fCreate_SlipFields()
    report_UDSlip.fCreate_SlipListCalc()
    
    report_UDClient.fCreate_ClientListHistory()
    report_UDClient.fCreate_ClientListValues()
    
    report_UDInvoice.fCreate_InvoiceListFields()
    report_UDInvoice.fSort_InvoiceListFields()
    
    report_UDFunds.fCreate_FundsListFields()
    report_UDFunds.fSort_FundsListFields()
    
    report_Statement.fImport_Statement()
    report_FirmAssTot.fSetup_FirmAssTot()    
    report_PBWorksheet.fSetup_PreBill()
    report_TkCollections.fSetup_TkCollections()
    report_AgedARBalDate.fSetup_AgedARBalDate()
    report_ARwRunBal.fSetup_ARwRunBal()
    report_FundsWRunBal.fSetup_FundsWRunBal()
    report_InvoiceListing.fSetup_InvoiceListing()

    myTools.sectionEndTimeStamp()

    bill_Setup.fSetup_BillReport()
    bill_ImportLayout.fImport_BillLayout("Bill with Taxes")
    backup_Data.fBackup_BillData(0,"a")                     # backup before first bill 
Beispiel #5
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")
def fPrint_PostbillReports(pMonth,pAorB):
#---------------------------------------------------#

    # print various reports to check db values and calculations

    fSet_BillDate(pMonth)

    Settings.PartOfRepName = myTools.padZero(pMonth) + pAorB + "-" + Settings.tsVersion

    csvExt = ".csv"
    txtExt = ".txt"

    if (pMonth == 13) or (pMonth == 1):
        logging.debug('!!! SKIP FEE ALLOCATION PERIOD REPORT')
    else:        
        report_FeeAllocPer.fPrint_FeeAllocPer(pMonth,csvExt)

    report_ARwRunBal.fPrint_ARwRunBal(pMonth,txtExt)
    report_FundsWRunBal.fPrint_FundsWRunBal(pMonth,txtExt)
    report_ARHistory.fPrint_ARHistory(pMonth,csvExt)
    report_InvoiceListing.fPrint_InvoiceListing(pMonth,txtExt)        
    
    """
    report_AvailableWIP.fPrint_AvailableWIP(pMonth,csvExt)
    report_MissingTime.fPrint_MissingTime(pMonth,csvExt,pAorB)
    report_ClientsNotBilled.Print_ClientsNotBilled(pMonth,csvExt)
    report_FirmAssList.fPrint_FirmAssList(pMonth,csvExt)
    report_PayPerf.fPrint_PayPerf(pMonth,csvExt)

    report_AgedARBal.Print_ARAgedBal(pMonth,csvExt)
    report_AgedARBalDate.Print_ARAgedBalDate(pMonth,csvExt)
    report_AgedClient.fPrint_AgedClient(pMonth,csvExt)
    report_AgedInv.fPrint_AgedInv(pMonth,csvExt)
    report_ARwRunBal.fPrint_ARwRunBal(pMonth,txtExt)

    report_ARHistory.fPrint_ARHistory(pMonth,csvExt)
    report_UDSlip.fPrint_SlipListDetailed(pMonth,csvExt)
    report_UDSlip.fPrint_SlipFields(pMonth,csvExt)
    report_UDSlip.fPrint_SlipListCalc(pMonth,csvExt)    
    report_UDClient.fPrint_ClientListHistory(pMonth,csvExt)
    report_SlipTotalsWeekly.Print_SlipTotalsWeekly(pMonth,csvExt)
    report_TkHistory.Print_TkHistory(pMonth,csvExt)
    report_TkContribution.Print_TkContribution(pMonth,csvExt)  
    report_TkCC.Print_TkCC(pMonth,csvExt)
    report_FundsBal.fPrint_FundsBal(pMonth,csvExt)
    report_Taxes.Print_Taxes(pMonth,csvExt)
    report_TOWorksheet.Print_Worksheet(pMonth,csvExt)
    report_PBWorksheet.fPrint_PreBill(pMonth,txtExt)
    
    email_Send.fSend_Text("rep-half " + str(pMonth) + pAorB)  
    
    report_SlipListing.fPrint_SlipListing(pMonth,csvExt)
    report_BillStage.fPrint_BillStage(pMonth,csvExt)    
    report_FirmAssTot.fPrint_FirmAssTot(pMonth,txtExt)
    report_ProdPeriod.print_ProdPeriod(pMonth,csvExt)
    report_ProfPeriod.print_ProfPeriod(pMonth,csvExt)
    report_Markup.print_Markup(pMonth,csvExt)
    report_SlipSummary.print_SlipSummary(pMonth,csvExt)
    report_Statement.fPrint_Statement(pMonth,txtExt)
#    report_Budgets.printCliBudget(pMonth,csvExt)
#    report_Budgets.printTkBudget(pMonth,csvExt)
#    report_Budgets.printFirmBudget(pMonth,csvExt)    
    report_UDInvoice.fPrint_InvoiceListFields(pMonth,csvExt)
    report_InvoiceListing.fPrint_InvoiceListing(pMonth,txtExt)    
    report_GLXfer.Print_GLXfer(pMonth,csvExt)

    if (pMonth == 13): # skip some reports for ba clients
        logging.debug('')
        logging.debug('!!! SKIP UD FUNDS REPORT')
        logging.debug('!!! SKIP HOLD REPORT')
        logging.debug('!!! SKIP SPLIT BILL DIST')
        logging.debug('!!! SKIP FUNDS w/RUNNING BAL')
        logging.debug('!!! SKIP FUNDS LIST')
    else:
        report_UDFunds.fPrint_FundsListFields(pMonth,csvExt)   
        report_Hold.Print_Hold(pMonth,csvExt)
        report_SplitBill.fPrint_SplitBill(pMonth,csvExt)
        report_FundsWRunBal.fPrint_FundsWRunBal(pMonth,txtExt)
        report_FundsList.fPrint_FundsList(pMonth,csvExt)

    if (pMonth == 13) or ((pMonth == 1) and (pAorB == "a")):
        # fee allocation cannot be run without some payments entered
        logging.debug('')
        logging.debug('!!! SKIP COLLECTIONS REPORT')
        logging.debug('!!! SKIP FEE ALLOCATION REPORT')
        logging.debug('!!! SKIP PAYMENT DISTR REPORT')        
        logging.debug('!!! SKIP AGED WIP REPORT')        
    else:
        report_TkCollections.Print_TkCollections(pMonth,txtExt)        
        report_FeeAlloc.Print_FeeAlloc(pMonth,csvExt)
        report_PayDistr.Print_PayDistr(pMonth,csvExt)
        report_AgedWIP.fPrint_AgedWIP(pMonth,csvExt)    

#    report_UDClient.fPrint_ClientListValues(pMonth,csvExt)
#    report_DaysToPay.print_DaysToPay(pMonth,csvExt)   

#    email_Send.fSend_Email("rep " + str(pMonth) + pAorB)
    """
    email_Send.fSend_Text("rep-all " + str(pMonth) + pAorB)