Index: /main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/utils.py
===================================================================
--- /main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/utils.py	(revision 15743)
+++ /main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/utils.py	(revision 15744)
@@ -122,8 +122,8 @@
                             ), None
                     amount = getattr(certificate, 'school_fee_2', 0.0)
-            if category == 'schoolfee40':
-                amount = 0.4*amount + 0.6*GATEWAY_AMT
-            elif category == 'secondinstal':
-                amount = 0.6*amount + 0.4*GATEWAY_AMT
+                if amount and category == 'schoolfee40':
+                    amount = 0.4*amount + 0.6*GATEWAY_AMT
+                elif amount and category == 'secondinstal':
+                    amount = 0.6*amount + 0.4*GATEWAY_AMT
         elif category == 'clearance':
             try:
