Index: /main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py
===================================================================
--- /main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py	(revision 16622)
+++ /main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py	(revision 16623)
@@ -24,5 +24,6 @@
 from zope.formlib.textwidgets import BytesDisplayWidget
 from hurry.workflow.interfaces import IWorkflowInfo
-from waeup.kofa.interfaces import (REQUESTED, ADMITTED, CLEARANCE,
+from waeup.kofa.interfaces import (
+    REQUESTED, ADMITTED, CLEARANCE, REQUESTED, CLEARED,
     IExtFileStore, IKofaUtils, academic_sessions_vocab)
 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
@@ -269,4 +270,20 @@
         SF_PAYMENTS = ('schoolfee', 'schoolfee40', 'secondinstal', 'clearance')
         sf_paid = {cs-1: 0, cs: 0, cs+1: 0}
+        try:
+            certificate = self.context.student['studycourse'].certificate
+        except (AttributeError, TypeError):
+            return sf_paid, 0
+        try:
+            academic_session = grok.getSite()['configuration'][str(cs)]
+        except KeyError:
+            return sf_paid, 0
+        if self.context.student in (ADMITTED, CLEARANCE, REQUESTED, CLEARED):
+            total_sf = getattr(certificate, 'school_fee_1', 0.0)
+        else:
+            total_sf = getattr(certificate, 'school_fee_2', 0.0)
+        cfee = academic_session.clearance_fee
+        if self.context.student.is_postgrad:
+            cfee *= 0.5
+        total_sf += cfee
         for ticket in self.context.student['payments'].values():
             if ticket.p_category in SF_PAYMENTS and \
@@ -274,5 +291,5 @@
                 ticket.p_session in (cs-1, cs, cs+1):
                 sf_paid[ticket.p_session] += ticket.amount_auth
-        return sf_paid
+        return sf_paid, total_sf
 
 class StudentGetMatricNumberPage(UtilityView, grok.View):
Index: /main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser_templates/paymentsmanagepage.pt
===================================================================
--- /main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser_templates/paymentsmanagepage.pt	(revision 16622)
+++ /main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser_templates/paymentsmanagepage.pt	(revision 16623)
@@ -45,15 +45,19 @@
   <br /><br />
 
-  <table class="table" style="width: 33%;">
+  <table class="table" style="width: 50%;">
     <thead>
     <tr>
       <th i18n:translate="">Session</th>
-      <th i18n:translate="">Sum of Total School Fees Paid</th>
+      <th i18n:translate="">School Fees</th>
+      <th i18n:translate="">Sum Paid</th>
+      <th i18n:translate="">Amount Due</th>
     </tr>
     </thead>
     <tbody>
-      <tr tal:repeat="sfpm python: view.schoolfee_payments_made.items()">
+      <tr tal:repeat="sfpm python: view.schoolfee_payments_made[0].items()">
         <td tal:content ="python: sfpm[0]">YEAR</td>
+        <td tal:content ="python: view.schoolfee_payments_made[1]">TOTAL</td>
         <td tal:content ="python: sfpm[1]">AMOUNT</td>
+        <td tal:content ="python: view.schoolfee_payments_made[1]-sfpm[1]">DUE</td>
       </tr>
     </tbody>
