Index: main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interfaces.py
===================================================================
--- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interfaces.py	(revision 10681)
+++ main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interfaces.py	(revision 10682)
@@ -59,5 +59,5 @@
 
     maint_fee = schema.Float(
-        title = _(u'Maintenance Fee (ignored)'),
+        title = _(u'Maintenance Fee (fallback)'),
         default = 0.0,
         required = False,
Index: main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
===================================================================
--- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py	(revision 10681)
+++ main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py	(revision 10682)
@@ -204,7 +204,7 @@
         self.assertMatches('...Amount Authorized...',
                            self.browser.contents)
-        # Maint fee is taken from the session configuration object
-        self.assertMatches(
-            '...<span>987.0</span>...',
+        # Maint fee is taken from the hostel object
+        self.assertMatches(
+            '...<span>876.0</span>...',
             self.browser.contents)
         self.payment_url = self.browser.url
@@ -223,8 +223,8 @@
             self.browser.contents)
         self.assertMatches(
-            '...<input type="hidden" name="amount" value="98700.0" />...',
-            self.browser.contents)
-        self.assertMatches(
-            '...item_name="Hostel Maintenance Fee" item_amt="68700" bank_id="31" acct_num="0039050937"...',
+            '...<input type="hidden" name="amount" value="87600.0" />...',
+            self.browser.contents)
+        self.assertMatches(
+            '...item_name="Hostel Maintenance Fee" item_amt="57600" bank_id="31" acct_num="0039050937"...',
             self.browser.contents)
 
Index: main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py
===================================================================
--- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py	(revision 10681)
+++ main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py	(revision 10682)
@@ -282,6 +282,14 @@
         self.assertEqual(payment.p_level, 100)
         self.assertEqual(payment.p_session, 2004)
+        self.assertEqual(payment.amount_auth, 876.0)
+        self.assertEqual(payment.p_item, u'My bed coordinates')
+        self.assertEqual(error, None)
+
+        self.app['hostels']['hall-1'].maint_fee = 0.0
+        error, payment = utils.setPaymentDetails('hostel_maintenance',self.student)
+        self.assertEqual(payment.p_level, 100)
+        self.assertEqual(payment.p_session, 2004)
         self.assertEqual(payment.amount_auth, 180.0)
-        self.assertEqual(payment.p_item, u'')
+        self.assertEqual(payment.p_item, u'My bed coordinates')
         self.assertEqual(error, None)
 
Index: main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py
===================================================================
--- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py	(revision 10681)
+++ main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py	(revision 10682)
@@ -178,5 +178,19 @@
             amount = academic_session.booking_fee
         elif category == 'hostel_maintenance':
-            amount = academic_session.maint_fee
+            amount = 0.0
+            bedticket = student['accommodation'].get(
+                str(student.current_session), None)
+            if bedticket:
+                p_item = bedticket.bed_coordinates
+                if bedticket.bed.__parent__.maint_fee > 0:
+                    amount = bedticket.bed.__parent__.maint_fee
+                else:
+                    # fallback
+                    amount = academic_session.maint_fee
+            else:
+                # Should not happen because this is already checked
+                # in the browser module, but anyway ...
+                portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
+                p_item = trans(_('no bed allocated'), portal_language)
         elif category == 'clearance':
             amount = academic_session.clearance_fee
