Changeset 16268
- Timestamp:
- 5 Oct 2020, 09:48:55 (4 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_webservices.py
r16193 r16268 578 578 self.student['payments']['my-payment2'] = payment2 579 579 server = ServerProxy('http://mgr:mgrpw@localhost/app', allow_none=True) 580 result = server.get_bursary_data(None,None,None,None,'dep1' )580 result = server.get_bursary_data(None,None,None,None,'dep1',2012) 581 581 self.assertEqual( 582 582 result,[ -
main/waeup.kofa/trunk/src/waeup/kofa/students/webservices.py
r16193 r16268 367 367 def get_bursary_data(self, 368 368 current_session=None, current_level=None, certcode=None, 369 current_mode=None, depcode=None ):369 current_mode=None, depcode=None, p_session=None): 370 370 """Returns bursary data of a subset of students. 371 371 """ … … 393 393 tz = getUtility(IKofaUtils).tzinfo 394 394 for payment in payments: 395 hitlist.append(dict( 396 student_id=payment.student.student_id, 397 matric_number=payment.student.matric_number, 398 reg_number=payment.student.reg_number, 399 firstname=payment.student.firstname, 400 middlename=payment.student.middlename, 401 lastname=payment.student.lastname, 402 state=payment.student.state, 403 current_session=payment.student.current_session, 404 entry_session=payment.student.entry_session, 405 entry_mode=payment.student.entry_mode, 406 faccode=payment.student.faccode, 407 depcode=payment.student.depcode, 408 certcode=payment.student.certcode, 409 p_id=payment.p_id, 410 amount_auth=payment.amount_auth, 411 p_category=payment.p_category, 412 display_item=payment.display_item, 413 p_session=payment.p_session, 414 p_state=payment.p_state, 415 creation_date=str('%s#' % to_timezone(payment.creation_date, tz)), 416 payment_date=str('%s#' % to_timezone(payment.payment_date, tz)), 417 ) 418 ) 395 if not p_session or payment.p_session == p_session: 396 hitlist.append(dict( 397 student_id=payment.student.student_id, 398 matric_number=payment.student.matric_number, 399 reg_number=payment.student.reg_number, 400 firstname=payment.student.firstname, 401 middlename=payment.student.middlename, 402 lastname=payment.student.lastname, 403 state=payment.student.state, 404 current_session=payment.student.current_session, 405 entry_session=payment.student.entry_session, 406 entry_mode=payment.student.entry_mode, 407 faccode=payment.student.faccode, 408 depcode=payment.student.depcode, 409 certcode=payment.student.certcode, 410 p_id=payment.p_id, 411 amount_auth=payment.amount_auth, 412 p_category=payment.p_category, 413 display_item=payment.display_item, 414 p_session=payment.p_session, 415 p_state=payment.p_state, 416 creation_date=str('%s#' % to_timezone( 417 payment.creation_date, tz)), 418 payment_date=str('%s#' % to_timezone( 419 payment.payment_date, tz)), 420 ) 421 ) 419 422 return hitlist 420 423
Note: See TracChangeset for help on using the changeset viewer.