Changeset 16623 for main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
- Timestamp:
- 16 Sep 2021, 21:33:48 (3 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py
r16607 r16623 24 24 from zope.formlib.textwidgets import BytesDisplayWidget 25 25 from hurry.workflow.interfaces import IWorkflowInfo 26 from waeup.kofa.interfaces import (REQUESTED, ADMITTED, CLEARANCE, 26 from waeup.kofa.interfaces import ( 27 REQUESTED, ADMITTED, CLEARANCE, REQUESTED, CLEARED, 27 28 IExtFileStore, IKofaUtils, academic_sessions_vocab) 28 29 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget … … 269 270 SF_PAYMENTS = ('schoolfee', 'schoolfee40', 'secondinstal', 'clearance') 270 271 sf_paid = {cs-1: 0, cs: 0, cs+1: 0} 272 try: 273 certificate = self.context.student['studycourse'].certificate 274 except (AttributeError, TypeError): 275 return sf_paid, 0 276 try: 277 academic_session = grok.getSite()['configuration'][str(cs)] 278 except KeyError: 279 return sf_paid, 0 280 if self.context.student in (ADMITTED, CLEARANCE, REQUESTED, CLEARED): 281 total_sf = getattr(certificate, 'school_fee_1', 0.0) 282 else: 283 total_sf = getattr(certificate, 'school_fee_2', 0.0) 284 cfee = academic_session.clearance_fee 285 if self.context.student.is_postgrad: 286 cfee *= 0.5 287 total_sf += cfee 271 288 for ticket in self.context.student['payments'].values(): 272 289 if ticket.p_category in SF_PAYMENTS and \ … … 274 291 ticket.p_session in (cs-1, cs, cs+1): 275 292 sf_paid[ticket.p_session] += ticket.amount_auth 276 return sf_paid 293 return sf_paid, total_sf 277 294 278 295 class StudentGetMatricNumberPage(UtilityView, grok.View): -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser_templates/paymentsmanagepage.pt
r16510 r16623 45 45 <br /><br /> 46 46 47 <table class="table" style="width: 33%;">47 <table class="table" style="width: 50%;"> 48 48 <thead> 49 49 <tr> 50 50 <th i18n:translate="">Session</th> 51 <th i18n:translate="">Sum of Total School Fees Paid</th> 51 <th i18n:translate="">School Fees</th> 52 <th i18n:translate="">Sum Paid</th> 53 <th i18n:translate="">Amount Due</th> 52 54 </tr> 53 55 </thead> 54 56 <tbody> 55 <tr tal:repeat="sfpm python: view.schoolfee_payments_made .items()">57 <tr tal:repeat="sfpm python: view.schoolfee_payments_made[0].items()"> 56 58 <td tal:content ="python: sfpm[0]">YEAR</td> 59 <td tal:content ="python: view.schoolfee_payments_made[1]">TOTAL</td> 57 60 <td tal:content ="python: sfpm[1]">AMOUNT</td> 61 <td tal:content ="python: view.schoolfee_payments_made[1]-sfpm[1]">DUE</td> 58 62 </tr> 59 63 </tbody>
Note: See TracChangeset for help on using the changeset viewer.