Ignore:
Timestamp:
30 Nov 2022, 14:35:10 (2 years ago)
Author:
Henrik Bettermann
Message:

Adjust to changes in base package.

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  
    277277        self.assertEqual(error, None)
    278278
    279         self.student['studycourse'].current_session = 2005
     279        self.app['hostels'].accommodation_session = 2005
    280280        error, payment = utils.setPaymentDetails('hostel_maintenance',self.student)
    281281        self.assertEqual(payment, None)
    282282        self.assertEqual(error, 'No bed space allocated.')
    283         self.student['studycourse'].current_session = 2004
     283        self.app['hostels'].accommodation_session = 2004
    284284
    285285        error, payment = utils.setPaymentDetails('hostel_maintenance',self.student)
     
    322322        self.assertEqual(payment.p_session, 2004)
    323323        self.assertEqual(payment.amount_auth, 150)
    324         self.assertEqual(payment.p_item, u'')
     324        self.assertEqual(payment.p_item, u'regular_male_fr')
    325325        self.assertEqual(error, None)
    326326
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py

    r17178 r17183  
    105105            amount = academic_session.gown_fee
    106106        elif category == 'bed_allocation':
     107            acco_details = self.getAccommodationDetails(student)
     108            p_session = acco_details['booking_session']
     109            p_item = acco_details['bt']
    107110            amount = academic_session.booking_fee
    108111        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)
    111115            if bedticket is not None and bedticket.bed is not None:
     116                p_session = booking_session
    112117                p_item = bedticket.bed_coordinates
    113118                if bedticket.bed.__parent__.maint_fee > 0:
Note: See TracChangeset for help on using the changeset viewer.