Changeset 14893 for main/waeup.uniben/trunk/src
- Timestamp:
- 13 Nov 2017, 09:04:23 (7 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/browser/pages.py
r14890 r14893 83 83 form_fields = grok.AutoFields(ICertificate).omit( 84 84 'ratio', 85 'custom_textline_ 2',86 'custom_float_ 1', 'custom_float_2')85 'custom_textline_1', 'custom_textline_2', 86 'custom_float_2') 87 87 88 88 class CustomCertificateManageFormPage(CertificateManageFormPage): … … 91 91 form_fields = grok.AutoFields(ICertificate).omit( 92 92 'ratio', 93 'custom_textline_ 2',94 'custom_float_ 1', 'custom_float_2')93 'custom_textline_1', 'custom_textline_2', 94 'custom_float_2') -
main/waeup.uniben/trunk/src/waeup/uniben/locales/en/LC_MESSAGES/waeup.kofa.po
r14890 r14893 45 45 "really want to submit?" 46 46 47 msgid "Custom Textline1 (not used)"48 msgstr " Science / Non-Science"47 msgid "Custom Float 1 (not used)" 48 msgstr "Old Returning Discount" -
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.