Changeset 16298
- Timestamp:
- 4 Nov 2020, 11:20:31 (4 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py
r16297 r16298 128 128 129 129 def update(self): 130 if not self.context.is_fresh:131 self.flash('Not allowed.', type="danger")132 self.redirect(self.url(self.context))133 return130 #if not self.context.is_fresh: 131 # self.flash('Not allowed.', type="danger") 132 # self.redirect(self.url(self.context)) 133 # return 134 134 minamount = 200000 135 if not self.context.minimum FreshStudentPayments(minamount):135 if not self.context.minimumStudentPayments(minamount): 136 136 self.flash('Please make required payments first ' 137 137 '(at least in the amount of %s Naira).' % minamount, -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/student.py
r16280 r16298 51 51 return False 52 52 53 def minimum FreshStudentPayments(self, minamount):53 def minimumStudentPayments(self, minamount): 54 54 """Need to access edit_personal. Only in iuokada package. 55 55 """ 56 if not self.is_fresh:57 return False56 #if not self.is_fresh: 57 # return False 58 58 total_amount = 0.0 59 59 for ticket in self['payments'].values(): 60 if ticket.p_state == 'paid': 60 if ticket.p_state == 'paid' \ 61 and ticket.p_session >= self.current_session: 61 62 total_amount += ticket.amount_auth 62 63 if total_amount >= minamount: -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/viewlets.py
r16295 r16298 73 73 @property 74 74 def target_url(self): 75 if not self.context.is_fresh:76 return ''75 #if not self.context.is_fresh: 76 # return '' 77 77 return self.view.url(self.view.context, self.target) 78 78 … … 88 88 @property 89 89 def target_url(self): 90 if not self.context.is_fresh:91 return ''90 #if not self.context.is_fresh: 91 # return '' 92 92 return self.view.url(self.view.context, self.target) 93 93
Note: See TracChangeset for help on using the changeset viewer.