Exemple #1
0
def customorBills(enterprise_id):
    bills = yield from Bills.findAll('enterprise_id=?', enterprise_id)
    billServices = []
    for bill in bills:
        bill.services = bill.service_name.split(';')
        billServices = bill.service_name.split(';')
        print(billServices)
    return {'__template__': 'customorBills.html', 'bills': bills}
Exemple #2
0
def api_bills(*, page='1'):
    page_index = get_page_index(page)
    num = yield from Bills.findNumber('count(id)')
    p = Page(num, page_index)
    if num == 0:
        return dict(page=p, bills=())
    bills = yield from Bills.findAll(limit=(p.offset, p.limit))
    return dict(page=p, bills=bills)
Exemple #3
0
def customorBills (enterprise_id):
    bills = yield from Bills.findAll('enterprise_id=?',enterprise_id)
    billServices=[]
    for bill in bills:
        bill.services = bill.service_name.split(';')
        billServices= bill.service_name.split(';')
        print(billServices)
    return{
        '__template__':'customorBills.html',
        'bills':bills
    }
Exemple #4
0
def customorBills (enterprise_id):
    bills = yield from Bills.findAll('enterprise_id=?',enterprise_id)
    billServices=[]
    for bill in bills:
        bill.services = bill.service_name.split(';')
        billServices= bill.service_name.split(';')
        bill.create_time = time.localtime(bill.create_time)
        bill.create_time = time.strftime('%Y%m%d',bill.create_time)
    return{
        '__template__':'customorBills.html',
        'bills':bills
    }