Index: /main/waeup.custom/trunk/buildout-windows.cfg
===================================================================
--- /main/waeup.custom/trunk/buildout-windows.cfg	(revision 7020)
+++ /main/waeup.custom/trunk/buildout-windows.cfg	(revision 7021)
@@ -52,5 +52,5 @@
 # This creates only the paster script in bin/.
 recipe = zc.recipe.egg
-eggs = waeup.sirp
+eggs = waeup.custom
        z3c.evalexception>=2.0
        Paste
Index: /main/waeup.custom/trunk/src/waeup/custom/interfaces.py
===================================================================
--- /main/waeup.custom/trunk/src/waeup/custom/interfaces.py	(revision 7020)
+++ /main/waeup.custom/trunk/src/waeup/custom/interfaces.py	(revision 7021)
@@ -2,19 +2,13 @@
 ## interfaces.py
 from zope import schema
-from waeup.sirp.interfaces import IWAeUPObject, academic_sessions_vocab
+from waeup.sirp.interfaces import (
+    IWAeUPObject, ISessionConfiguration, academic_sessions_vocab)
 
-class ISessionConfiguration(IWAeUPObject):
+# It's recommended to replicate all fields from the base package here.
+class ISessionConfiguration(ISessionConfiguration):
     """A session configuration object.
     """
 
-    academic_session = schema.Choice(
-        title = u'Academic Session',
-        source = academic_sessions_vocab,
-        default = None,
-        required = True,
-        readonly = True
-        )
-
-    fee_1 = schema.Int(
+    school_fee_base = schema.Int(
         title = u'School Fee',
         default = 0,
@@ -31,4 +25,24 @@
         )
 
+    surcharge_3 = schema.Int(
+        title = u'Surcharge 3',
+        default = 0,
+        )
+
+    clearance = schema.Int(
+        title = u'Clearance Fee',
+        default = 0,
+        )
+
+    booking_fee = schema.Int(
+        title = u'Booking Fee',
+        default = 0,
+        )
+
+    maint_fee = schema.Int(
+        title = u'Maintenance Fee',
+        default = 0,
+        )
+
     gown = schema.Int(
         title = u'Gown Fee',
@@ -38,14 +52,4 @@
     transfer = schema.Int(
         title = u'Transfer Fee',
-        default = 0,
-        )
-
-    hostelmaintenance = schema.Int(
-        title = u'Hostel Maintenance Fee',
-        default = 0,
-        )
-
-    clearance = schema.Int(
-        title = u'Clearance Fee',
         default = 0,
         )
Index: /main/waeup.custom/trunk/src/waeup/custom/students/tests.py
===================================================================
--- /main/waeup.custom/trunk/src/waeup/custom/students/tests.py	(revision 7020)
+++ /main/waeup.custom/trunk/src/waeup/custom/students/tests.py	(revision 7021)
@@ -9,19 +9,12 @@
 
     def test_manage_payments(self):
+        # Add missing configuration data
+        self.app['configuration']['2004'].gown_fee = 150
+        self.app['configuration']['2004'].transfer_fee = 90
+        self.app['configuration']['2004'].clearance_fee = 120
+        self.app['configuration']['2004'].maint_fee = 180
 
         # Managers can add online payment tickets
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
-        self.browser.open(self.payments_student_path)
-        self.browser.getControl("Add online payment ticket").click()
-        self.browser.getControl("Create ticket").click()
-        self.assertMatches('...Session configuration object is not available...',
-                           self.browser.contents)
-
-        # Set up SessionConfiguration object
-        configuration = SessionConfiguration()
-        configuration.academic_session = 2004
-        configuration.fee_1 = 20000
-        self.app['configuration'].addSessionConfiguration(configuration)
-
         self.browser.open(self.payments_student_path)
         self.browser.getControl("Add online payment ticket").click()
@@ -43,5 +36,6 @@
                            self.browser.contents)
         self.browser.open(self.manage_student_path)
-        self.browser.getControl(name="transition").value = ['pay_first_school_fee']
+        self.browser.getControl(
+            name="transition").value = ['pay_first_school_fee']
         self.browser.getControl("Save").click()
         self.browser.getControl(name="transition").value = ['reset6']
@@ -58,5 +52,10 @@
         self.browser.getControl("Create ticket").click()
         self.browser.open(self.payments_student_path + '/addop')
-        self.browser.getControl(name="form.p_category").value = ['hostel_maintenance']
+        self.browser.getControl(
+            name="form.p_category").value = ['bed_allocation']
+        self.browser.getControl("Create ticket").click()
+        self.browser.open(self.payments_student_path + '/addop')
+        self.browser.getControl(
+            name="form.p_category").value = ['hostel_maintenance']
         self.browser.getControl("Create ticket").click()
         self.browser.open(self.payments_student_path + '/addop')
@@ -70,3 +69,12 @@
                            self.browser.contents)
 
