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':

            elif form.vars.salary_structure == 'Between 30000 and 100000':
                print 'a'

            elif form.vars.salary_structure == 'Great than 100000':
                print 'a'

        if form.accepted:
            response.flash=T('Payslip Added')
        return locals()

- (Documentation)
- (Source code)
- (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 
For more options, visit

Reply via email to