Index: main/waeup.custom/trunk/src/waeup/custom/students/browser.py
===================================================================
--- main/waeup.custom/trunk/src/waeup/custom/students/browser.py	(revision 7150)
+++ 	(revision )
@@ -1,12 +1,0 @@
-import grok
-from time import time
-from zope.component import createObject
-from waeup.sirp.students.browser import OnlinePaymentAddFormPage
-from waeup.custom.students.utils import get_payment_details
-
-class OnlinePaymentAddFormPage(OnlinePaymentAddFormPage):
-    """ Page to add an online payment ticket
-    """
-
-    def get_payment_details(self, category, student):
-        return get_payment_details(category, student)
Index: main/waeup.custom/trunk/src/waeup/custom/students/utils.py
===================================================================
--- main/waeup.custom/trunk/src/waeup/custom/students/utils.py	(revision 7150)
+++ main/waeup.custom/trunk/src/waeup/custom/students/utils.py	(revision 7151)
@@ -1,59 +1,67 @@
-from grok import getSite
+import grok
 from waeup.sirp.students.vocabularies import academic_sessions_vocab
 from waeup.sirp.students.workflow import CLEARED, RETURNING
+from waeup.sirp.students.utils import StudentsUtils
+from waeup.sirp.students.interfaces import IStudentsUtils
 
-def get_payment_details(category, student):
-    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:
-        d['error'] = u'Session configuration object is not available.'
+class StudentsUtils(StudentsUtils):
+    """A collection of customized methods.
+
+    """
+    grok.implements(IStudentsUtils)
+
+    def get_payment_details(self, category, student):
+        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 = grok.getSite()['configuration'][session]
+        except KeyError:
+            d['error'] = u'Session configuration object is not available.'
+            return d
+        if category == 'transfer':
+            d['amount'] = academic_session.transfer_fee
+        elif category == 'gown':
+            d['amount'] = academic_session.gown_fee
+        elif category == 'bed_allocation':
+            d['amount'] = academic_session.booking_fee
+        elif category == 'hostel_maintenance':
+            d['amount'] = academic_session.maint_fee
+        elif category == 'clearance':
+            d['p_item'] = student['studycourse'].certificate.code
+            d['amount'] = academic_session.clearance_fee
+        elif category == 'schoolfee':
+            d['surcharge_1'] = academic_session.surcharge_1
+            d['surcharge_2'] = academic_session.surcharge_2
+            d['amount'] = self.getSchoolFee(student, d['surcharge_1'] + d['surcharge_2'])
+            code = student['studycourse'].certificate.code
+            #session_string = academic_sessions_vocab.by_value[p_session + 1].title
+            d['p_item'] = code
+            d['p_session'] += 1
+        if d['amount'] == 0:
+            d['error'] = u'Amount could not be determined.'
         return d
-    if category == 'transfer':
-        d['amount'] = academic_session.transfer_fee
-    elif category == 'gown':
-        d['amount'] = academic_session.gown_fee
-    elif category == 'bed_allocation':
-        d['amount'] = academic_session.booking_fee
-    elif category == 'hostel_maintenance':
-        d['amount'] = academic_session.maint_fee
-    elif category == 'clearance':
-        d['p_item'] = student['studycourse'].certificate.code
-        d['amount'] = academic_session.clearance_fee
-    elif category == 'schoolfee':
-        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
-        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['studycourse'].entry_mode
-    state = student.state
-    #lga = student.lga
-    lga = 'nothing'
-    current_level = student['studycourse'].current_level
+    def getSchoolFee(self, student, surcharge):
+        study_mode = student['studycourse'].certificate.study_mode
+        entry_mode = student['studycourse'].entry_mode
+        state = student.state
+        #lga = student.lga
+        lga = 'nothing'
+        current_level = student['studycourse'].current_level
 
-    if study_mode.endswith('_ft'):
-        # fresh
-        if state == CLEARED:
-            return 40000 - surcharge
-        # returning
-        elif state == RETURNING:
-            return 20000 - surcharge
+        if study_mode.endswith('_ft'):
+            # fresh
+            if state == CLEARED:
+                return 40000 - surcharge
+            # returning
+            elif state == RETURNING:
+                return 20000 - surcharge
+            else:
+                return 0
         else:
             return 0
-    else:
-        return 0
