Im trying to create a payslip form where the user will select the contract and the form will execute calculation formula based on a selected combobox but i dont know where to put the formula and the conditions any way of guiding me?
the controller def addpayslip(): form = SQLFORM(db.payslip).process() def check(form): if form.vars.salary_structure == 'Less than 30000': #formula rssb_emp=form.vars.rssb_emp=form.vars.contract.wage*0.03 print elif form.vars.salary_structure == 'Between 30000 and 100000': #formula rssb_emp=form.vars.rssb_emp=form.vars.contract.wage*0.05 print 'a' elif form.vars.salary_structure == 'Great than 100000': print 'a' if form.accepted: response.flash=T('Payslip Added') return locals() -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.