Changeset 10449 for main/waeup.kofa/trunk/src
- Timestamp:
- 5 Aug 2013, 06:37:46 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r10446 r10449 676 676 ) 677 677 678 transcript_fee = schema.Float( 679 title = _(u'Transcript Fee'), 680 default = 0.0, 681 required = False, 682 ) 683 678 684 clearance_enabled = schema.Bool( 679 685 title = _(u'Clearance enabled'), -
main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py
r10232 r10449 92 92 return error 93 93 self.ac = pin 94 elif self.p_category == 'transcript': 95 # Create TSC access code 96 pin, error = create_accesscode( 97 'TSC',0,self.amount_auth,student.student_id) 98 if error: 99 return error 100 self.ac = pin 94 101 return None 95 102 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r10279 r10449 190 190 configuration.academic_session = 2004 191 191 configuration.clearance_fee = 3456.0 192 configuration.transcript_fee = 4567.0 192 193 configuration.booking_fee = 123.4 193 194 configuration.maint_fee = 987.0 … … 980 981 self.assertEqual(ac.owner, self.student_id) 981 982 self.assertEqual(ac.cost, 3456.0) 983 984 # Managers can add online transcript payment tickets 985 self.browser.open(self.payments_path + '/addop') 986 self.browser.getControl(name="form.p_category").value = ['transcript'] 987 self.browser.getControl("Create ticket").click() 988 self.assertMatches('...ticket created...', 989 self.browser.contents) 990 991 # Managers can approve the payment 992 self.assertEqual(len(self.app['accesscodes']['TSC-0']),0) 993 ctrl = self.browser.getControl(name='val_id') 994 value = ctrl.options[2] # The clearance payment is the third in the table 995 self.browser.getLink(value).click() 996 self.browser.open(self.browser.url + '/approve') 997 self.assertMatches('...Payment approved...', 998 self.browser.contents) 999 expected = '''... 1000 <td> 1001 <span>Paid</span> 1002 </td>...''' 1003 self.assertMatches(expected,self.browser.contents) 1004 # The new CLR-0 pin has been created 1005 self.assertEqual(len(self.app['accesscodes']['TSC-0']),1) 1006 pin = self.app['accesscodes']['TSC-0'].keys()[0] 1007 ac = self.app['accesscodes']['TSC-0'][pin] 1008 self.assertEqual(ac.owner, self.student_id) 1009 self.assertEqual(ac.cost, 4567.0) 982 1010 return 983 1011 -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r10445 r10449 416 416 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 417 417 p_item = trans(_('no bed allocated'), portal_language) 418 elif category == 'transcript': 419 amount = academic_session.transcript_fee 418 420 if amount in (0.0, None): 419 421 return _('Amount could not be determined.'), None -
main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
r10437 r10449 161 161 'gown': 'Gown Hire Fee', 162 162 'application': 'Application Fee', 163 'transcript': 'Transcript Fee', 163 164 } 164 165
Note: See TracChangeset for help on using the changeset viewer.