示例#1
0
import withdraw_helper


def field_name_1(field, ben='Ben'):
    field = 'pnlSetupNewPayeePayaPerson:frmPayaPersonArrangement:str' + ben + field
    return "document.forms[1]['" + field + "'].value='%s';"


cursor = withdraw_helper.cursor()
withdrawals = withdraw_helper.get_withdrawals(cursor, 'PROCES')

count = 1
for reqid, amount, name, bank, acc_num, sort_code in withdrawals:
    print count, '/', len(withdrawals)
    print
    count += 1

    # truncate decimals to 2 places
    amount = withdraw_helper.quantize(amount)

    print 'Name =\t\t', name
    print 'Account =\t', acc_num

    if len(sort_code) != 6:
        print 'Sort code is wrong length'
        print 'Request ID =\t', reqid
        break
    sort_code = sort_code[0:2], sort_code[2:4], sort_code[4:6]

    print 'Sort code =\t', sort_code[0], sort_code[1], sort_code[2]
    print
示例#2
0
import withdraw_helper

def field_name_1(field, ben='Ben'):
    field = 'pnlSetupNewPayeePayaPerson:frmPayaPersonArrangement:str' + ben + field
    return "document.forms[1]['" + field + "'].value='%s';"

cursor = withdraw_helper.cursor()
withdrawals = withdraw_helper.get_withdrawals(cursor, 'PROCES')

count = 1
for reqid, amount, name, bank, acc_num, sort_code in withdrawals:
    print count, '/', len(withdrawals)
    print
    count += 1

    # truncate decimals to 2 places
    amount = withdraw_helper.quantize(amount)

    print 'Name =\t\t', name
    print 'Account =\t', acc_num

    if len(sort_code) != 6:
        print 'Sort code is wrong length'
        print 'Request ID =\t', reqid
        break
    sort_code = sort_code[0:2], sort_code[2:4], sort_code[4:6]

    print 'Sort code =\t', sort_code[0], sort_code[1], sort_code[2]
    print
    print 'Amount =\t', amount
示例#3
0
import withdraw_helper
import decimal

cursor = withdraw_helper.cursor()
withdrawals = withdraw_helper.get_withdrawals(cursor, 'AWAIT')

total = decimal.Decimal(0)
count = 1
for reqid, amount, name, bank, acc_num, sort_code in withdrawals:
    print count, '/', len(withdrawals)
    print
    count += 1

    # truncate decimals to 2 places
    amount = withdraw_helper.quantize(amount)

    print 'Search for: \t', acc_num
    print
    print 'Name =\t\t', name

    if len(sort_code) != 6:
        print 'Sort code is wrong length'
        print 'Request ID =\t', reqid
        break
    sort_code = sort_code[0:2], sort_code[2:4], sort_code[4:6]

    print 'Sort code =\t', sort_code[0], sort_code[1], sort_code[2]
    print 'Amount =\t', amount

    if len(acc_num) != 8:
        print 'Account number is not 8 digits'