def fPayment_CreateOne(pay_client,pay_month,pay_count,pay_amount):
#---------------------------------------------------#

    logging.debug('- Pay_Create: ' + str(pay_month) + "-" + pay_client + " = " + str(pay_amount))

    # new payment
    myTools.getFocus()
    type("n",KeyModifier.CTRL)
    logging.debug('-- new')
    myTools.waitForTransEntry()
    
    # type
    type(Key.TAB)
       
    # source
    type(Key.TAB)
        
    # check number
    check_num = "pay-" + str(pay_count) + "-" + str(pay_month)
    type(check_num)
    type(Key.TAB)
    time.sleep(1)        
            
    # client
    myTools.enterClient(pay_client)
        
    # date
    pay_date = str(pay_month) + "/28/" + Settings.dataYear
    type(pay_date)
    time.sleep(1)
    type(Key.TAB)
        
    # skip deposit slip
    type(Key.TAB)
            
    # Amount
    type(str(pay_amount))
    type(Key.TAB)
        
    # Description
    type("a",KeyModifier.CTRL)
    type("bds-pay: " + pay_client + " - " + pay_date)
    type(Key.ENTER)
    time.sleep(1)

    # close / save
    logging.debug('-- close/save')
    type(Key.F4,KeyModifier.CTRL)
    time.sleep(1)
    type(Key.ENTER)
    time.sleep(5)

    myTools.checkForUnappliedAmount()
Exemplo n.º 2
0
def fCreate_OneCredit(pClient, pCliNum, pMonth, pAmount):
    # ---------------------------------------------------#

    logging.debug("- Create_OneCred: " + str(pMonth) + "-" + pClient + " = " + str(pAmount))

    # new payment
    type("n", KeyModifier.CTRL)
    myTools.waitForTransEntry()

    # type = credit
    type(Key.HOME)
    myTools.pressDOWN(1)
    type(Key.TAB)
    time.sleep(1)

    # client
    myTools.enterClient(pClient)

    # date
    credDate = str(pMonth) + "/28/" + Settings.dataYear
    type(credDate)
    time.sleep(1)
    type(Key.TAB)

    # Amount
    type(str(pAmount))
    type(Key.TAB)

    # Description
    type("a", KeyModifier.CTRL)
    type(pClient + " - " + str(pCliNum) + " - " + credDate)
    type(Key.ENTER)
    time.sleep(1)

    # move to invoice list
    if (int(Settings.tsVersion) > 2016) and (Settings.tsDB == "PREM"):
        myTools.pressTAB(2)
    else:
        myTools.pressTAB(1)

    # move to last entry
    myTools.moveToLastTrans()
    myTools.clickApplyOne()

    # save
    type("s", KeyModifier.CTRL)
    myTools.checkForUnappliedAmount()
    myTools.waitForTransSave()
Exemplo n.º 3
0
def fCreate_OneCredit(pClient,pCliNum,pMonth,pAmount):
#---------------------------------------------------#

    logging.debug('- Create_OneCred: ' + str(pMonth) + "-" + pClient + " = " + str(pAmount))

    # new payment
    type("n",KeyModifier.CTRL)
    myTools.waitForTransEntry()
    
    # type = credit
    type(Key.HOME)
    myTools.pressDOWN(1)
    type(Key.TAB)     
    time.sleep(1)        
        
    # client
    myTools.enterClient(pClient)
        
    # date
    credDate = str(pMonth) + "/28/" + Settings.dataYear
    type(credDate)
    time.sleep(1)
    type(Key.TAB)       
            
    # Amount
    type(str(pAmount))
    type(Key.TAB)
        
    # Description
    type("a",KeyModifier.CTRL)
    type(pClient + " - " + str(pCliNum) + " - " + credDate)
    type(Key.ENTER)
    time.sleep(1)
    type(Key.TAB)

    # Invoice list; go to last entry
    type(Key.END, KeyModifier.CTRL)
    time.sleep(1)    
    click("apply_one_button.png")
    time.sleep(1) 

    # save
    type("s",KeyModifier.CTRL)
    myTools.checkForUnappliedAmount()
    myTools.waitForTransSave()    
