Changeset 18131 for main/kofacustom.iuokada/trunk/src
- Timestamp:
- 19 Jul 2025, 06:41:05 (25 hours ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/tests.py
r18043 r18131 76 76 # 250 gateway charge have been added 77 77 payment = self.student['payments'][self.value] 78 self.assertEqual(payment.amount_auth, 7 250)78 self.assertEqual(payment.amount_auth, 7800) 79 79 self.assertEqual(payment.net_amt, 7000) 80 80 self.assertTrue( 81 '<input type="hidden" name="amount" value="7 25000" />' in81 '<input type="hidden" name="amount" value="780000" />' in 82 82 self.browser.contents) 83 83 # WAeAC charge have been substracted … … 90 90 91 91 def test_interswitch_required_combi(self): 92 configuration = createObject('waeup.SessionConfiguration') 93 configuration.academic_session = 2025 94 self.app['configuration'].addSessionConfiguration(configuration) 92 95 # Student is a fresh non-science student 93 96 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 97 self.student['studycourse'].current_session = 2025 98 self.student['studycourse'].entry_session = 2025 94 99 self.browser.open(self.payments_path) 95 100 IWorkflowState(self.student).setState('cleared') … … 102 107 self.browser.getControl(name="form.p_category").value = ['required_combi'] 103 108 self.browser.getControl("Create payment").click() 104 self.assertTrue(' Student Health Insuranceundefined.' in self.browser.contents)105 self.app['configuration']['20 04'].registration_fresh_fee = 10000.0106 self.app['configuration']['20 04'].book_fee = 10000.0107 self.app['configuration']['20 04'].develop_fee = 10000.0108 self.app['configuration']['20 04'].parentsconsult_fee = 10000.0109 self.app['configuration']['20 04'].municipal_fresh_fee = 10000.0110 self.app['configuration']['20 04'].matric_fee = 10000.0111 self.app['configuration']['20 04'].waecneco_fee = 10000.0112 self.app['configuration']['20 04'].jambver_fee = 10000.0113 self.app['configuration']['20 04'].health_insurance_fee = 10000.0114 self.app['configuration']['20 04'].id_card_fee = 10000.0115 self.app['configuration']['20 04'].medical_screening_fee = 10000.0109 self.assertTrue('undefined.' in self.browser.contents) 110 self.app['configuration']['2025'].registration_fresh_fee = 10000.0 111 self.app['configuration']['2025'].book_fee = 10000.0 112 self.app['configuration']['2025'].develop_fee = 10000.0 113 self.app['configuration']['2025'].parentsconsult_fee = 10000.0 114 self.app['configuration']['2025'].municipal_fresh_fee = 10000.0 115 self.app['configuration']['2025'].matric_fee = 10000.0 116 self.app['configuration']['2025'].waecneco_fee = 10000.0 117 self.app['configuration']['2025'].jambver_fee = 10000.0 118 self.app['configuration']['2025'].health_insurance_fee = 10000.0 119 self.app['configuration']['2025'].id_card_fee = 10000.0 120 self.app['configuration']['2025'].medical_screening_fee = 10000.0 116 121 self.browser.getControl(name="form.p_category").value = ['required_combi'] 117 122 self.browser.getControl("Create payment").click() … … 130 135 # 250 gateway charge have been added 131 136 payment = self.student['payments'][self.value] 132 self.assertEqual(payment.amount_auth, 110 250)137 self.assertEqual(payment.amount_auth, 110800) 133 138 self.assertEqual(payment.net_amt, 110000) 134 139 self.assertTrue( 135 '<input type="hidden" name="amount" value="110 25000" />' in140 '<input type="hidden" name="amount" value="11080000" />' in 136 141 self.browser.contents) 137 142 self.assertTrue( … … 139 144 self.browser.contents) 140 145 self.assertTrue( 141 'item_id="12" item_name="parentsconsult" item_amt="1000000" bank_id="117" acct_num="1 228747029"' in146 'item_id="12" item_name="parentsconsult" item_amt="1000000" bank_id="117" acct_num="1012355544"' in 142 147 self.browser.contents) 143 148 … … 160 165 # 250 gateway charge have been added 161 166 self.assertTrue( 162 '<input type="hidden" name="amount" value="1 25000" />' in163 self.browser.contents) 164 self.assertEqual(acc_payment.amount_auth, 1 250)167 '<input type="hidden" name="amount" value="180000" />' in 168 self.browser.contents) 169 self.assertEqual(acc_payment.amount_auth, 1800) 165 170 self.assertEqual(acc_payment.net_amt, 1000) 166 171 delta = timedelta(days=8) -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/utils.py
r18122 r18131 200 200 rp = self._collect_required_payment_items(student) 201 201 cats_missing = deepcopy(rp) 202 combi_cats = getUtility(IKofaUtils).COMBI_PAYMENT_CATEGORIES 202 203 if len(student['payments']): 203 204 for category in rp.keys(): … … 205 206 if ticket.p_state == 'paid' and \ 206 207 ticket.p_category == category and \ 208 ticket.p_session == session: 209 del cats_missing[category] 210 elif ticket.p_state == 'paid' and \ 211 ticket.p_category == 'combi' and \ 212 combi_cats[category] in ticket.p_item and \ 207 213 ticket.p_session == session: 208 214 del cats_missing[category] -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/utils/utils.py
r18034 r18131 286 286 _COMBI_PAYMENT_CATEGORIES = { 287 287 #'registration': 'Registration Fee', 288 'registration_fresh': 'Registration Fee (Fresh)', 289 'registration_return': 'Registration Fee (Returning)', 290 'grad_clearance': 'Clearance Fee', 288 ## sundry: 'registration_fresh': 'Registration Fee (Fresh)', 289 ## sundry: 'registration_return': 'Registration Fee (Returning)', 290 ## sundry: 'grad_clearance': 'Clearance Fee', 291 ## sundry: 'science': 'Science Bench Fee', 292 ## sundry: 'medical_screening':'Medical Screening Fees', 293 ## sundry: 'municipal_fresh': 'Municipal Fee (Fresh Students)', 294 ## sundry: 'municipal_returning': 'Municipal Fee (Returning Students)', 295 ## sundry: 'alumni': 'Alumni Fee', 296 ## sundry: 'conv': 'Convocation Fee', 297 ## sundry: 'matric': 'Matriculation Fee', 298 ## sundry: 'waecneco': 'WAEC/NECO Verification', 299 ## sundry: 'jambver': 'JAMB Verification', 300 ## sundry: 'book': 'Book Deposit', 301 ## sundry: 'parentsconsult': 'Parents Consultative Forum (PCF) Fee', 302 ## sundry: 'id_card': 'Student ID Card', 303 ## sundry: 'develop': 'Development Fee', 304 ## sundry: 'health_insurance': 'Student Health Insurance', 305 'clinical': 'Clinical Fee (Medical Students)', 291 306 'late_registration': 'Late Registration Fee', 292 'science': 'Science Bench Fee',293 'clinical': 'Clinical Fee (Medical Students)',294 'medical_screening':'Medical Screening Fees',295 'develop': 'Development Fee',296 'municipal_fresh': 'Municipal Fee (Fresh Students)',297 'municipal_returning': 'Municipal Fee (Returning Students)',298 'alumni': 'Alumni Fee',299 'conv': 'Convocation Fee',300 'matric': 'Matriculation Fee',301 'waecneco': 'WAEC/NECO Verification',302 'jambver': 'JAMB Verification',303 'book': 'Book Deposit',304 'parentsconsult': 'Parents Consultative Forum (PCF) Fee',305 307 'pharmlab': 'Pharmacy Lab Support Fee', 306 308 'lo_ident': 'Letter of Identification Fee', … … 309 311 'iuits': 'IUITS Fee', 310 312 'fine': 'Fine', 311 'id_card': 'Student ID Card',312 313 'pg_other': 'PG Other Charges', 313 314 'jupeb_form':'JUPEB Form Fee', … … 317 318 'jupeb_arts':'JUPEB Tuition (Arts)', 318 319 'jupeb_hostel':'JUPEB Accommodation (optional)', 319 'health_insurance': 'Student Health Insurance',320 320 } 321 321
Note: See TracChangeset for help on using the changeset viewer.