Changeset 8307
- Timestamp:
- 29 Apr 2012, 06:51:19 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r8260 r8307 571 571 ) 572 572 573 school_fee_base = schema.Float(574 title = _(u'School Fee'),575 default = 0.0,576 )577 578 573 application_fee = schema.Float( 579 574 title = _(u'Application Fee'), -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r8305 r8307 1414 1414 self.browser.contents) 1415 1415 1416 # Students can add online school fee payment tickets 1416 # Students can add online school fee payment tickets. 1417 IWorkflowState(self.student).setState('returning') 1417 1418 self.browser.open(self.payments_path) 1418 1419 self.browser.getControl("Add online payment ticket").click() … … 1426 1427 self.assertMatches('...Amount Authorized...', 1427 1428 self.browser.contents) 1428 # Payment session and level have been calculated as defined 1429 # in w.k.students.utils 1429 self.assertEqual(self.student['payments'][value].amount_auth, 40000.0) 1430 # Payment session and will be calculated as defined 1431 # in w.k.students.utils because we set changed the state 1432 # to returning 1430 1433 self.assertEqual(self.student['payments'][value].p_session, 2005) 1431 1434 self.assertEqual(self.student['payments'][value].p_level, 200) … … 1453 1456 1454 1457 # The new SFE-0 pin can be used for starting course registration 1455 IWorkflowInfo(self.student).fireTransition('request_clearance')1456 IWorkflowInfo(self.student).fireTransition('clear')1457 1458 self.browser.open(self.studycourse_path) 1458 1459 self.browser.getLink('Start course registration').click() -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r8268 r8307 36 36 from zope.formlib.form import setUpEditWidgets 37 37 38 from waeup.kofa.interfaces import IExtFileStore, IKofaUtils 38 from waeup.kofa.interfaces import IExtFileStore, IKofaUtils, RETURNING 39 39 from waeup.kofa.interfaces import MessageFactory as _ 40 40 from waeup.kofa.students.interfaces import IStudentsUtils … … 259 259 specified. 260 260 """ 261 d = {}262 d ['p_item'] = u''263 d ['amount'] = 0.0264 d ['error'] = u''265 d ['p_session'] = student['studycourse'].current_session266 d ['p_level'] = student['studycourse'].current_level267 session = str(d ['p_session'])261 details = {} 262 details['p_item'] = u'' 263 details['amount'] = 0.0 264 details['error'] = u'' 265 details['p_session'] = student['studycourse'].current_session 266 details['p_level'] = student['studycourse'].current_level 267 session = str(details['p_session']) 268 268 try: 269 269 academic_session = grok.getSite()['configuration'][session] 270 270 except KeyError: 271 d ['error'] = u'Session configuration object is not available.'272 return d 271 details['error'] = u'Session configuration object is not available.' 272 return details 273 273 if category == 'schoolfee': 274 d['amount'] = academic_session.school_fee_base 275 d['p_item'] = student['studycourse'].certificate.code 276 # In case of school fee payment the payment session and level 277 # contain the values of the session the student has paid for 278 d['p_session'], d['p_level'] = self.getReturningData(student) 274 details['amount'] = getattr( 275 student['studycourse'].certificate,'school_fee_1') 276 details['p_item'] = student['studycourse'].certificate.code 277 if student.state == RETURNING: 278 # In case of returning school fee payment the payment session 279 # and level contain the values of the session the student 280 # has paid for. 281 details['p_session'], details[ 282 'p_level'] = self.getReturningData(student) 279 283 elif category == 'clearance': 280 d ['p_item'] = student['studycourse'].certificate.code281 d ['amount'] = academic_session.clearance_fee284 details['p_item'] = student['studycourse'].certificate.code 285 details['amount'] = academic_session.clearance_fee 282 286 elif category == 'bed_allocation': 283 d ['p_item'] = self.getAccommodationDetails(student)['bt']284 d ['amount'] = academic_session.booking_fee285 return d 287 details['p_item'] = self.getAccommodationDetails(student)['bt'] 288 details['amount'] = academic_session.booking_fee 289 return details 286 290 287 291 def getAccommodationDetails(self, student):
Note: See TracChangeset for help on using the changeset viewer.