Changeset 9429


Ignore:
Timestamp:
26 Oct 2012, 19:57:19 (12 years ago)
Author:
Henrik Bettermann
Message:

Use bed coordinates as p_item of maintenance payments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r9423 r9429  
    362362        elif category == 'hostel_maintenance':
    363363            amount = academic_session.maint_fee
     364            bedticket = student['accommodation'].get(
     365                str(student.current_session), None)
     366            if bedticket:
     367                p_item = bedticket.bed_coordinates
     368            else:
     369                # Should not happen because this is already checked
     370                # in the browser module, but anyway ...
     371                portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
     372                p_item = trans(_('no bed allocated'), portal_language)
    364373        if amount in (0.0, None):
    365374            return _('Amount could not be determined.' +
Note: See TracChangeset for help on using the changeset viewer.