Changeset 13616 for main/waeup.fceokene/trunk/src
- Timestamp:
- 15 Jan 2016, 09:32:50 (9 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/tests.py
r13459 r13616 167 167 self.browser.contents) 168 168 self.assertTrue( 169 '<span> 4150.0</span>' in self.browser.contents)169 '<span>1026.0</span>' in self.browser.contents) 170 170 # p_item is not unveiled 171 171 self.assertFalse('Hall 1, Block A, Room 101, Bed A' … … 188 188 self.browser.contents) 189 189 self.assertTrue( 190 '<input type="hidden" name="amount" value=" 415000" />'191 in self.browser.contents) 192 self.assertTrue( 193 'item_name="Hostel Maintenance Fee" item_amt=" 400000" bank_id="117" acct_num="1013780934"'190 '<input type="hidden" name="amount" value="102600" />' 191 in self.browser.contents) 192 self.assertTrue( 193 'item_name="Hostel Maintenance Fee" item_amt="87600" bank_id="117" acct_num="1013780934"' 194 194 in self.browser.contents) 195 195 # BT does nor charge a fee for maintenance fee -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py
r13614 r13616 275 275 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) 276 276 self.assertEqual(payment, None) 277 self.assertEqual(error, ' You have not yet booked accommodation.')277 self.assertEqual(error, 'No bed space allocated.') 278 278 self.student['studycourse'].current_session = 2004 279 279 … … 281 281 self.assertEqual(payment.p_level, 100) 282 282 self.assertEqual(payment.p_session, 2004) 283 self.assertEqual(payment.amount_auth, 4150.0)283 self.assertEqual(payment.amount_auth, 1026.0) 284 284 self.assertEqual(payment.p_item, u'My bed coordinates') 285 285 self.assertEqual(error, None) … … 296 296 self.assertEqual(payment.p_level, 100) 297 297 self.assertEqual(payment.p_session, 2004) 298 self.assertEqual(payment.amount_auth, 2650.0)298 self.assertEqual(payment.amount_auth, 697.5) # 62.5% * 876 + 150 299 299 self.assertEqual(payment.p_item, u'My bed coordinates') 300 300 self.assertEqual(error, None) -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
r13614 r13616 100 100 if bedticket is not None and bedticket.bed is not None: 101 101 p_item = bedticket.bed_coordinates 102 if bedticket.bed.__parent__.maint_fee > 0: 103 amount = bedticket.bed.__parent__.maint_fee 102 104 else: 103 return _(u'You have not yet booked accommodation.'), None 104 acc_details = self.getAccommodationDetails(student) 105 if current_session != acc_details['booking_session']: 106 return _(u'Current session does not match accommodation session.'), None 107 if student.current_mode.endswith('_sw') or student.current_mode == 'pd_ft': 108 amount = 2500.0 #removed interswitch fee 109 else: 110 amount = 4000.0 #removed interswitch fee 105 return _(u'No bed space allocated.'), None 106 if student.current_mode.endswith('_sw') \ 107 or student.current_mode == 'pd_ft': 108 amount *= 0.625 111 109 elif category == 'clearance': 112 110 amount = academic_session.clearance_fee
Note: See TracChangeset for help on using the changeset viewer.