Ejemplo n.º 1
0
def fCreate_OneDiscount(pClient, pMonth, pAmount):
    # ---------------------------------------------------#

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

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

    # switch to Discount

    type(Key.UP)  # this is to get by a UI defect
    time.sleep(1)

    type("d")
    time.sleep(1)
    type(Key.TAB)

    # client
    myTools.enterClient(pClient)

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

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

    # Description
    type("a", KeyModifier.CTRL)
    type("Discount: " + pClient + " - " + tranDate)
    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.waitForTransSave()
Ejemplo 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()
Ejemplo n.º 3
0
def fCreate_OneWriteOff(pClient,pCliNum,pMonth,pAmount):
#---------------------------------------------------#

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

    # new writeoff
    type("n",KeyModifier.CTRL)
    myTools.waitForTransEntry()
    
    # type = writeoff    
    type(Key.HOME)
    type("w")
    type(Key.TAB)     
        
    # client
    myTools.enterClient(pClient)
        
    # date
    woDate = str(pMonth) + "/28/" + Settings.dataYear
    type(woDate)
    time.sleep(1)
    type(Key.TAB)       
            
    # Amount
    type(str(pAmount))
    type(Key.TAB)
        
    # Description
    type("a",KeyModifier.CTRL)
    type(pClient + " - " + str(pCliNum) + " - " + woDate)
    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.waitForTransSave()