Index: main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/utils.py
===================================================================
--- main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/utils.py	(revision 17095)
+++ main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/utils.py	(revision 17107)
@@ -80,36 +80,36 @@
                 # workflow states.  Fresh students are excluded by the
                 # update method of the PreviousPaymentAddFormPage.
-                amount = getattr(certificate, 'school_fee_1', 0.0)
+                amount = getattr(certificate, 'school_fee_2', 0.0)
             else:
+                if student.state == CLEARED:
+                    amount = getattr(certificate, 'school_fee_1', 0.0)
+                elif student.state == RETURNING:    
+                    amount = getattr(certificate, 'school_fee_2', 0.0)       
+                    # In case of returning school fee payment the
+                    # payment session and level contain the values of
+                    # the session the student has paid for. Payment
+                    # session is always next session.
+                    p_session, p_level = self.getReturningData(student)
+                    academic_session = self._getSessionConfiguration(p_session)
+                    if academic_session == None:
+                        return _(
+                            u'Session configuration object is not available.'
+                            ), None
+                elif student.is_postgrad and student.state == PAID:
+                    amount = getattr(certificate, 'school_fee_2', 0.0) 
+                    # Returning postgraduate students also pay for the
+                    # next session but their level always remains the
+                    # same.
+                    p_session += 1
+                    academic_session = self._getSessionConfiguration(p_session)
+                    if academic_session == None:
+                        return _(
+                            u'Session configuration object is not available.'
+                            ), None                    
+                    
                 if category == 'secondinstal':
-                    amount = 0.34 * getattr(certificate, 'school_fee_1', 0.0)
-                else:
-                    if student.state == CLEARED:
-                        amount = getattr(certificate, 'school_fee_1', 0.0)
-                    elif student.state == RETURNING:
-                        # In case of returning school fee payment the
-                        # payment session and level contain the values of
-                        # the session the student has paid for. Payment
-                        # session is always next session.
-                        p_session, p_level = self.getReturningData(student)
-                        academic_session = self._getSessionConfiguration(p_session)
-                        if academic_session == None:
-                            return _(
-                                u'Session configuration object is not available.'
-                                ), None
-                        amount = getattr(certificate, 'school_fee_1', 0.0)
-                    elif student.is_postgrad and student.state == PAID:
-                        # Returning postgraduate students also pay for the
-                        # next session but their level always remains the
-                        # same.
-                        p_session += 1
-                        academic_session = self._getSessionConfiguration(p_session)
-                        if academic_session == None:
-                            return _(
-                                u'Session configuration object is not available.'
-                                ), None
-                        amount = getattr(certificate, 'school_fee_1', 0.0)
-                    if category == 'schoolfee_1':
-                        amount *= 0.66
+                    amount *= 0.34
+                elif category == 'schoolfee_1':
+                    amount *= 0.66
         elif category == 'clearance':
             try:
