Changeset 17057
- Timestamp:
- 5 Aug 2022, 16:34:49 (2 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py
r16898 r17057 208 208 self.certificate.study_mode = 'ug_pt' 209 209 self.student['studycourse'].entry_session = 2013 210 self.student['studycourse'].certificate.school_fee_ 1= 50200.0210 self.student['studycourse'].certificate.school_fee_3 = 50200.0 211 211 self.app['configuration']['2004'].union_fee = 1000.0 212 212 self.app['configuration']['2004'].welfare_fee = 500.0 … … 247 247 self.certificate.study_mode = 'ug_ft' 248 248 self.student['studycourse'].entry_session = 2013 249 self.student['studycourse'].certificate.school_fee_ 1= 51750.0249 self.student['studycourse'].certificate.school_fee_3 = 51750.0 250 250 # Manager can access InterswitchForm 251 251 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') -
main/waeup.aaue/trunk/src/waeup/aaue/locales/en/LC_MESSAGES/waeup.kofa.po
r16419 r17057 135 135 #: school_fee_1 136 136 msgid "Initial School Fee" 137 msgstr " School Fees New Students"137 msgstr "Current School Fees" 138 138 139 139 #: school_fee_2 140 140 msgid "Returning School Fee" 141 msgstr "School Fees Returning Students (> 2014)"141 msgstr "School Fees 2015-2019" 142 142 143 143 #: school_fee_3 144 144 msgid "Foreigner Initial School Fee" 145 msgstr "School Fees Returning Students"145 msgstr "School Fees till 2015" 146 146 147 147 #: school_fee_4 -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r16967 r17057 179 179 cpt_value = ctrl.options[0] 180 180 # School fee payment ticket can be added ... 181 self.student['studycourse'].certificate.school_fee_ 1= 6666.0181 self.student['studycourse'].certificate.school_fee_3 = 6666.0 182 182 self.student.nationality = u'NG' 183 183 self.browser.open(self.payments_path + '/addop') … … 233 233 self.app['configuration'].addSessionConfiguration(configuration_1) 234 234 self.student['studycourse'].certificate.study_mode = 'ug_pt' 235 self.student['studycourse'].certificate.school_fee_ 1= 6666.0235 self.student['studycourse'].certificate.school_fee_2 = 6666.0 236 236 self.app['configuration']['2015'].union_fee = 1250.0 237 237 self.app['configuration']['2015'].welfare_fee = 750.0 … … 329 329 330 330 def test_manage_payments_bypass_ac_creation(self): 331 self.student['studycourse'].certificate.school_fee_ 1= 6666.0331 self.student['studycourse'].certificate.school_fee_3 = 6666.0 332 332 self.student.nationality = u'NG' 333 333 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') … … 563 563 564 564 def test_payment_disabled(self): 565 self.student['studycourse'].certificate.school_fee_3 = 6666.0 565 566 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 566 567 self.browser.open(self.payments_path) … … 648 649 self.student['studycourse'].current_session = 2018 649 650 self.student['studycourse'].entry_mode = 'ug_ft' 650 self.student['studycourse'].certificate.school_fee_ 1= 50200.0651 self.student['studycourse'].certificate.school_fee_2 = 50200.0 651 652 self.app['configuration']['2018'].union_fee = 1200.0 652 653 self.app['configuration']['2018'].welfare_fee = 700.0 -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py
r15871 r17057 74 74 self.assertEqual(payment.p_level, 100) 75 75 self.assertEqual(payment.p_session, 2004) 76 self.assertEqual(payment.amount_auth, 2 6666.0)76 self.assertEqual(payment.amount_auth, 28888.0) 77 77 self.assertEqual(payment.p_item, u'CERT1') 78 78 self.assertEqual(error, None) … … 84 84 self.student.lga = 'edo_afuze' 85 85 error, payment = utils.setPaymentDetails('schoolfee',self.student) 86 self.assertEqual(payment.amount_auth, 6765.0)86 self.assertEqual(payment.amount_auth, 8987.0) 87 87 IWorkflowState(self.student).setState('returning') 88 88 error, payment = utils.setPaymentDetails('schoolfee',self.student) … … 164 164 self.assertEqual(payment.p_level, 100) 165 165 self.assertEqual(payment.p_session, 2004) 166 self.assertEqual(payment.amount_auth, 6666.0)166 self.assertEqual(payment.amount_auth, 8888.0) 167 167 self.assertEqual(payment.p_item, u'CERT1') 168 168 self.assertEqual(error, None) -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r16936 r17057 400 400 return _("You are not allowed " 401 401 "to pay by instalments."), None 402 # We determine the base amount first 403 if student.entry_session < 2015: 404 amount = getattr(certificate, 'school_fee_3', 0.0) 405 elif student.entry_session < 2020: 406 amount = getattr(certificate, 'school_fee_2', 0.0) 407 else: 408 amount = getattr(certificate, 'school_fee_1', 0.0) 402 409 if previous_session: 403 410 # Students can pay for previous sessions in all 404 411 # workflow states. Fresh students are excluded by the 405 412 # update method of the PreviousPaymentAddFormPage. 406 if previous_level == 100: 407 amount = getattr(certificate, 'school_fee_1', 0.0) 408 else: 409 if student.entry_session in (2015, 2016): 410 amount = getattr(certificate, 'school_fee_2', 0.0) 411 else: 412 amount = getattr(certificate, 'school_fee_3', 0.0) 413 elif student.state == CLEARED and category != 'schoolfee_2': 414 amount = getattr(certificate, 'school_fee_1', 0.0) 413 pass 414 elif student.state == CLEARED: 415 415 # Cut school fee by 50% 416 if category == 'schoolfee_1' and amount: 417 amount = gateway_net_amt(amount) / 2 + GATEWAY_AMT 418 elif student.is_fresh and category == 'schoolfee_2': 419 amount = getattr(certificate, 'school_fee_1', 0.0) 420 # Cut school fee by 50% 421 if amount: 416 if category in ('schoolfee_1', 'schoolfee_2') and amount: 422 417 amount = gateway_net_amt(amount) / 2 + GATEWAY_AMT 423 418 elif student.state == RETURNING and category != 'schoolfee_2': … … 433 428 except KeyError: 434 429 return _(u'Session configuration object is not available.'), None 435 if student.entry_session >= 2015:436 amount = getattr(certificate, 'school_fee_2', 0.0)437 else:438 amount = getattr(certificate, 'school_fee_3', 0.0)439 430 # Cut school fee by 50% 440 431 if category == 'schoolfee_1' and amount: 441 432 amount = gateway_net_amt(amount) / 2 + GATEWAY_AMT 442 elif category == 'schoolfee_2': 443 amount = getattr(certificate, 'school_fee_2', 0.0) 444 # Cut school fee by 50% 445 if amount: 446 amount = gateway_net_amt(amount) / 2 + GATEWAY_AMT 433 elif category == 'schoolfee_2' and amount: 434 amount = gateway_net_amt(amount) / 2 + GATEWAY_AMT 447 435 else: 448 436 return _('Wrong state.'), None
Note: See TracChangeset for help on using the changeset viewer.