Changeset 9874 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 12 Jan 2013, 08:51:37 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r9868 r9874 791 791 balance_amount = schema.Float( 792 792 title = _(u'Balance Amount'), 793 default = 0.0,793 default = None, 794 794 required = True, 795 795 readonly = False, -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9868 r9874 2399 2399 self.browser.getControl(name="form.balance_session").value = ['2004'] 2400 2400 self.browser.getControl(name="form.balance_level").value = ['300'] 2401 self.browser.getControl(name="form.balance_amount").value = '-567.8' 2402 self.browser.getControl("Create ticket").click() 2403 self.assertMatches('...Amount must be greater than 0...', 2404 self.browser.contents) 2405 self.browser.getControl(name="form.balance_amount").value = '0' 2406 self.browser.getControl("Create ticket").click() 2407 self.assertMatches('...Amount must be greater than 0...', 2408 self.browser.contents) 2401 2409 self.browser.getControl(name="form.balance_amount").value = '567.8' 2402 2410 self.browser.getControl("Create ticket").click() -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r9868 r9874 434 434 if academic_session == None: 435 435 return _(u'Session configuration object is not available.'), None 436 if amount in (0.0, None) :437 return _('Amount could not be determined.'), None436 if amount in (0.0, None) or amount < 0: 437 return _('Amount must be greater than 0.'), None 438 438 for key in student['payments'].keys(): 439 439 ticket = student['payments'][key]
Note: See TracChangeset for help on using the changeset viewer.