Changeset 11913 for main/waeup.fceokene/trunk/src/waeup/fceokene
- Timestamp:
- 29 Oct 2014, 21:23:53 (10 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/interfaces.py
r9628 r11913 63 63 ) 64 64 65 gown_fee = schema.Float( 66 title = _(u'Gown Fee'), 67 default = 0.0, 68 required = False, 69 ) 70 71 transfer_fee = schema.Float( 72 title = _(u'Transfer Fee'), 65 third_semester_fee = schema.Float( 66 title = _(u'NCE Third Semester Fee'), 73 67 default = 0.0, 74 68 required = False, -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py
r10876 r11913 84 84 def test_manage_payments(self): 85 85 # Add missing configuration data 86 self.app['configuration']['2004'].gown_fee = 150.0 87 self.app['configuration']['2004'].transfer_fee = 90.0 86 self.app['configuration']['2004'].third_semester_fee = 90.0 88 87 self.app['configuration']['2004'].clearance_fee = 120.0 89 88 self.app['configuration']['2004'].booking_fee = 150.0 … … 131 130 self.browser.contents) 132 131 self.browser.open(self.payments_path + '/addop') 133 self.browser.getControl(name="form.p_category").value = ['gown'] 134 self.browser.getControl("Create ticket").click() 135 self.assertMatches('...ticket created...', 136 self.browser.contents) 137 self.browser.open(self.payments_path + '/addop') 138 self.browser.getControl(name="form.p_category").value = ['transfer'] 132 self.browser.getControl(name="form.p_category").value = ['third_semester'] 133 self.browser.getControl("Create ticket").click() 134 self.assertMatches('...could not be determined...', 135 self.browser.contents) 136 self.certificate.study_mode = 'nce_ft' 137 self.browser.open(self.payments_path + '/addop') 138 self.browser.getControl(name="form.p_category").value = ['third_semester'] 139 139 self.browser.getControl("Create ticket").click() 140 140 self.assertMatches('...ticket created...', … … 214 214 215 215 def test_set_payment_details(self): 216 self.app['configuration']['2004'].gown_fee = 150.0 217 self.app['configuration']['2004'].transfer_fee = 90.0 216 self.app['configuration']['2004'].third_semester_fee = 90.0 218 217 self.app['configuration']['2004'].booking_fee = 150.0 219 218 self.app['configuration']['2004'].maint_fee = 180.0 … … 274 273 self.assertEqual(error, None) 275 274 276 error, payment = utils.setPaymentDetails('gown',self.student)277 self.assertEqual(payment.p_level, 100)278 self.assertEqual(payment.p_session, 2004)279 self.assertEqual(payment.amount_auth, 300.0)280 self.assertEqual(payment.p_item, u'')281 self.assertEqual(error, None)282 283 275 self.student['studycourse'].current_session = 2005 284 276 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) … … 294 286 self.assertEqual(error, None) 295 287 288 error, payment = utils.setPaymentDetails('third_semester',self.student) 289 self.assertEqual(payment.p_level, 100) 290 self.assertEqual(payment.p_session, 2004) 291 self.assertEqual(payment.amount_auth, 240.0) 292 self.assertEqual(payment.p_item, u'') 293 self.assertEqual(error, None) 294 296 295 self.certificate.study_mode = u'nce_sw' 297 296 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) … … 306 305 self.assertEqual(payment.p_session, 2004) 307 306 self.assertEqual(payment.amount_auth, 300.0) 308 self.assertEqual(payment.p_item, u'')309 self.assertEqual(error, None)310 311 error, payment = utils.setPaymentDetails('transfer',self.student)312 self.assertEqual(payment.p_level, 100)313 self.assertEqual(payment.p_session, 2004)314 self.assertEqual(payment.amount_auth, 240.0)315 307 self.assertEqual(payment.p_item, u'') 316 308 self.assertEqual(error, None) -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
r11882 r11913 138 138 except (AttributeError, TypeError): 139 139 return _('Study course data are incomplete.'), None 140 elif category == 'third_semester' and student.current_mode == 'nce_ft': 141 amount = academic_session.third_semester_fee 140 142 elif category == 'schoolfee': 141 143 try: -
main/waeup.fceokene/trunk/src/waeup/fceokene/utils/utils.py
r10570 r11913 18 18 """Customize general helper utilities for Kofa. 19 19 """ 20 from copy import deepcopy 20 21 from kofacustom.nigeria.utils.utils import NigeriaKofaUtils 21 22 from waeup.fceokene.interfaces import MessageFactory as _ … … 36 37 } 37 38 39 40 PAYMENT_CATEGORIES = { 41 'schoolfee': 'School Fee', 42 'clearance': 'Acceptance Fee', 43 'bed_allocation': 'Bed Allocation Fee', 44 'hostel_maintenance': 'Hostel Maintenance Fee', 45 #'transfer': 'Transfer Fee', 46 #'gown': 'Gown Hire Fee', 47 'application': 'Application Fee', 48 #'transcript': 'Transcript Fee', 49 'third_semester': 'NCE Third Semester Fee', 50 } 51 52 SELECTABLE_PAYMENT_CATEGORIES = deepcopy(PAYMENT_CATEGORIES) 53 38 54 def getPaymentItem(self, payment): 39 55 """Return payment item.
Note: See TracChangeset for help on using the changeset viewer.