Пример #1
0
def pricing_main():
    print('pricing_main')
    username = login_check()
    #print(len(username))
    if (username is None):
        redirect()
    #section_no= 1
    #username ='******'
    pricing1 = Pricing_procedure()
    pricelist3, overall_total = pricing1.get_totals( username)
    print(pricelist3)
    return bottle.template('pricing_main', sectiontotal='test for section total', username = username, pricelist=pricelist3, overall_total = overall_total)
Пример #2
0
def pricing_calc():
    print('pricing_calc')
    username = login_check()
    #print(len(username))
    if (username is None):
        redirect() 
    #retrieve information from price calculator
    edited_values = []
    edited_values = bottle.request.forms.getlist('quantity')
    section_no = bottle.request.forms.get('section_no')
    print (edited_values)
    print (section_no)
    pricing1 = Pricing_procedure()
    pricing1.apply_calc(edited_values, section_no, username)
    pricing1 = Pricing_procedure()
    pricelist3, overall_total = pricing1.get_totals(username)
    print(pricelist3)
    bottle.redirect('/pricing/' + section_no)