Changeset 15064 for main/kofacustom.edopoly
- Timestamp:
- 27 Jun 2018, 07:18:05 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/utils.py
r15056 r15064 88 88 89 89 def _requiredPaymentsMade(self, student, session): 90 req_payments = ('ict_entre', 'logbook_combo', 'siwess_combo') 91 req_payments_titles = 'ICT, Logbook and SIWESS' 90 92 if len(student['payments']): 93 if student.current_mode.endswith('_pt'): 94 req_payments = ('ict_entre', 'siwess_combo') 95 req_payments_titles = 'ICT and SIWESS' 91 96 num = 0 92 97 for ticket in student['payments'].values(): 93 98 if ticket.p_state == 'paid' and \ 94 ticket.p_category in ( 95 'ict_entre', 'logbook_combo', 'siwess_combo') and \ 99 ticket.p_category in req_payments and \ 96 100 ticket.p_session == session: 97 101 num += 1 98 if num == 3:99 return True 100 return False 102 if num == len(req_payments): 103 return True, None 104 return False, req_payments_titles 101 105 102 106 def setPaymentDetails(self, category, student, … … 135 139 p_session, p_level = self.getReturningData(student) 136 140 if category == 'schoolfee': 137 if not self._requiredPaymentsMade(student, p_session): 138 return _('Pay SIWES, Logbook and ICT fees first.'), None 141 rpm, rpt = self._requiredPaymentsMade(student, p_session) 142 if not rpm: 143 return 'Pay %s fees first.' % rpt, None 139 144 try: 140 145 certificate = student['studycourse'].certificate
Note: See TracChangeset for help on using the changeset viewer.