Changeset 14893 for main/waeup.uniben/trunk/src/waeup/uniben/students
- Timestamp:
- 13 Nov 2017, 09:04:23 (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
r14892 r14893 555 555 #self.student['payments']['anykey'] = payment 556 556 557 558 557 error, payment = utils.setPaymentDetails('schoolfee', 559 558 self.student, None, None) … … 564 563 self.assertEqual(error, None) 565 564 566 # Old returning students pay less565 # Old returning students may pay less. 567 566 self.certificate.school_fee_2 = 50000.0 568 self.certificate.custom_ textline_1 = 'sciEnce'567 self.certificate.custom_float_1 = 30000.0 569 568 error, payment = utils.setPaymentDetails( 570 569 'schoolfee', self.student, None, None) 571 # minus 30000572 570 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 28000577 self.assertEqual(payment.amount_auth, 22088.0)578 571 579 572 # Staff members pay less. 580 self.certificate.custom_ textline_1 = ''573 self.certificate.custom_float_1 = None 581 574 self.student.is_staff = True 582 575 error, payment = utils.setPaymentDetails('schoolfee', -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r14892 r14893 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. 353 # Old returning students might get a discount. 355 354 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 355 and certificate.custom_float_1: 356 amount -= certificate.custom_float_1 361 357 # Give 50% school fee discount to staff members. 362 358 if student.is_staff:
Note: See TracChangeset for help on using the changeset viewer.