Index: /main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py	(revision 9863)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py	(revision 9864)
@@ -30,6 +30,6 @@
 
 class PaymentCategorySource(ContextualDictSourceFactoryBase):
-    """A application category source delivers all special handling categories
-    provided for accommodation booking.
+    """A payment category source delivers all categories of payments.
+
     """
     #: name of dict to deliver from kofa utils.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9863)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 9864)
@@ -71,5 +71,5 @@
     IStudentAccommodation, IStudentStudyLevel,
     ICourseTicket, ICourseTicketAdd, IStudentPaymentsContainer,
-    IStudentOnlinePayment, IStudentPreviousPayment,
+    IStudentOnlinePayment, IStudentPreviousPayment, IStudentBalancePayment,
     IBedTicket, IStudentsUtils, IStudentRequestPW
     )
@@ -1479,8 +1479,6 @@
     grok.context(IStudentPaymentsContainer)
     grok.name('addpp')
-    grok.template('previouspaymentaddform')
     grok.require('waeup.payStudent')
-    form_fields = grok.AutoFields(IStudentPreviousPayment).select(
-        'p_category', 'p_session', 'p_level')
+    form_fields = grok.AutoFields(IStudentPreviousPayment)
     label = _('Add previous session online payment')
     pnav = 4
@@ -1508,4 +1506,43 @@
         error, payment = students_utils.setPaymentDetails(
             p_category, student, previous_session, previous_level)
+        if error is not None:
+            self.flash(error)
+            return
+        self.context[payment.p_id] = payment
+        self.flash(_('Payment ticket created.'))
+        self.redirect(self.url(self.context))
+        return
+
+    @action(_('Cancel'), validator=NullValidator)
+    def cancel(self, **data):
+        self.redirect(self.url(self.context))
+
+class BalancePaymentAddFormPage(KofaAddFormPage):
+    """ Page to add an online payment ticket for balance sessions
+    """
+    grok.context(IStudentPaymentsContainer)
+    grok.name('addbp')
+    grok.require('waeup.payStudent')
+    form_fields = grok.AutoFields(IStudentBalancePayment)
+    label = _('Add balance')
+    pnav = 4
+
+    @property
+    def selectable_categories(self):
+        categories = getUtility(
+            IKofaUtils).SELECTABLE_BALANCE_PAYMENT_CATEGORIES
+        return sorted(categories.items())
+
+    @action(_('Create ticket'), style='primary')
+    def createTicket(self, **data):
+        balance_item = data.get('balance_item', None)
+        balance_session = data.get('balance_session', None)
+        balance_level = data.get('balance_level', None)
+        balance_amount = data.get('balance_amount', None)
+        student = self.context.__parent__
+        students_utils = getUtility(IStudentsUtils)
+        error, payment = students_utils.setBalanceDetails(
+            balance_item, student, balance_session,
+            balance_level, balance_amount)
         if error is not None:
             self.flash(error)
Index: in/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/previouspaymentaddform.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/previouspaymentaddform.pt	(revision 9863)
+++ 	(revision )
@@ -1,14 +1,0 @@
-<form action="." tal:attributes="action request/URL" method="post"
-      enctype="multipart/form-data">
-
-  <table class="form-table">
-    <tbody>
-      <tal:widgets content="structure provider:widgets" />
-    </tbody>
-  </table>
-  <div tal:condition="view/availableActions">
-    <input tal:repeat="action view/actions"
-           tal:replace="structure action/render"
-           />
-  </div>
-</form>
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 9863)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 9864)
@@ -33,5 +33,19 @@
     IPaymentsContainer, IOnlinePayment)
 from waeup.kofa.university.vocabularies import (
-    CourseSource, StudyModeSource, CertificateSource, SemesterSource)
+    CourseSource, StudyModeSource, CertificateSource, SemesterSource,
+    ContextualDictSourceFactoryBase)
+
+class PreviousPaymentCategorySource(ContextualDictSourceFactoryBase):
+    """A source that delivers all selectable categories of previous session
+    payments.
+    """
+    #: name of dict to deliver from kofa utils.
+    DICT_NAME = 'PREVIOUS_PAYMENT_CATEGORIES'
+
+class BalancePaymentItemSource(ContextualDictSourceFactoryBase):
+    """A source that delivers all selectable items of balance payments.
+    """
+    #: name of dict to deliver from kofa utils.
+    DICT_NAME = 'BALANCE_PAYMENT_ITEMS'
 
 # VerdictSource can't be placed into the vocabularies module because it
@@ -727,8 +741,15 @@
     'p_session'].order
 
-class IStudentPreviousPayment(IOnlinePayment):
+class IStudentPreviousPayment(IKofaObject):
     """An interface for adding previous session payments.
 
     """
+
+    p_category = schema.Choice(
+        title = _(u'Payment Category'),
+        default = u'schoolfee',
+        source = PreviousPaymentCategorySource(),
+        required = True,
+        )
 
     p_session = schema.Choice(
@@ -744,4 +765,37 @@
         )
 
+class IStudentBalancePayment(IKofaObject):
+    """An interface for adding balances.
+
+    """
+
+    balance_item = schema.Choice(
+        title = _(u'Payment Category'),
+        default = u'schoolfee',
+        required = True,
+        source = BalancePaymentItemSource(),
+        )
+
+    balance_session = schema.Choice(
+        title = _(u'Payment Session'),
+        source = academic_sessions_vocab,
+        required = True,
+        )
+
+    balance_level = schema.Choice(
+        title = _(u'Payment Level'),
+        source = StudyLevelSource(),
+        required = True,
+        )
+
+    balance_amount = schema.Float(
+        title = _(u'Balance Amount'),
+        default = 0.0,
+        required = True,
+        readonly = False,
+        description = _(
+            u'Balance in Naira '),
+        )
+
 class ICSVStudentExporter(ICSVExporter):
     """A regular ICSVExporter that additionally supports exporting
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 9863)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 9864)
@@ -421,4 +421,38 @@
         return None, payment
 
