Changeset 17183 for main/waeup.fceokene/trunk/src/waeup
- Timestamp:
- 30 Nov 2022, 14:35:10 (2 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py
r17069 r17183 277 277 self.assertEqual(error, None) 278 278 279 self. student['studycourse'].current_session = 2005279 self.app['hostels'].accommodation_session = 2005 280 280 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) 281 281 self.assertEqual(payment, None) 282 282 self.assertEqual(error, 'No bed space allocated.') 283 self. student['studycourse'].current_session = 2004283 self.app['hostels'].accommodation_session = 2004 284 284 285 285 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) … … 322 322 self.assertEqual(payment.p_session, 2004) 323 323 self.assertEqual(payment.amount_auth, 150) 324 self.assertEqual(payment.p_item, u' ')324 self.assertEqual(payment.p_item, u'regular_male_fr') 325 325 self.assertEqual(error, None) 326 326 -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
r17178 r17183 105 105 amount = academic_session.gown_fee 106 106 elif category == 'bed_allocation': 107 acco_details = self.getAccommodationDetails(student) 108 p_session = acco_details['booking_session'] 109 p_item = acco_details['bt'] 107 110 amount = academic_session.booking_fee 108 111 elif category == 'hostel_maintenance': 109 current_session = student['studycourse'].current_session 110 bedticket = student['accommodation'].get(str(current_session), None) 112 amount = 0.0 113 booking_session = grok.getSite()['hostels'].accommodation_session 114 bedticket = student['accommodation'].get(str(booking_session), None) 111 115 if bedticket is not None and bedticket.bed is not None: 116 p_session = booking_session 112 117 p_item = bedticket.bed_coordinates 113 118 if bedticket.bed.__parent__.maint_fee > 0:
Note: See TracChangeset for help on using the changeset viewer.