Changeset 16408
- Timestamp:
- 6 Mar 2021, 12:02:24 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/student.py
r16306 r16408 51 51 return False 52 52 53 def minimumStudentPayments (self, minamount):53 def minimumStudentPayments_not_used(self, minamount): 54 54 """Need to access edit_personal. Only in iuokada package. 55 55 """ … … 63 63 and ticket.p_session >= self.current_session: 64 64 total_amount += ticket.amount_auth 65 if total_amount >= minamount: 66 return True 67 return False 68 69 def minimumStudentPayments(self, minamount): 70 """Need to access edit_personal. Only in iuokada package. 71 """ 72 if self.sponsor in ['bauchi', 'federalgov', 'kano']: 73 return True 74 try: 75 certificate = self['studycourse'].certificate 76 except (AttributeError, TypeError): 77 return _('Study course data are incomplete.'), None 78 total_amount = 0.0 79 for ticket in self['payments'].values(): 80 if ticket.p_state == 'paid' \ 81 and ticket.p_session >= self.current_session \ 82 and ticket.p_category in ('schoolfee', 'schoolfee40', 'secondinstal'): 83 total_amount += ticket.amount_auth 84 if self.is_fresh: 85 minamount = 0.4 * getattr(certificate, 'school_fee_1', 0.0) 86 else: 87 minamount = 0.4 * getattr(certificate, 'school_fee_2', 0.0) 65 88 if total_amount >= minamount: 66 89 return True
Note: See TracChangeset for help on using the changeset viewer.