- Timestamp:
- 12 Nov 2017, 17:02:44 (7 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r14857 r14892 542 542 IWorkflowState(self.student).setState('returning') 543 543 544 545 544 #error, payment = utils.setPaymentDetails('schoolfee', 546 545 # self.student, None, None) … … 565 564 self.assertEqual(error, None) 566 565 566 # Old returning students pay less 567 self.certificate.school_fee_2 = 50000.0 568 self.certificate.custom_textline_1 = 'sciEnce' 569 error, payment = utils.setPaymentDetails( 570 'schoolfee', self.student, None, None) 571 # minus 30000 572 self.assertEqual(payment.amount_auth, 20088.0) 573 self.certificate.custom_textline_1 = 'non-Science' 574 error, payment = utils.setPaymentDetails( 575 'schoolfee', self.student, None, None) 576 # minus 28000 577 self.assertEqual(payment.amount_auth, 22088.0) 578 567 579 # Staff members pay less. 580 self.certificate.custom_textline_1 = '' 568 581 self.student.is_staff = True 569 582 error, payment = utils.setPaymentDetails('schoolfee', … … 571 584 self.assertEqual(payment.p_level, 200) 572 585 self.assertEqual(payment.p_session, 2005) 573 self.assertEqual(payment.amount_auth, 10088.0)586 self.assertEqual(payment.amount_auth, 25088.0) 574 587 self.assertEqual(payment.p_item, u'CERT1') 575 588 self.assertEqual(error, None) -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r14858 r14892 351 351 else: 352 352 amount = getattr(certificate, 'school_fee_2', 0.0) 353 # Old returning students get a discount of 354 # N30000 and N28000 respectively. 355 if student.entry_session < 2017 \ 356 and certificate.custom_textline_1: 357 if certificate.custom_textline_1.lower() == 'science': 358 amount -= 30000 359 elif certificate.custom_textline_1.lower() == 'non-science': 360 amount -= 28000 353 361 # Give 50% school fee discount to staff members. 354 362 if student.is_staff:
Note: See TracChangeset for help on using the changeset viewer.