Changeset 16627 for main/kofacustom.iuokada/trunk
- Timestamp:
- 20 Sep 2021, 07:02:50 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py
r16623 r16627 269 269 cs = self.context.student.current_session 270 270 SF_PAYMENTS = ('schoolfee', 'schoolfee40', 'secondinstal', 'clearance') 271 sf_paid = {cs-1: 0, cs: 0, cs+1: 0} 271 if cs > self.context.student.entry_session: 272 sf_paid = {cs-1: 0, cs: 0, cs+1: 0} 273 sessions = (cs-1, cs, cs+1) 274 else: 275 sf_paid = {cs: 0, cs+1: 0} 276 sessions = (cs, cs+1) 272 277 try: 273 278 certificate = self.context.student['studycourse'].certificate 274 279 except (AttributeError, TypeError): 275 return sf_paid, 0276 try:277 academic_session = grok.getSite()['configuration'][str(cs)]278 except KeyError:279 280 return sf_paid, 0 280 281 if self.context.student in (ADMITTED, CLEARANCE, REQUESTED, CLEARED): … … 282 283 else: 283 284 total_sf = getattr(certificate, 'school_fee_2', 0.0) 284 cfee = academic_session.clearance_fee285 if self.context.student.is_postgrad:286 cfee *= 0.5287 total_sf += cfee288 285 for ticket in self.context.student['payments'].values(): 289 286 if ticket.p_category in SF_PAYMENTS and \ 290 287 ticket.p_state == 'paid' and \ 291 ticket.p_session in (cs-1, cs, cs+1):288 ticket.p_session in sessions: 292 289 sf_paid[ticket.p_session] += ticket.amount_auth 293 290 return sf_paid, total_sf
Note: See TracChangeset for help on using the changeset viewer.