Changeset 14340 for main/kofacustom.coewarri
- Timestamp:
- 14 Dec 2016, 08:38:01 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/payments.py
r14035 r14340 47 47 return self.__parent__.__parent__ 48 48 49 def redeemTicket(self): 50 """Either create an appropriate access code or trigger an action 51 directly. 52 """ 53 student = self.student 54 if self.p_category == 'clearance': 55 # Create CLR access code 56 pin, error = create_accesscode( 57 'CLR',0,self.amount_auth,student.student_id) 58 if error: 59 return error 60 self.ac = pin 61 elif self.p_category.startswith('schoolfee'): 62 # Bypass activation code creation if next session 63 # can be started directly. 64 if student['studycourse'].next_session_allowed: 65 try: 66 if student.state == CLEARED: 67 IWorkflowInfo(student).fireTransition( 68 'pay_first_school_fee') 69 return None 70 elif student.state == RETURNING: 71 IWorkflowInfo(student).fireTransition( 72 'pay_school_fee') 73 return None 74 elif student.state == PAID: 75 IWorkflowInfo(student).fireTransition( 76 'pay_pg_fee') 77 return None 78 except ConstraintNotSatisfied: 79 pass 80 # Create SFE access code 81 pin, error = create_accesscode( 82 'SFE',0,self.amount_auth,student.student_id) 83 if error: 84 return error 85 self.ac = pin 86 elif self.p_category == 'bed_allocation': 87 # Create HOS access code 88 pin, error = create_accesscode( 89 'HOS',0,self.amount_auth,student.student_id) 90 if error: 91 return error 92 self.ac = pin 93 elif self.p_category == 'transcript': 94 # Create TSC access code 95 pin, error = create_accesscode( 96 'TSC',0,self.amount_auth,student.student_id) 97 if error: 98 return error 99 self.ac = pin 100 return None 101 49 102 CustomStudentOnlinePayment = attrs_to_fields( 50 103 CustomStudentOnlinePayment, omit=['display_item'])
Note: See TracChangeset for help on using the changeset viewer.