- Timestamp:
- 22 Mar 2019, 11:07:57 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/utils.py
r15344 r15361 92 92 req_payments = ('ict_entre', 'logbook_combo') 93 93 req_payments_titles = 'ICT and Logbook' 94 # All ND and HND part time do not pay for LOGBOOK 95 if student.current_mode.endswith('_pt'): 96 req_payments = ('ict_entre',) 97 req_payments_titles = 'ICT' 98 # HND1 and HND2 full time do not pay for LOGBOOK 99 elif student.current_mode == 'hnd_ft' and student.state in ( 100 CLEARED, RETURNING): 101 req_payments = ('ict_entre',) 102 req_payments_titles = 'ICT' 103 # ND2 FULL TIME do not pay LOGBOOK 104 elif student.current_mode == 'nd_ft' and student.state == RETURNING: 105 req_payments = ('ict_entre',) 106 req_payments_titles = 'ICT' 107 num = 0 94 108 if len(student['payments']): 95 # All ND and HND part time do not pay for LOGBOOK96 if student.current_mode.endswith('_pt'):97 req_payments = ('ict_entre',)98 req_payments_titles = 'ICT'99 # HND1 and HND2 full time do not pay for LOGBOOK100 elif student.current_mode == 'hnd_ft' and student.state in (101 CLEARED, RETURNING):102 req_payments = ('ict_entre',)103 req_payments_titles = 'ICT'104 # ND2 FULL TIME do not pay LOGBOOK105 elif student.current_mode == 'nd_ft' and student.state == RETURNING:106 req_payments = ('ict_entre',)107 req_payments_titles = 'ICT'108 num = 0109 109 for ticket in student['payments'].values(): 110 110 if ticket.p_state == 'paid' and \ … … 117 117 118 118 def setPaymentDetails(self, category, student, 119 previous_session , previous_level):119 previous_session=None, previous_level=None): 120 120 """Create a payment ticket and set the payment data of a 121 121 student for the payment category specified. … … 141 141 p_level = student['studycourse'].current_level 142 142 p_current = True 143 # The following three fees are part of the school fee which must be 144 # paid before tuition fee. They are paid for next session. 145 if category in ('ict_entre', 'logbook_combo', 'siwess_combo') and \ 146 student.state == RETURNING and not previous_session: 147 p_session, p_level = self.getReturningData(student) 143 148 academic_session = self._getSessionConfiguration(p_session) 144 149 if academic_session == None: 145 150 return _(u'Session configuration object is not available.'), None 146 151 # Determine fee. 147 # The following three fees are part of the school fee which must be148 # paid before tuition fee.149 if category in ('ict_entre', 'logbook_combo', 'siwess_combo') and \150 student.state == RETURNING and not previous_session:151 p_session, p_level = self.getReturningData(student)152 152 if category == 'schoolfee': 153 153 try: … … 159 159 amount = getattr(certificate, 'school_fee_1', 0.0) 160 160 else: 161 amount = getattr(certificate, 'school_fee_1', 0.0) 162 if student.state == RETURNING: 161 if student.state == CLEARED: 162 amount = getattr(certificate, 'school_fee_1', 0.0) 163 elif student.state == RETURNING: 164 amount = getattr(certificate, 'school_fee_1', 0.0) 163 165 # In case of returning school fee payment the 164 166 # payment session and level contain the values of … … 171 173 u'Session configuration object is not available.' 172 174 ), None 173 174 175 elif student.is_postgrad and student.state == PAID: 175 176 # Returning postgraduate students also pay for the 176 177 # next session but their level always remains the 177 178 # same. 179 amount = getattr(certificate, 'school_fee_1', 0.0) 178 180 p_session += 1 179 181 academic_session = self._getSessionConfiguration(p_session)
Note: See TracChangeset for help on using the changeset viewer.