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 9459)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py	(revision 9513)
@@ -464,34 +464,33 @@
         self.assertEqual(error, None)
 
-        # In Uniben we have pg and special pg students.
-        # They pay the same but their workflow is different.
+        # In Uniben students can pay school fee in all states no matter
+        # if they are ug or pg students.
         IWorkflowState(self.student).setState('school fee paid')
+        self.certificate.study_mode = 'special_pg_pt'
         self.student.is_staff = False
         self.student.nationality = u'NG'
         self.certificate.school_fee_2 = 10000.0
+
         error, payment = utils.setPaymentDetails(
             'schoolfee', self.student, None, None)
-        self.assertEqual(payment, None)
-        self.assertTrue('not be determined' in error)
-        self.certificate.study_mode = 'pg_pt'
-        self.assertTrue(self.student.is_postgrad)
-        self.assertFalse(self.student.is_special_postgrad)
+        self.assertEqual(payment.p_level, None)
+        self.assertEqual(payment.p_session, 2005)
+        self.assertEqual(payment.amount_auth, 10000.0)
+        self.assertEqual(payment.p_item, u'CERT1')
+        self.assertEqual(error, None)
+
+        IWorkflowState(self.student).setState('courses registered')
         error, payment = utils.setPaymentDetails(
             'schoolfee', self.student, None, None)
-        self.assertEqual(payment.p_level, 100)
+        self.assertEqual(payment.p_level, None)
         self.assertEqual(payment.p_session, 2005)
         self.assertEqual(payment.amount_auth, 10000.0)
         self.assertEqual(payment.p_item, u'CERT1')
         self.assertEqual(error, None)
-        self.certificate.study_mode = 'special_pg_pt'
-        self.assertTrue(self.student.is_postgrad)
-        self.assertTrue(self.student.is_special_postgrad)
+
+        IWorkflowState(self.student).setState('courses validated')
         error, payment = utils.setPaymentDetails(
             'schoolfee', self.student, None, None)
-        self.assertTrue('not be determined' in error)
-        IWorkflowState(self.student).setState('returning')
-        error, payment = utils.setPaymentDetails(
-            'schoolfee', self.student, None, None)
-        self.assertEqual(payment.p_level, 200)
+        self.assertEqual(payment.p_level, None)
         self.assertEqual(payment.p_session, 2005)
         self.assertEqual(payment.amount_auth, 10000.0)
Index: main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 9459)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 9513)
@@ -21,5 +21,6 @@
 from reportlab.lib.styles import getSampleStyleSheet
 from reportlab.platypus import Paragraph, Image, Table, Spacer
-from waeup.kofa.interfaces import IKofaUtils, CLEARED, RETURNING, PAID
+from waeup.kofa.interfaces import (IKofaUtils,
+    CLEARED, RETURNING, PAID, REGISTERED, VALIDATED)
 from kofacustom.nigeria.students.utils import NigeriaStudentsUtils
 from waeup.kofa.accesscodes import create_accesscode
@@ -125,4 +126,19 @@
                     else:
                         amount = getattr(certificate, 'school_fee_1', 0.0)
+                elif student.state in (PAID, REGISTERED, VALIDATED):
+                    # Students are either postgraduate or are paying in advance.
+                    # Both are paying for next session.
+                    p_session += 1
+                    # We don't know which level the student is paying for.
+                    p_level = None
+                    try:
+                        academic_session = grok.getSite()[
+                            'configuration'][str(p_session)]
+                    except KeyError:
+                        return _(u'Session configuration object is not available.'), None
+                    if student.is_foreigner:
+                        amount = getattr(certificate, 'school_fee_4', 0.0)
+                    else:
+                        amount = getattr(certificate, 'school_fee_2', 0.0)
                 elif student.state == RETURNING:
                     # In case of returning school fee payment the payment session
@@ -130,8 +146,4 @@
                     # has paid for.
                     p_session, p_level = self.getReturningData(student)
-                    if student.is_foreigner:
-                        amount = getattr(certificate, 'school_fee_4', 0.0)
-                    else:
-                        amount = getattr(certificate, 'school_fee_2', 0.0)
                     try:
                         academic_session = grok.getSite()[
@@ -139,18 +151,8 @@
                     except KeyError:
                         return _(u'Session configuration object is not available.'), None
-                elif student.state == PAID  and student.is_postgrad and \
-                    not student.is_special_postgrad:
-                    # Regular returning postgraduate students also pay 
-                    # for the next session but their level always remains the same.
-                    p_session += 1
                     if student.is_foreigner:
                         amount = getattr(certificate, 'school_fee_4', 0.0)
                     else:
                         amount = getattr(certificate, 'school_fee_2', 0.0)
-                    try:
-                        academic_session = grok.getSite()[
-                            'configuration'][str(p_session)]
-                    except KeyError:
-                        return _(u'Session configuration object is not available.'), None
             # Give 50% school fee discount to staff members.
             if student.is_staff:
