- Timestamp:
- 19 Oct 2022, 21:23:06 (2 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
r17033 r17137 261 261 grok.template('paymentsmanagepage') 262 262 263 @property 264 def manage_payments_allowed(self): 265 return checkPermission('waeup.manageStudent', self.context) 266 267 @property 268 def schoolfee_payments_made(self): 263 def _schoolfee_payments_made(self): 269 264 cs = self.context.student.current_session 270 265 SF_PAYMENTS = ('schoolfee', 'schoolfee40', 'secondinstal', 'clearance') 271 if cs > self.context.student.entry_session:272 sf_paid = {cs-1: 0.0, cs: 0.0, cs+1: 0.0}273 sessions = (cs-1, cs, cs+1)274 else:275 s f_paid = {cs: 0.0, cs+1: 0.0}276 sessions = (cs, cs+1)266 sf_paid = dict() 267 session = self.context.student.entry_session 268 while session < cs + 2: 269 sf_paid[session] = 0.0 270 session += 1 271 sessions = sf_paid.keys() 277 272 try: 278 273 certificate = self.context.student['studycourse'].certificate … … 298 293 ticket.p_category == 'brought_fwd': 299 294 brought_fwd += ticket.amount_auth 300 return sf_paid, total_sf, brought_fwd 295 return sorted(sf_paid.items(), key=lambda value: value[0]), total_sf, brought_fwd 296 297 def update(self): 298 super(CustomPaymentsManageFormPage, self).update() 299 self.sfp_made = self._schoolfee_payments_made() 300 return 301 302 @property 303 def manage_payments_allowed(self): 304 return checkPermission('waeup.manageStudent', self.context) 301 305 302 306 class StudentGetMatricNumberPage(UtilityView, grok.View): -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser_templates/paymentsmanagepage.pt
r16748 r17137 45 45 <br /><br /> 46 46 <p> 47 <strong>Balance Brought Forward:</strong> <span tal:content ="python: view.s choolfee_payments_made[2]">BROUGHTFORWARD</span>47 <strong>Balance Brought Forward:</strong> <span tal:content ="python: view.sfp_made[2]">BROUGHTFORWARD</span> 48 48 </p> 49 49 <br /> … … 58 58 </thead> 59 59 <tbody> 60 <tr tal:repeat="sfpm python: view.s choolfee_payments_made[0].items()">60 <tr tal:repeat="sfpm python: view.sfp_made[0]"> 61 61 <td tal:content ="python: '%s/%s' %(sfpm[0],sfpm[0]+1)">SESSION</td> 62 <td tal:content ="python: view.s choolfee_payments_made[1]">TOTAL</td>62 <td tal:content ="python: view.sfp_made[1]">TOTAL</td> 63 63 <td tal:content ="python: sfpm[1]">AMOUNT</td> 64 <td tal:content ="python: view.s choolfee_payments_made[1]+view.schoolfee_payments_made[2]-sfpm[1]">DUE</td>64 <td tal:content ="python: view.sfp_made[1]+view.sfp_made[2]-sfpm[1]">DUE</td> 65 65 66 66 </tr>
Note: See TracChangeset for help on using the changeset viewer.