+    def setBalanceDetails(self, balance_item, student,
+            balance_session, balance_level, balance_amount):
+        """Create Payment object and set the payment data of a student for.
+
+        """
+        p_item = getUtility(IKofaUtils).BALANCE_PAYMENT_ITEMS[balance_item]
+        p_item = unicode(p_item)
+        p_session = balance_session
+        p_level = balance_level
+        p_current = False
+        amount = balance_amount
+        academic_session = self._getSessionConfiguration(p_session)
+        if academic_session == None:
+            return _(u'Session configuration object is not available.'), None
+        if amount in (0.0, None):
+            return _('Amount could not be determined.'), None
+        for key in student['payments'].keys():
+            ticket = student['payments'][key]
+            if ticket.p_state == 'paid' and\
+               ticket.p_category == 'balance' and \
+               ticket.p_item == p_item and \
+               ticket.p_session == p_session:
+                  return _('This type of payment has already been made.'), None
+        payment = createObject(u'waeup.StudentOnlinePayment')
+        timestamp = ("%d" % int(time()*10000))[1:]
+        payment.p_id = "p%s" % timestamp
+        payment.p_category = 'balance'
+        payment.p_item = p_item
+        payment.p_session = p_session
+        payment.p_level = p_level
+        payment.p_current = p_current
+        payment.amount_auth = amount
+        return None, payment
+
     def getAccommodationDetails(self, student):
         """Determine the accommodation data of a student.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py	(revision 9863)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py	(revision 9864)
@@ -163,5 +163,8 @@
     SELECTABLE_PAYMENT_CATEGORIES = PAYMENT_CATEGORIES
 
-    SELECTABLE_PREVIOUS_PAYMENT_CATEGORIES = SELECTABLE_PAYMENT_CATEGORIES
+    PREVIOUS_PAYMENT_CATEGORIES = SELECTABLE_PAYMENT_CATEGORIES
+
+    BALANCE_PAYMENT_ITEMS = SELECTABLE_PAYMENT_CATEGORIES
+    BALANCE_PAYMENT_ITEMS['balance'] = 'Balance'
 
     MODE_GROUPS = {
