Ignore:
Timestamp:
13 Feb 2007, 14:14:44 (18 years ago)
Author:
joachim
Message:

more documentation

M profiles/default/schemas/acco_hall.xml
M profiles/default/schemas/schema.xsl
M profiles/default/workflows/waeup_student_wf/definition.xml
M profiles/default/layouts/layout.xsl
M profiles/default/layouts/acco_bed_booking.xml
M profiles/default/layouts/acco_hall.xml
M profiles/default/types/Student.xml
M profiles/default/types/AccoFolder.xml
M profiles/default/types/AccoHall.xml
M doc/srp_documentation.mm

reserved bed functionallity,
pay hostel-fee for reserved bed

D skins/waeup_student/reserve_accommodation.py
M skins/waeup_accommodation/book_reserved_bed.py
A skins/waeup_accommodation/reserve_accommodation.py

File:
1 moved

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_accommodation.py

    r1411 r1412  
    7777        pin = str(ds.get('acco_res_sc_pin'))
    7878        pa = context.portal_accommodation
    79         code,bed = pa.searchAndReserveBed(s_id,"%s" % (info['student_status']))
    80         #code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status')))
    81         if code == -1:
    82             return context.accommodation_pin_edit_form(rendered = res,
    83                                  psm = "%s" % bed,
    84                                  mode = mode,
    85                                  ds = ds,
    86                                  )
    87         elif code == -2:
    88             return context.accommodation_pin_edit_form(rendered = res,
    89                                  psm = "No bed available. Your category is already fully booked.",
    90                                  mode = mode,
    91                                  ds = ds,
    92                                  )
     79        already = pa(student=s_id)
     80        if not already:
     81            code,bed = pa.searchAndReserveBed(s_id,"%s" % (info['student_status']))
     82            #code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status')))
     83            if code == -1:
     84                return context.accommodation_pin_edit_form(rendered = res,
     85                                     psm = "%s" % bed,
     86                                     mode = mode,
     87                                     ds = ds,
     88                                     )
     89            elif code == -2:
     90                return context.accommodation_pin_edit_form(rendered = res,
     91                                     psm = "No bed available. Your category is already fully booked.",
     92                                     mode = mode,
     93                                     ds = ds,
     94                                     )
     95        else:
     96            bed = already[0].bed
    9397        student.invokeFactory('StudentAccommodation',acco_id)
    9498        acco = getattr(student,acco_id)
Note: See TracChangeset for help on using the changeset viewer.