+        # If the session configuration doesn't exist and error message will
+        # be shown
+        del self.app['configuration']['2004']
+        self.browser.open(self.payments_student_path)
+        self.browser.getControl("Add online payment ticket").click()
+        self.browser.getControl("Create ticket").click()
+        self.assertMatches('...Session configuration object is not...',
+                           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 7020)
+++ /main/waeup.custom/trunk/src/waeup/custom/students/utils.py	(revision 7021)
@@ -4,42 +4,42 @@
 
 def getPaymentDetails(category, student):
-
-    surcharge_1 = surcharge_2 = surcharge_3 = 0
-    p_item = u''
-    amount = 0
-    error = u''
-    p_session = student['studycourse'].current_session
-    session = str(p_session)
+    d = {}
+    d['surcharge_1'] = d['surcharge_2'] = d['surcharge_3'] = 0
+    d['p_item'] = u''
+    d['amount'] = 0
+    d['error'] = u''
+    d['p_session'] = student['studycourse'].current_session
+    session = str(d['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)
+        d['error'] = u'Session configuration object is not available.'
+        return d
     if category == 'transfer':
-        amount = academic_session.transfer
+        d['amount'] = academic_session.transfer_fee
     elif category == 'gown':
-        amount = academic_session.gown
+        d['amount'] = academic_session.gown_fee
+    elif category == 'bed_allocation':
+        d['amount'] = academic_session.booking_fee
     elif category == 'hostel_maintenance':
-        amount = academic_session.hostelmaintenance
+        d['amount'] = academic_session.maint_fee
     elif category == 'clearance':
-        p_item = student['studycourse'].certificate.code
-        amount = academic_session.clearance
+        d['p_item'] = student['studycourse'].certificate.code
+        d['amount'] = academic_session.clearance_fee
     elif category == 'schoolfee':
-        surcharge_1 = academic_session.surcharge_1
-        surcharge_2 = academic_session.surcharge_2
-        amount = getSchoolFee(student, surcharge_1 + surcharge_2)
+        d['surcharge_1'] = academic_session.surcharge_1
+        d['surcharge_2'] = academic_session.surcharge_2
+        d['amount'] = getSchoolFee(student, d['surcharge_1'] + d['surcharge_2'])
         code = student['studycourse'].certificate.code
         #session_string = academic_sessions_vocab.by_value[p_session + 1].title
-        p_item = code
-        p_session += 1
-    if amount ==0:
-        error = u'Amount could not be determined.'
-    return (amount, p_item, p_session,
-        surcharge_1, surcharge_2, surcharge_3, error)
+        d['p_item'] = code
+        d['p_session'] += 1
+    if d['amount'] == 0:
+        d['error'] = u'Amount could not be determined.'
+    return d
 
 def getSchoolFee(student, surcharge):
     study_mode = student['studycourse'].certificate.study_mode
-    entry_mode = student.entry_mode
+    entry_mode = student['studycourse'].entry_mode
     state = student.state
     #lga = student.lga
Index: /main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py	(revision 7020)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py	(revision 7021)
@@ -277,5 +277,5 @@
         )
 
-    fee_1 = schema.Int(
+    school_fee_base = schema.Int(
         title = u'School Fee',
         default = 0,
@@ -297,5 +297,5 @@
         )
 
-    fee_2 = schema.Int(
+    clearance = schema.Int(
         title = u'Clearance Fee',
         default = 0,
@@ -304,9 +304,4 @@
     booking_fee = schema.Int(
         title = u'Booking Fee',
-        default = 0,
-        )
-
-    maint_fee = schema.Int(
-        title = u'Maintenance Fee',
         default = 0,
         )
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py	(revision 7020)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py	(revision 7021)
@@ -34,7 +34,6 @@
     return
 
-# To be specified in customization packages, see also view which
+# To be specified in customization packages, see also the view which
 # calls the function.
-# This function is for demonstration and testing only.
 def getPaymentDetails(category, student):
     d = {}
@@ -53,9 +52,9 @@
     d['surcharge_3'] = academic_session.surcharge_3
     if category == 'schoolfee':
-        d['amount'] = academic_session.fee_1
+        d['amount'] = academic_session.school_fee_base
         d['p_item'] = student['studycourse'].certificate.code
     elif category == 'clearance':
         d['p_item'] = student['studycourse'].certificate.code
-        d['amount'] = academic_session.fee_2
+        d['amount'] = academic_session.clearance_fee
     elif category == 'bed_allocation':
         d['p_item'] = getAccommodationDetails(student)['bt']
@@ -63,7 +62,6 @@
     return d
 
-# To be specified in customization packages, see also view which
+# To be specified in customization packages, see also the view which
 # calls the function.
-# This function is for demonstration and testing only.
 def getAccommodationDetails(student):
     d = {}
