Changeset 12566 for main/waeup.uniben/trunk/src/waeup
- Timestamp:
- 7 Feb 2015, 10:25:56 (10 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py
r11827 r12566 47 47 'pgpt': ['Postgraduate Part-Time Programmes', 'PG'], 48 48 'pgnew': ['New Postgraduate Programmes', 'NEWPG'], 49 'pgnewtwo': ['New Postgraduate Programmes (#2)', 'NEWPG'], 49 50 'pgext': ['Postgraduate Programmes (extended application)', 'PG'] 50 51 } -
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py
r11787 r12566 202 202 'item_name="BT Education"' in self.browser.contents) 203 203 204 # Create hostel application ticket 205 self.browser.open(self.payments_path + '/addop') 206 self.browser.getControl(name="form.p_category").value = ['hostel_application'] 207 self.browser.getControl("Create ticket").click() 208 ctrl = self.browser.getControl(name='val_id') 209 value = ctrl.options[3] 210 self.browser.getLink(value).click() 211 self.assertMatches( 212 '...<span>1000.0</span>...', 213 self.browser.contents) 214 self.student['payments'][value].approve() 215 204 216 # Create temp maint fee ticket 205 217 self.browser.open(self.payments_path + '/addop') … … 207 219 self.browser.getControl("Create ticket").click() 208 220 ctrl = self.browser.getControl(name='val_id') 209 value = ctrl.options[ 3]221 value = ctrl.options[4] 210 222 self.browser.getLink(value).click() 211 223 self.assertMatches( … … 224 236 self.browser.contents) 225 237 self.assertMatches( 226 '...<item_detail item_id="1" item_name="Hostel Maintenance Fee" item_amt="800000" bank_id="1 7" acct_num="0009598925" />...',238 '...<item_detail item_id="1" item_name="Hostel Maintenance Fee" item_amt="800000" bank_id="129" acct_num="0014419432" />...', 227 239 self.browser.contents) 228 240 self.assertFalse( … … 269 281 self.browser.getControl("Create ticket").click() 270 282 ctrl = self.browser.getControl(name='val_id') 271 value = ctrl.options[ 4]283 value = ctrl.options[5] 272 284 self.browser.getLink(value).click() 273 285 self.assertMatches( -
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r12122 r12566 249 249 name="form.p_category").value = ['tempmaint_1'] 250 250 self.browser.getControl("Create ticket").click() 251 self.assertMatches('...You have not yet paid the hostel application fee...', 252 self.browser.contents) 253 self.browser.open(self.payments_path + '/addop') 254 self.browser.getControl(name="form.p_category").value = ['hostel_application'] 255 self.browser.getControl("Create ticket").click() 256 self.assertMatches('...ticket created...', 257 self.browser.contents) 258 ha_ticket = self.student['payments'].values()[2] 259 ha_ticket.approve() 260 self.browser.open(self.payments_path + '/addop') 261 self.browser.getControl( 262 name="form.p_category").value = ['tempmaint_1'] 263 self.browser.getControl("Create ticket").click() 251 264 self.assertMatches('...ticket created...', 252 265 self.browser.contents) … … 579 592 self.assertEqual(error, None) 580 593 581 error, payment = utils.setPaymentDetails('hostel_maintenance', 594 #error, payment = utils.setPaymentDetails('hostel_maintenance', 595 # self.student, None, None) 596 #self.assertEqual(payment.p_level, 100) 597 #self.assertEqual(payment.p_session, 2004) 598 #self.assertEqual(payment.amount_auth, 180.0) 599 #self.assertEqual(payment.p_item, u'') 600 #self.assertEqual(error, None) 601 602 #error, payment = utils.setPaymentDetails('bed_allocation', 603 # self.student, None, None) 604 #self.assertEqual(payment.p_level, 100) 605 #self.assertEqual(payment.p_session, 2004) 606 #self.assertEqual(payment.amount_auth, 150.0) 607 #self.assertEqual(payment.p_item, u'') 608 #self.assertEqual(error, None) 609 610 error, payment = utils.setPaymentDetails('hostel_application', 582 611 self.student, None, None) 583 612 self.assertEqual(payment.p_level, 100) 584 613 self.assertEqual(payment.p_session, 2004) 585 self.assertEqual(payment.amount_auth, 1 80.0)614 self.assertEqual(payment.amount_auth, 1000.0) 586 615 self.assertEqual(payment.p_item, u'') 587 616 self.assertEqual(error, None) 588 617 589 error, payment = utils.setPaymentDetails('bed_allocation', 590 self.student, None, None) 591 self.assertEqual(payment.p_level, 100) 592 self.assertEqual(payment.p_session, 2004) 593 self.assertEqual(payment.amount_auth, 150.0) 594 self.assertEqual(payment.p_item, u'') 595 self.assertEqual(error, None) 618 payment.approve() 619 self.student['payments'][payment.p_id] = payment 596 620 597 621 error, payment = utils.setPaymentDetails('tempmaint_1', -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r11773 r12566 53 53 if ticket.p_state == 'paid' and \ 54 54 ticket.p_category == 'schoolfee' and \ 55 ticket.p_session == session: 56 return True 57 return False 58 59 def _hostelApplicationPaymentMade(self, student, session): 60 if len(student['payments']): 61 for ticket in student['payments'].values(): 62 if ticket.p_state == 'paid' and \ 63 ticket.p_category == 'hostel_application' and \ 55 64 ticket.p_session == session: 56 65 return True … … 93 102 elif category == 'gown': 94 103 amount = academic_session.gown_fee 95 elif category == 'bed_allocation': 96 amount = academic_session.booking_fee 97 elif category == 'hostel_maintenance': 98 amount = academic_session.maint_fee 99 elif category == 'tempmaint_1': 100 amount = 8150.0 101 elif category == 'tempmaint_2': 102 amount = 12650.0 103 elif category == 'tempmaint_3': 104 amount = 9650.0 104 #elif category == 'bed_allocation': 105 # amount = academic_session.booking_fee 106 #elif category == 'hostel_maintenance': 107 # amount = academic_session.maint_fee 108 elif category == 'hostel_application': 109 amount = 1000.0 110 elif category.startswith('tempmaint'): 111 if not self._hostelApplicationPaymentMade( 112 student, student.current_session): 113 return _( 114 'You have not yet paid the hostel application fee.'), None 115 if category == 'tempmaint_1': 116 amount = 8150.0 117 elif category == 'tempmaint_2': 118 amount = 12650.0 119 elif category == 'tempmaint_3': 120 amount = 9650.0 105 121 elif category == 'clearance': 106 122 p_item = student.certcode … … 196 212 elif category == 'schoolfee': 197 213 amount += academic_session.penalty_ug 198 # XXX: Obsolete in 2013199 214 if category.startswith('tempmaint'): 200 215 p_item = getUtility(IKofaUtils).PAYMENT_CATEGORIES[category] 201 216 p_item = unicode(p_item) 202 217 # Now we change the category because tempmaint payments 203 # will be obsolete in 2013218 # will be obsolete when Uniben returns to Kofa bed allocation. 204 219 category = 'hostel_maintenance' 205 220 # Create ticket. -
main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py
r12407 r12566 35 35 'cest': 'Part-Time, Diploma, Certificate', 36 36 'pg_new': 'Supplementary PG Application', 37 'pg_new2': 'Supplementary PG Application (#2)', 37 38 'dp_ft': 'Diploma Full-Time Programmes', 38 39 'pg': 'Postgraduate', … … 55 56 'schoolfee': 'School Fee', 56 57 'clearance': 'Acceptance Fee', 57 'bed_allocation': 'Bed Allocation Fee', 58 #'bed_allocation': 'Bed Allocation Fee', 59 'hostel_application': 'Hostel Application Fee', 58 60 'hostel_maintenance': 'Hostel Maintenance Fee', 59 61 'tempmaint_1': 'Hall 1-4 M/F Ekehuan', … … 70 72 'schoolfee': 'School Fee', 71 73 'clearance': 'Acceptance Fee', 74 'hostel_application': 'Hostel Application Fee', 72 75 'tempmaint_1': 'Hall 1-4 M/F Ekehuan Maintenance Fee', 73 76 'tempmaint_2': 'Hall 5 M/F Maintenance Fee',
Note: See TracChangeset for help on using the changeset viewer.