Changeset 17727 for main/kofacustom.edopoly/trunk/src/kofacustom/edopoly
- Timestamp:
- 25 Mar 2024, 10:33:29 (8 months ago)
- Location:
- main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/tests/test_utils.py
r17397 r17727 39 39 # nd_ft 40 40 self.certificate.study_mode ='nd_ft' 41 msg, mnumber = utils.setMatricNumber(self.student) 42 self.assertEqual(msg, 'Matriculation number cannot be set.') 43 error, payment = utils.setPaymentDetails('clearance',self.student) 44 payment.p_state = 'paid' 45 self.student['payments']['any_key'] = payment 41 46 msg, mnumber = utils.setMatricNumber(self.student) 42 47 self.assertEqual(self.student.matric_number, 'fac1/ND/04/00001') -
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/utils.py
r17704 r17727 248 248 #depcode = student.depcode 249 249 #certcode = student.certcode 250 clearance_paid = False 251 if len(student['payments']): 252 for ticket in student['payments'].values(): 253 if ticket.p_state == 'paid' and \ 254 ticket.p_category == 'clearance' and \ 255 ticket.p_session == student.entry_session: 256 clearance_paid = True 257 break 258 if not clearance_paid or not student.is_fresh: 259 return _('Matriculation number cannot be set.'), None 250 260 year = unicode(student.entry_session)[2:] 251 if not student.state in (PAID, ) or not student.is_fresh:252 return _('Matriculation number cannot be set.'), None253 254 261 # SASND1809001 255 262 if student.current_mode == 'nd_ft':
Note: See TracChangeset for help on using the changeset viewer.