Index: main/waeup.fceokene/trunk/src/waeup/fceokene/browser/pages.py
===================================================================
--- main/waeup.fceokene/trunk/src/waeup/fceokene/browser/pages.py	(revision 9129)
+++ main/waeup.fceokene/trunk/src/waeup/fceokene/browser/pages.py	(revision 9143)
@@ -18,5 +18,7 @@
 import grok
 from waeup.kofa.browser.pages import (
-    SessionConfigurationAddFormPage, SessionConfigurationManageFormPage)
+    SessionConfigurationAddFormPage, SessionConfigurationManageFormPage,
+    CertificatePage, CertificateManageFormPage)
+from waeup.kofa.university.interfaces import ICertificate
 from waeup.fceokene.interfaces import (
     ICustomSessionConfiguration, ICustomSessionConfigurationAdd)
@@ -31,2 +33,14 @@
     """
     form_fields = grok.AutoFields(ICustomSessionConfiguration)
+
+class CustomCertificatePage(CertificatePage):
+    """Index page for certificates.
+    """
+    form_fields = grok.AutoFields(ICertificate).omit(
+        'school_fee_1', 'school_fee_2', 'school_fee_3', 'school_fee_4')
+
+class CustomCertificateManageFormPage(CertificateManageFormPage):
+    """Manage the properties of a `Certificate` instance.
+    """
+    form_fields = grok.AutoFields(ICertificate).omit(
+        'school_fee_1', 'school_fee_2', 'school_fee_3', 'school_fee_4')
Index: main/waeup.fceokene/trunk/src/waeup/fceokene/interfaces.py
===================================================================
--- main/waeup.fceokene/trunk/src/waeup/fceokene/interfaces.py	(revision 9129)
+++ main/waeup.fceokene/trunk/src/waeup/fceokene/interfaces.py	(revision 9143)
@@ -45,5 +45,5 @@
 
     clearance_fee = schema.Float(
-        title = _(u'Clearance Fee (ignored)'),
+        title = _(u'Clearance Fee'),
         default = 0.0,
         required = False,
Index: main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/tests.py
===================================================================
--- main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/tests.py	(revision 9129)
+++ main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/tests.py	(revision 9143)
@@ -59,5 +59,5 @@
                            self.browser.contents)
         self.assertMatches(
-            '...<span>40000.0</span>...',
+            '...<span>12495.0</span>...',
             self.browser.contents)
         self.payment_url = self.browser.url
@@ -82,8 +82,8 @@
                            self.browser.contents)
         self.assertMatches(
-            '...<input type="hidden" name="amount" value="4000000.0" />...',
+            '...<input type="hidden" name="amount" value="1249500.0" />...',
             self.browser.contents)
         self.assertMatches(
-            '...item_name="schoolfee" item_amt="3795000" bank_id="117" acct_num="6216801033"...',
+            '...item_name="schoolfee" item_amt="1044500" bank_id="117" acct_num="6216801033"...',
             self.browser.contents)
         self.assertMatches(
Index: main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py
===================================================================
--- main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py	(revision 9129)
+++ main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py	(revision 9143)
@@ -74,5 +74,5 @@
         self.app['configuration']['2004'].gown_fee = 150.0
         self.app['configuration']['2004'].transfer_fee = 90.0
-        #self.app['configuration']['2004'].clearance_fee = 120.0
+        self.app['configuration']['2004'].clearance_fee = 120.0
         self.app['configuration']['2004'].booking_fee = 150.0
         self.app['configuration']['2004'].maint_fee = 180.0
@@ -186,4 +186,5 @@
         self.app['configuration']['2004'].booking_fee = 150.0
         self.app['configuration']['2004'].maint_fee = 180.0
+        self.app['configuration']['2004'].clearance_fee = 120.0
         utils = getUtility(IStudentsUtils)
 
@@ -196,5 +197,5 @@
         self.assertEqual(payment.p_level, 100)
         self.assertEqual(payment.p_session, 2004)
-        self.assertEqual(payment.amount_auth, 40000.0)
+        self.assertEqual(payment.amount_auth, 12495.0)
         self.assertEqual(payment.p_item, u'CERT1')
         self.assertEqual(error, None)
@@ -202,7 +203,7 @@
         IWorkflowState(self.student).setState('returning')
         error, payment = utils.setPaymentDetails('schoolfee',self.student)
-        self.assertEqual(payment.p_level, 200)
-        self.assertEqual(payment.p_session, 2005)
-        self.assertEqual(payment.amount_auth, 20000.0)
+        self.assertEqual(payment.p_level, 100)
+        self.assertEqual(payment.p_session, 2004)
+        self.assertEqual(payment.amount_auth, 11545.0)
         self.assertEqual(payment.p_item, u'CERT1')
         self.assertEqual(error, None)
@@ -211,5 +212,5 @@
         self.assertEqual(payment.p_level, 100)
         self.assertEqual(payment.p_session, 2004)
-        self.assertEqual(payment.amount_auth, 34250.0)
+        self.assertEqual(payment.amount_auth, 120.0)
         self.assertEqual(payment.p_item, u'CERT1')
         self.assertEqual(error, None)
Index: main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
===================================================================
--- main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py	(revision 9129)
+++ main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py	(revision 9143)
@@ -22,4 +22,5 @@
 from kofacustom.nigeria.students.utils import NigeriaStudentsUtils
 from waeup.kofa.accesscodes import create_accesscode
+from waeup.kofa.interfaces import CLEARED, RETURNING
 from waeup.fceokene.interfaces import MessageFactory as _
 
@@ -73,13 +74,9 @@
             amount = academic_session.maint_fee
         elif category == 'clearance':
+            amount = academic_session.clearance_fee
             try:
                 p_item = student['studycourse'].certificate.code
             except (AttributeError, TypeError):
                 return _('Study course data are incomplete.'), None
-            if p_item in ('BEDCET', 'BIOEDCET', 'CHMEDCET', 'ISEDCET',
-                'MTHEDCET', 'PHYEDCET', 'ITECET', 'AGREDCET', 'HEEDCET'):
-                amount = 17250.0
-            else:
-                amount = 34250.0
         elif category == 'schoolfee':
             try:
@@ -88,17 +85,110 @@
             except (AttributeError, TypeError):
                 return _('Study course data are incomplete.'), None
-            if student.state == CLEARED:
-                amount = getattr(certificate, 'school_fee_1', 0.0)
-            elif student.state == RETURNING:
-                # In case of returning school fee payment the payment session
-                # and level contain the values of the session the student
-                # has paid for.
-                p_session, p_level = self.getReturningData(student)
-                amount = getattr(certificate, 'school_fee_2', 0.0)
-            elif student.is_postgrad and student.state == PAID:
-                # Returning postgraduate students also pay for the next session
-                # but their level always remains the same.
-                p_session += 1
-                amount = getattr(certificate, 'school_fee_2', 0.0)
+
+            # Very special school fee configuration, should be moved to
+            # a seperate file.
+
+            ARTS = ('CRS','ISS','HIS','MUS','ECO','GEO','POL','SOS','CCA','ECU',
+                    'THA','GED','GSE','PES','SPC','ENG','FRE','ARB','HAU','IGB',
+                    'YOR','NCRS','NISS','NHIS','NMUS','NECO','NGEO','NPOL',
+                    'NCCA','NECU','NTHA','NGED','NGSE','NPES','NSPC','NENG',
+                    'NFRE','NARB','NHAU','NIGB','NYOR','NSOS')
+
+            #PDE Students
+            if student.current_mode == 'pd_ft':
+                amount = 35000
+            elif not student.current_mode.endswith('_sw'):
+                # PRENCE
+                if student.current_level == 10 and student.state == CLEARED:
+                    if student.depcode in ARTS:
+                        amount = 14900
+                    else:
+                        amount = 15400
+                # NCE I fresh
+                elif student.current_level == 100 and student.state == CLEARED:
+                    if student.depcode in ARTS:
+                        amount = 12020
+                    else:
+                        amount = 12495
+                # NCE II
+                elif student.current_level in (100, 110, 120) and \
+                    student.state == RETURNING:
+                    if student.depcode in ARTS:
+                        amount = 11070
+                    else:
+                        amount = 11545
+                # NCE III
+                elif student.current_level in (200, 210, 220):
+                    if student.depcode in ARTS:
+                        amount = 11070
+                    else:
+                        amount = 11545
+                # NCE III repeater
+                elif student.current_level in (300, 310, 320) and \
+                    student.current_verdict == 'O':
+                    if student.depcode in ARTS:
+                        amount = 6535
+                    else:
+                        amount = 6773
+                # NCE III spillover
+                elif student.current_level in (300, 310, 320) and \
+                    student.current_verdict == 'B':
+                    if student.depcode in ARTS:
+                        amount = 9170
+                    else:
+                        amount = 9645
+                # NCE III second spillover
+                elif student.current_level in (400, 410, 420) and \
+                    student.current_verdict == 'B':
+                    if student.depcode in ARTS:
+                        amount = 9170
+                    else:
+                        amount = 9645
+            else:
+                if student.current_level == 100 and student.state == CLEARED:
+                    if student.depcode in ARTS:
+                        amount = 21900
+                    else:
+                        amount = 22400
+                # NCE II
+                elif student.current_level in (100, 110, 120) and \
+                    student.state == RETURNING:
+                    if student.depcode in ARTS:
+                        amount = 18400
+                    else:
+                        amount = 18900
+                # NCE III
+                elif student.current_level in (200, 210, 220):
+                    if student.depcode in ARTS:
+                        amount = 20400
+                    else:
+                        amount = 20900
+                # NCE IV
+                elif student.current_level in (300, 310, 320):
+                    if student.depcode in ARTS:
+                        amount = 18400
+                    else:
+                        amount = 18900
+                # NCE V
+                elif student.current_level in (400, 410, 420):
+                    if student.depcode in ARTS:
+                        amount = 18400
+                    else:
+                        amount = 18900
+                # NCE V spillover
+                elif student.current_level in (500, 510, 520) and \
+                    student.current_verdict == 'B':
+                    if student.depcode in ARTS:
+                        amount = 16900
+                    else:
+                        amount = 17400
+                # NCE V second spillover
+                elif student.current_level in (600, 610, 620) and \
+                    student.current_verdict == 'B':
+                    if student.depcode in ARTS:
+                        amount = 16900
+                    else:
+                        amount = 17400
+
         if amount in (0.0, None):
             return _(u'Amount could not be determined.'), None
@@ -117,5 +207,5 @@
         payment.p_session = p_session
         payment.p_level = p_level
-        payment.amount_auth = amount
+        payment.amount_auth = float(amount)
         return None, payment
 
