Ignore:
Timestamp:
6 Feb 2008, 19:58:33 (17 years ago)
Author:
Henrik Bettermann
Message:

self-healing function for none acco_maint_fee

This is still not the best solution because the cost attribute of the first HMU batch found is used in waeup_tool.getHallInfo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/reserve_accommodation.py

    r3119 r3120  
    4646    validate = REQUEST.has_key("cpsdocument_edit_button")
    4747    if info['maintenance_paid']:
     48        if not info['acco_doc'].acco_maint_fee:
     49            d_update = {}
     50            hall_info = context.waeup_tool.getHallInfo(info['acco_doc'].bed)
     51            d_update['acco_maint_fee'] = hall_info.get('maintenance_fee')
     52            wftool.doActionFor(info['acco'],'reserve_bed')
     53            info['acco_doc'].edit(mapping=d_update)
     54            wftool.doActionFor(info['acco'],'pay_maintenance_fee')
    4855        return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % info['acco'].absolute_url())
    4956    # elif info['online_payment']:
Note: See TracChangeset for help on using the changeset viewer.