Need help in form calculations with conditions