Ignore:
Timestamp:
10 Nov 2006, 15:26:31 (18 years ago)
Author:
joachim
Message:

reenabled waeup_tool,
reserve accommodation fixed

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/accommodation_pin_form.pt

    r821 r828  
    2424            <li>Print the Hostel Allocation Slip.</li>
    2525          </ul>
    26           <ul tal:condition="python: mode == 'edit'">
    27             <li>Buy a Hostel Maintainance Scratch Card.</li>
     26          <ul tal:condition="python: mode == 'edit'"
     27              tal:define="info python: context.getStudentInfo()">
     28            <li>Buy a Hostel Maintainance Scratch Card
     29            (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for
     30            <span tal:replace="python: info['acco_doc'].acco_maint_fee" /></li>
    2831            <li>Enter the PIN above.</li>
    2932            <li>Print the Hostel Allocation Slip.</li>
  • WAeUP_SRP/trunk/skins/waeup_student/getMaintenancePrefix.py

    r805 r828  
    1212return the Prefix for hostel maintenance scratchcards
    1313"""
    14 info = context.getStudentInfo()
    15 prefix = ""
    16 if not info['acco']:
    17     return prefix
    18 bed = info['acco_doc'].bed
    19 hall,block,room,letter = bed.split('_')
    20 res = context.portal_catalog(portal_type="AccoHall",id=hall)
    21 if res and len(res) == 1:
    22     prefix = res[0].getObject().getContent().maintenance_code
    23 return prefix
     14s_info = context.getStudentInfo()
     15if s_info.has_key('acco_doc'):
     16    info = context.waeup_tool.getAccommodationInfo(s_info['acco_doc'].bed)
     17    if info:
     18        return info['maintenance_code']
     19return ""
  • WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py

    r821 r828  
    7373        student.invokeFactory('StudentAccommodation',acco_id)
    7474        acco = getattr(student,acco_id)
     75        acco_info = context.waeup_tool.getAccommodationInfo(bed)
     76        ds.set('acco_maint_code', acco_info.get('maintenance_code'))
     77        ds.set('acco_maint_fee', acco_info.get('maintenance_fee'))
    7578        ds.set('acco_res_date', current)
    7679        ds.set('bed', bed)
     
    8689wftool.doActionFor(acco,'pay_maintenance_fee',dest_container=acco)
    8790return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % student.absolute_url())
    88 
    89 
Note: See TracChangeset for help on using the changeset viewer.