Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 15319)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 15320)
@@ -189,4 +189,16 @@
                     installments += ticket.amount_auth
         return installments
+
+    def samePaymentMade(self, student, category, p_item, p_session):
+        if category == 'bed_allocation':
+            return False
+        for key in student['payments'].keys():
+            ticket = student['payments'][key]
+            if ticket.p_state == 'paid' and\
+               ticket.p_category == category and \
+               ticket.p_item == p_item and \
+               ticket.p_session == p_session:
+                  return True
+        return False
 
     def setPaymentDetails(self, category, student,
@@ -389,6 +401,5 @@
             category = 'hostel_maintenance'
         # Create ticket.
-        if category != 'bed_allocation' \
-            and self.samePaymentMade(student, category, p_item, p_session):
+        if self.samePaymentMade(student, category, p_item, p_session):
             return _('This type of payment has already been made.'), None
         if self._isPaymentDisabled(p_session, category, student):
