Changeset 17182 for main/waeup.kofa/trunk/src
- Timestamp:
- 30 Nov 2022, 14:09:18 (2 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r17176 r17182 2267 2267 # The hostel_application payment category is temporarily used 2268 2268 # by Uniben. 2269 if p_category in (2270 'bed_allocation', 'hostel_application') and grok.getSite()[2271 'hostels'].accommodation_session - student[2272 2269 accommodation_session = grok.getSite()['hostels'].accommodation_session 2270 if p_category in ('bed_allocation', 'hostel_application') \ 2271 and accommodation_session - student[ 2272 'studycourse'].current_session > students_utils.ACCOMMODATION_SPAN: 2273 2273 self.flash( 2274 2274 _('Your current session does not allow ' + \ … … 2276 2276 return 2277 2277 if 'maintenance' in p_category: 2278 current_session = str(student['studycourse'].current_session) 2279 if not current_session in student['accommodation']: 2278 if str(accommodation_session) not in student['accommodation']: 2280 2279 self.flash(_('You have not yet booked accommodation.'), 2281 2280 type="warning") -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r17176 r17182 490 490 amount = academic_session.clearance_fee 491 491 elif category == 'bed_allocation': 492 p_item = self.getAccommodationDetails(student)['bt'] 492 acco_details = self.getAccommodationDetails(student) 493 p_session = acco_details['booking_session'] 494 p_item = acco_details['bt'] 493 495 amount = academic_session.booking_fee 494 496 elif category == 'hostel_maintenance': 495 497 amount = 0.0 496 b edticket = student['accommodation'].get(497 str(student.current_session), None)498 booking_session = grok.getSite()['hostels'].accommodation_session 499 bedticket = student['accommodation'].get(str(booking_session), None) 498 500 if bedticket is not None and bedticket.bed is not None: 501 p_session = booking_session 499 502 p_item = bedticket.bed_coordinates 500 503 if bedticket.bed.__parent__.maint_fee > 0:
Note: See TracChangeset for help on using the changeset viewer.