Index: main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 13771)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 13777)
@@ -633,4 +633,5 @@
         self.assertEqual(error, None)
 
+        self.certificate.study_mode = 'ug_ft'
         error, payment = utils.setPaymentDetails('bed_allocation',
             self.student, None, None)
@@ -645,4 +646,13 @@
         self.assertEqual(payment.amount_auth, 650.0) # plus 500 student union
         self.assertEqual(payment.p_item, u'regular_male_fr')
+        self.assertEqual(error, None)
+
+        self.certificate.study_mode = 'pg_ft'
+        error, payment = utils.setPaymentDetails('bed_allocation',
+            self.student, None, None)
+        self.assertEqual(payment.p_level, 100)
+        self.assertEqual(payment.p_session, 2004)
+        self.assertEqual(payment.amount_auth, 150.0) 
+        self.assertEqual(payment.p_item, u'pg_male_all')
         self.assertEqual(error, None)
 
Index: main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 13771)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 13777)
@@ -65,5 +65,5 @@
             else:
                 return _("Outside booking period.")
-        if student.current_mode != 'ug_ft':
+        if not student.is_postgrad and student.current_mode != 'ug_ft':
             return _("Only undergraduate full-time students are eligible to book accommodation.")
         bt = acc_details.get('bt')
@@ -77,5 +77,5 @@
                      'match accommodation session.')
         stage = bt.split('_')[2]
-        if stage != 'fr' and not student[
+        if not student.is_postgrad and stage != 'fr' and not student[
             'studycourse'].previous_verdict in ('A', 'B', 'F', 'J', 'C', 'Z'):
             return _("Your are not eligible to book accommodation.")
@@ -104,23 +104,27 @@
         if None in (entry_session, current_level, certificate):
             return d
-        end_level = certificate.end_level
-        if current_level == 10:
-            bt = 'pr'
-        elif entry_session == grok.getSite()['hostels'].accommodation_session:
-            bt = 'fr'
-        elif current_level >= end_level:
-            bt = 'fi'
-        else:
-            bt = 're'
         if student.sex == 'f':
             sex = 'female'
         else:
             sex = 'male'
-        special_handling = 'regular'
-        if student.faccode in ('MED', 'DEN'):
-            special_handling = 'clinical'
-        elif student.certcode in ('BARTMAS', 'BARTTHR', 'BARTFAA',
-                                  'BAEDFAA', 'BSCEDECHED'):
-            special_handling = 'ekenwan'
+        if student.is_postgrad:
+            bt = 'all'
+            special_handling = 'pg'
+        else:
+            end_level = certificate.end_level
+            if current_level == 10:
+                bt = 'pr'
+            elif entry_session == grok.getSite()['hostels'].accommodation_session:
+                bt = 'fr'
+            elif current_level >= end_level:
+                bt = 'fi'
+            else:
+                bt = 're'
+            special_handling = 'regular'
+            if student.faccode in ('MED', 'DEN'):
+                special_handling = 'clinical'
+            elif student.certcode in ('BARTMAS', 'BARTTHR', 'BARTFAA',
+                                      'BAEDFAA', 'BSCEDECHED'):
+                special_handling = 'ekenwan'
         d['bt'] = u'%s_%s_%s' % (special_handling,sex,bt)
         return d
@@ -194,17 +198,14 @@
             amount = academic_session.booking_fee
             # Add student union dues
-            stage = self.getAccommodationDetails(student)['bt']
-            stage = stage.split('_')[2]
-            #####################################################
-            #if stage == 'fi':
-            #    return _('Payment temporarily disabled.'), None
-            #####################################################
-            if stage == 'fr':
-                amount += 500.0
-            elif stage in ('fi', 're') and student[
-                'studycourse'].previous_verdict in ('A', 'B', 'F', 'J', 'C', 'Z'):
-                amount += 300.0
-            else:
-                amount = 0.0
+            if not student.is_postgrad:
+                stage = self.getAccommodationDetails(student)['bt']
+                stage = stage.split('_')[2]
+                if stage == 'fr':
+                    amount += 500.0
+                elif stage in ('fi', 're') and student[
+                    'studycourse'].previous_verdict in ('A', 'B', 'F', 'J', 'C', 'Z'):
+                    amount += 300.0
+                else:
+                    amount = 0.0
         elif category == 'hostel_maintenance':
             amount = 0.0
