Changeset 9727 for main/waeup.uniben/trunk/src
- Timestamp:
- 27 Nov 2012, 10:05:02 (12 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py
r9713 r9727 268 268 xmldict['institution_bank_id'] = '7' 269 269 xmldict['institution_acct'] = '1003475516' 270 if self.context.p_category == 'gown':270 elif self.context.p_category == 'gown': 271 271 self.pay_item_id = '5704' 272 272 provider_amt = 0 273 273 xmldict['institution_bank_id'] = '7' 274 274 xmldict['institution_acct'] = '1016232382' 275 elif self.context.p_category.startswith('hostel_maintenance'): 276 self.pay_item_id = '5705' 277 provider_amt = 400 278 xmldict['institution_bank_id'] = '129' 279 xmldict['institution_acct'] = '0014414547' 275 280 276 281 xmldict['provider_amt'] = 100 * provider_amt -
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py
r9713 r9727 189 189 'item_name="BT Education"' in self.browser.contents) 190 190 191 # Create temp maint fee ticket 192 self.browser.open(self.payments_path + '/addop') 193 self.browser.getControl(name="form.p_category").value = ['tempmaint_1'] 194 self.browser.getControl("Create ticket").click() 195 ctrl = self.browser.getControl(name='val_id') 196 value = ctrl.options[4] 197 self.browser.getLink(value).click() 198 self.assertMatches( 199 '...<span>8550.0</span>...', 200 self.browser.contents) 201 # Manager can access InterswitchForm 202 self.browser.getLink("CollegePAY", index=0).click() 203 self.assertMatches('...<input type="hidden" name="pay_item_id" value="5705" />...', 204 self.browser.contents) 205 self.assertMatches('...Total Amount Authorized:...', 206 self.browser.contents) 207 self.assertMatches( 208 '...<input type="hidden" name="amount" value="855000.0" />...', 209 self.browser.contents) 210 self.assertMatches( 211 '...<item_detail item_id="1" item_name="Hostel Maint. Fee" item_amt="800000" bank_id="129" acct_num="0014414547" />...', 212 self.browser.contents) 213 self.assertMatches( 214 '...item_name="BT Education" item_amt="40000" bank_id="117" acct_num="1010764827"...', 215 self.browser.contents) 216 217 191 218 # @external_test 192 219 # def test_callback(self): -
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r9709 r9727 589 589 self.assertEqual(error, None) 590 590 591 error, payment = utils.setPaymentDetails('tempmaint_1', 592 self.student, None, None) 593 self.assertEqual(payment.p_level, 100) 594 self.assertEqual(payment.p_session, 2004) 595 self.assertEqual(payment.amount_auth, 8550.0) 596 self.assertEqual(payment.p_item, u'Hall 1-4 M/F Ekehuan') 597 self.assertEqual(error, None) 598 599 error, payment = utils.setPaymentDetails('tempmaint_2', 600 self.student, None, None) 601 self.assertEqual(payment.p_level, 100) 602 self.assertEqual(payment.p_session, 2004) 603 self.assertEqual(payment.amount_auth, 13050.0) 604 self.assertEqual(payment.p_item, u'Hall 5 M/F') 605 self.assertEqual(error, None) 606 607 error, payment = utils.setPaymentDetails('tempmaint_3', 608 self.student, None, None) 609 self.assertEqual(payment.p_level, 100) 610 self.assertEqual(payment.p_session, 2004) 611 self.assertEqual(payment.amount_auth, 10050.0) 612 self.assertEqual(payment.p_item, u'Clinical Hostel') 613 self.assertEqual(error, None) 614 591 615 error, payment = utils.setPaymentDetails('transfer', 592 616 self.student, None, None) -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r9570 r9727 100 100 elif category == 'hostel_maintenance': 101 101 amount = academic_session.maint_fee 102 elif category == 'tempmaint_1': 103 amount = 8550.0 104 elif category == 'tempmaint_2': 105 amount = 13050.0 106 elif category == 'tempmaint_3': 107 amount = 10050.0 102 108 elif category == 'clearance': 103 109 try: … … 192 198 elif category == 'schoolfee': 193 199 amount += academic_session.penalty_ug 200 # XXX: Obsolete in 2013 201 if category.startswith('tempmaint'): 202 p_item = getUtility(IKofaUtils).PAYMENT_CATEGORIES[category] 203 p_item = unicode(p_item) 204 # Now we change the category because tempmaint payments 205 # will be obsolete in 2013 206 category = 'hostel_maintenance' 194 207 # Create ticket. 195 208 for key in student['payments'].keys(): -
main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py
r9655 r9727 45 45 'Postgraduate Part-Time':('pg_pt', 'special_pg_pt', 'pgd_pt'), 46 46 } 47 48 PAYMENT_CATEGORIES = { 49 'schoolfee': 'School Fee', 50 'clearance': 'Acceptance Fee', 51 'bed_allocation': 'Bed Allocation Fee', 52 'hostel_maintenance': 'Hostel Maint. Fee', 53 'tempmaint_1': 'Hall 1-4 M/F Ekehuan', 54 'tempmaint_2': 'Hall 5 M/F', 55 'tempmaint_3': 'Clinical Hostel', 56 'transfer': 'Transfer Fee', 57 'gown': 'Gown Hire Fee', 58 'application': 'Application Fee' 59 }
Note: See TracChangeset for help on using the changeset viewer.