Index: WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py	(revision 827)
+++ WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py	(revision 828)
@@ -17,5 +17,8 @@
     return ''
 hall,block,room,letter = bed.split('_')
-hall_title = context.restrictedTraverse("%s/campus/getHallTitle" % 
-                         (context.portal_url.getPortalPath()))(hall)
+info = context.waeup_tool.getAccommodationInfo(bed)
+if info:
+    hall_title = info['hall_title']
+else:
+    hall_title = ""
 return " %s / Block %s / Room %s / Bed %s" % (hall_title,block,room,letter)
Index: WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py	(revision 827)
+++ WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py	(revision 828)
@@ -51,5 +51,6 @@
             info = context.getStudentInfo()
             student = info['student']
-            if info['review_state'] in ("student_created","admitted"):
+            if info['review_state'] in ("student_created","admitted") and\
+            wftool.getInfoFor(info['app'],'review_state',None) == 'created' :
                 #student.content_status_modify(workflow_action="enter_clearance_pin")
                 wftool.doActionFor(info['app'],'open')
Index: WAeUP_SRP/trunk/skins/waeup_student/accommodation_pin_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/accommodation_pin_form.pt	(revision 827)
+++ WAeUP_SRP/trunk/skins/waeup_student/accommodation_pin_form.pt	(revision 828)
@@ -24,6 +24,9 @@
             <li>Print the Hostel Allocation Slip.</li>
           </ul>
-          <ul tal:condition="python: mode == 'edit'">
-            <li>Buy a Hostel Maintainance Scratch Card.</li> 
+          <ul tal:condition="python: mode == 'edit'" 
+              tal:define="info python: context.getStudentInfo()">
+            <li>Buy a Hostel Maintainance Scratch Card 
+            (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for 
+            <span tal:replace="python: info['acco_doc'].acco_maint_fee" /></li> 
             <li>Enter the PIN above.</li>
             <li>Print the Hostel Allocation Slip.</li>
Index: WAeUP_SRP/trunk/skins/waeup_student/getMaintenancePrefix.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/getMaintenancePrefix.py	(revision 827)
+++ WAeUP_SRP/trunk/skins/waeup_student/getMaintenancePrefix.py	(revision 828)
@@ -12,12 +12,8 @@
 return the Prefix for hostel maintenance scratchcards
 """
-info = context.getStudentInfo()
-prefix = ""
-if not info['acco']:
-    return prefix
-bed = info['acco_doc'].bed
-hall,block,room,letter = bed.split('_')
-res = context.portal_catalog(portal_type="AccoHall",id=hall)
-if res and len(res) == 1:
-    prefix = res[0].getObject().getContent().maintenance_code
-return prefix
+s_info = context.getStudentInfo()
+if s_info.has_key('acco_doc'):
+    info = context.waeup_tool.getAccommodationInfo(s_info['acco_doc'].bed)
+    if info:
+        return info['maintenance_code']
+return ""
Index: WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py	(revision 827)
+++ WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py	(revision 828)
@@ -73,4 +73,7 @@
         student.invokeFactory('StudentAccommodation',acco_id)
         acco = getattr(student,acco_id)
+        acco_info = context.waeup_tool.getAccommodationInfo(bed)
+        ds.set('acco_maint_code', acco_info.get('maintenance_code'))
+        ds.set('acco_maint_fee', acco_info.get('maintenance_fee'))
         ds.set('acco_res_date', current)
         ds.set('bed', bed)
@@ -86,4 +89,2 @@
 wftool.doActionFor(acco,'pay_maintenance_fee',dest_container=acco)
 return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % student.absolute_url())
-
-
