Index: WAeUP_SRP/trunk/skins/waeup_futminna/getAccommodationInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_futminna/getAccommodationInfo.py	(revision 3790)
+++ WAeUP_SRP/trunk/skins/waeup_futminna/getAccommodationInfo.py	(revision 3795)
@@ -58,45 +58,19 @@
 # customize from here
 
-
-new_states = ('cleared_and_validated',
-              'school_fee_paid',
-              'courses_registered',
-              'courses_validated',
-              )
-
-new = student_record.entry_session == session[0]
-arrived = student_record.session == session[0]
-
-level = None
-end_level = None
-previous = None
-
 try:
     level = int(student_record.level)
 except:
     logger.info('%s has invalid level %s' % (student_id,student_record.level))
-try:
-    end_level = int(student_record.end_level)
-except:
-    logger.info('%s has invalid end_level %s' % (student_id,student_record.end_level))
-try:
-    previous = int(student_record.session) == int(session[0]) - 1
-except:
-    logger.info('%s has invalid session %s' % (student_id,student_record.session))
+    info['acco'] = None
+    info['booking_allowed'] = False
+    info['student_status'] = ''
+    return info    
 
-if level is None or end_level is None or student_record.review_state == 'deactivated':
-    pass
-elif arrived:
-    if new:
-        booking_allowed = student_record.review_state in new_states
-    else:
-        #booking_allowed = not (level % 100)
-        booking_allowed = True
-elif previous:
-    booking_allowed = not student_record.verdict in ('I',)
-
-info['booking_allowed'] = booking_allowed
-if not booking_allowed:
+if review_state in ('cleared_and_validated','school_fee_paid','courses_registered', 'courses_validated',) and student_record.session == session[0]:
+    info['booking_allowed'] = True
+    info['online_payment'] = True
+else:
     info['acco'] = None
+    info['booking_allowed'] = False
     info['student_status'] = ''
     return info
@@ -106,5 +80,5 @@
 info['acco'] = acco
 info['acco_id'] = acco_id
-bt = 're'
+
 info['maintenance_paid'] = False
 if acco is not None:
@@ -112,11 +86,11 @@
     info['acco_review_state'] = wf.getInfoFor(acco,'review_state',None)
     info['maintenance_paid'] = info['acco_review_state'] == "maintenance_fee_paid"
-
 d = {}
 d['sex'] = 'male'
+d['bt'] = 'all'
 if student_record.sex:
     d['sex'] = 'female'
+
 info['sex']=d['sex']
-d['bt'] = 'all'
 student_status = "%(sex)s_%(bt)s" % d
 info['student_status'] = student_status
Index: WAeUP_SRP/trunk/skins/waeup_futminna/layout_student_acco_view_slip.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_futminna/layout_student_acco_view_slip.pt	(revision 3795)
+++ WAeUP_SRP/trunk/skins/waeup_futminna/layout_student_acco_view_slip.pt	(revision 3795)
@@ -0,0 +1,34 @@
+<!-- a layout_lib macro -->
+<!-- $Id: layout_student_acco_view_slip.pt 1316 2007-01-17 18:05:49Z henrik $ -->
+<metal:block define-macro="default_view"
+  tal:define="layout options/layout;
+              dm options/datastructure/getDataModel;
+              widgets python:context.getRenderedWidgets(layout);
+              fields python:('bed',
+                              'acco_res_date',
+                                 'acco_maint_pay_id', 
+                                 'acco_maint_fee',
+                                 'acco_maint_date',
+                                 )"
+                                 >
+  <table width="" cellpadding="2" cellspacing="0" summary="Form layout">
+    <tr tal:repeat="field fields">
+      <tal:block tal:define="cell python: widgets[field]">
+        <tal:block define="widget cell/widget">
+          <div tal:attributes="class cell/widget_css_class|string:label;
+            id python:widget.getHtmlWidgetId()+'_widget';">
+            <td width="180px" valign="top">
+             <span class="dlabel"
+                    tal:condition="widget/label"
+                    tal:content="widget/label">label</span>:
+            </td>
+            <td> 
+               <span tal:condition="cell" tal:content="structure cell/widget_rendered"></span>
+               <span tal:condition="not:cell/widget_rendered"> none </span>
+            </td>
+          </div>
+        </tal:block>
+      </tal:block>
+    </tr>
+  </table>
+</metal:block>
