Index: main/waeup.custom/trunk/src/waeup/custom/students/browser.py
===================================================================
--- main/waeup.custom/trunk/src/waeup/custom/students/browser.py	(revision 6903)
+++ main/waeup.custom/trunk/src/waeup/custom/students/browser.py	(revision 6925)
@@ -20,8 +20,9 @@
             payment.surcharge_1,
             payment.surcharge_2,
-            payment.surcharge_3)  = getPaymentDetails(
+            payment.surcharge_3,
+            error)  = getPaymentDetails(
             data['p_category'],self.context.__parent__)
-        if payment.amount_auth == 0:
-            self.flash('Payment amount could not be determined.')
+        if error:
+            self.flash(error)
             self.redirect(self.url(self.context, u'@@manage'))
             return
Index: main/waeup.custom/trunk/src/waeup/custom/students/tests.py
===================================================================
--- main/waeup.custom/trunk/src/waeup/custom/students/tests.py	(revision 6903)
+++ main/waeup.custom/trunk/src/waeup/custom/students/tests.py	(revision 6925)
@@ -1,4 +1,5 @@
 from waeup.custom.testing import FunctionalLayer
 from waeup.sirp.students.tests.test_browser import StudentsFullSetup
+from waeup.custom.configuration import SessionConfiguration
 
 class StudentUITests(StudentsFullSetup):
@@ -8,4 +9,11 @@
 
     def test_manage_payments(self):
+
+        # Set up SessionConfiguration object
+        configuration = SessionConfiguration()
+        configuration.academic_session = 2004
+        configuration.fee_1 = 20000
+        self.app['configuration'].addSessionConfiguration(configuration)
+
         # Managers can add online payment tickets
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
@@ -14,5 +22,5 @@
         self.browser.getControl("Add online payment ticket").click()
         self.browser.getControl("Create ticket").click()
-        self.assertMatches('...amount could not be determined...',
+        self.assertMatches('...Amount could not be determined...',
                            self.browser.contents)
         self.browser.open(self.manage_student_path)
@@ -29,2 +37,11 @@
         self.assertMatches('...ticket created...',
                            self.browser.contents)
+        self.browser.open(self.manage_student_path)
+        self.browser.getControl(name="transition").value = ['pay_first_school_fee']
+        self.browser.getControl("Save").click()
+        self.browser.getControl(name="transition").value = ['reset6']
+        self.browser.getControl("Save").click()
+        self.browser.open(self.payments_student_path + '/addop')
+        self.browser.getControl("Create ticket").click()
+        self.assertMatches('...ticket created...',
+                           self.browser.contents)
Index: main/waeup.custom/trunk/src/waeup/custom/students/utils.py
===================================================================
--- main/waeup.custom/trunk/src/waeup/custom/students/utils.py	(revision 6903)
+++ main/waeup.custom/trunk/src/waeup/custom/students/utils.py	(revision 6925)
@@ -1,26 +1,41 @@
+from grok import getSite
 from waeup.sirp.students.vocabularies import academic_sessions_vocab
+from waeup.sirp.students.workflow import CLEARED, RETURNING
 
 def getPaymentDetails(category, student):
-    p_session = student['studycourse'].current_session
+
     surcharge_1 = surcharge_2 = surcharge_3 = 0
     p_item = u''
+    amount = 0
+    error = u''
+    p_session = student['studycourse'].current_session
+    session = str(p_session)
+    try:
+        academic_session = getSite()['configuration'][session]
+    except KeyError:
+        error = u'Session configuration object is not available.'
+        return (amount, p_item, p_session,
+            surcharge_1, surcharge_2, surcharge_3, error)
     if category == 'transfer':
-        amount = 500
+        amount = academic_session.transfer
     elif category == 'gown':
-        amount = 500
+        amount = academic_session.gown
     elif category == 'hostel_maintenance':
-        amount = 300
+        amount = academic_session.hostelmaintenance
     elif category == 'schoolfee':
-        surcharge_1 = 1500 # BT amount
-        surcharge_2 = 300 # Interswitch amount
+        surcharge_1 = academic_session.surcharge_1
+        surcharge_2 = academic_session.surcharge_2
         try:
             amount = getSchoolFee(student, surcharge_1 + surcharge_2)
             code = student['studycourse'].certificate.code
         except AttributeError:
-            return 0, None, None, 0, 0, 0
+            return 0, None, None, 0, 0, 0, 'School Fee could not be determined.'
         #session_string = academic_sessions_vocab.by_value[p_session + 1].title
         p_item = code
         p_session += 1
-    return amount, p_item, p_session, surcharge_1, surcharge_2, surcharge_3
+    if amount ==0:
+        error = u'Amount could not be determined.'
+    return (amount, p_item, p_session,
+        surcharge_1, surcharge_2, surcharge_3, error)
 
 def getSchoolFee(student, surcharge):
@@ -31,29 +46,12 @@
     lga = 'nothing'
     current_level = student['studycourse'].current_level
-    CLEARED = 'cleared'
 
     if study_mode.endswith('_ft'):
-        # fresh remedial
-        if current_level == 0 and state == CLEARED:
-            if entry_mode == 'rmd_ft':
-                return 80200 - surcharge
-            else:
-                return 74200 - surcharge
         # fresh
-        elif state == CLEARED:
-            if study_mode == 'jm_ft':
-                return 72700 - surcharge
-            elif lga == 'foreigner':
-                return 131500 - surcharge
-            else:
-                return 41500 - surcharge
+        if state == CLEARED:
+            return 40000 - surcharge
         # returning
-        elif state == 'returning':
-            if study_mode == 'jm_ft':
-                return 32500 - surcharge
-            elif lga == 'foreigner':
-                return 109500 - surcharge
-            else:
-                return 19500 - surcharge
+        elif state == RETURNING:
+            return 20000 - surcharge
         else:
             return 0