Exemplo n.º 4
0
def fCreate_OnePayment(pClient,pCliNum,pMonth,pAmount):
#---------------------------------------------------#

    logging.debug('- Create_OnePay: ' + str(pMonth) + "-" + pClient + " = " + str(pAmount))

    # build a list of clients for which you will clear apply details
    transferClients = ["East.Bridgewater","North.Adams","West.Boylston"]
    transferFundsClients = ["East.Brookfield","North.Andover","West.Bridgewater"]
    refundClients = ["Harvard","Harwich","Hatfield","Haverhill","Hawley"]   
    clearClients = transferClients + transferFundsClients + refundClients

    # new payment
    type("n",KeyModifier.CTRL)
    myTools.waitForTransEntry()
       
    # type
    type(Key.TAB)
       
    # source
    myTools.pressDOWN(pMonth-1)
    type(Key.TAB)
    time.sleep(1)
        
    # check number; only available in month 1
    if pMonth == 1:
        type(str(pCliNum))
        type(Key.TAB)
        time.sleep(1)
            
    # skip card options
    if pMonth in (3,4,5,6,7,8):
        type(Key.TAB)
            
    # client
    myTools.enterClient(pClient)
        
    # date
    payDate = str(pMonth) + "/28/" + Settings.dataYear
    type(payDate)
    time.sleep(1)
    type(Key.TAB)
        
    # skip deposit slip
    if pMonth in (1,2):
        type(Key.TAB)
            
    # Amount
    type(str(pAmount))
    type(Key.TAB)
        
    # Description
    type("a",KeyModifier.CTRL)
    type(pClient + " - " + str(pCliNum) + " - " + payDate)
    type(Key.ENTER)
    time.sleep(1)

    # save
    type("s",KeyModifier.CTRL)
    myTools.checkForUnappliedAmount()
    myTools.waitForTransSave()    

    imgClearApplies = "clear_applies.png"
    imgRemainingAmount = "apply_remaining_to_future.png"       

    # clear applies and mark future invoice (this is for transfers in other scripts)
    if pClient in clearClients:
        logging.debug("==> CLEAR APPLIED")        
        click(imgClearApplies)
        time.sleep(1)
        click(imgRemainingAmount)
        time.sleep(1)
        # save
        type("s",KeyModifier.CTRL)       
        myTools.checkForUnappliedAmount()
        myTools.waitForTransSave()    
def fCreate_SpecCredits(pMonth):
#---------------------------------------------------#

    myTools.sectionStartTimeStamp("specialCredits" + str(pMonth))
    logging.debug('Create_SpecCredits: ' + str(pMonth))

    if int(Settings.tsVersion) < 2017:
        logging.debug('- SKIP until 2017')
        return       

    myTools.getFocus()

    # list of invoices; one for each month
    invList = ["12400","12600","13100","13330","13830","14210","14370","14850","15200","15460","15960","16240"]

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

    # go to invoice
    type('g',KeyModifier.CTRL + KeyModifier.SHIFT)
    time.sleep(1)
    myTools.pressTAB(2)
    invNum = invList[pMonth-1]
    logging.debug('- look for: ' + invNum)
    type(invNum)
    type(Key.ENTER)
    time.sleep(1)

    # open it
    type(Key.ENTER)
    myTools.waitForTransEntry()

    # apply a new special credit
    click("apply_new.png")
    myTools.pressDOWN(5)    
    type(Key.ENTER)
    time.sleep(1)

    # type
    type(Key.TAB)

    # client
    type(Key.TAB)
        
    # date
    tranDate = str(pMonth) + "/28/" + Settings.dataYear
    type(tranDate)
    time.sleep(1)
    type(Key.TAB)       
            
    # Description
    type(Key.END)
    type(" - " + tranDate)
    time.sleep(1)
    myTools.pressTAB(2)

    # Fees
    feeAmount = 5 + pMonth/float(100)
    type(str(feeAmount))
    time.sleep(1)    
    type(Key.TAB)

    # Costs
    costAmount = 4 + pMonth/float(100)
    type(str(costAmount))
    time.sleep(1)    
    type(Key.TAB)

    # Interest
    interestAmount = 3 + pMonth/float(100)
    type(str(interestAmount))
    time.sleep(1)    

    #save
    type("s",KeyModifier.CTRL)
    myTools.checkForUnappliedAmount()
    myTools.waitForTransSave()    

    # close
    type(Key.F4,KeyModifier.CTRL)
    time.sleep(1)
    type(Key.F4,KeyModifier.CTRL)
    
    myTools.sectionEndTimeStamp()
    myTools.checkProcesses()