Changeset 16632
- Timestamp:
- 21 Sep 2021, 07:44:14 (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
r16631 r16632 270 270 SF_PAYMENTS = ('schoolfee', 'schoolfee40', 'secondinstal', 'clearance') 271 271 if cs > self.context.student.entry_session: 272 sf_paid = {cs-1: 0 , cs: 0, cs+1:0}272 sf_paid = {cs-1: 0.0, cs: 0.0, cs+1: 0.0} 273 273 sessions = (cs-1, cs, cs+1) 274 274 else: 275 sf_paid = {cs: 0 , cs+1:0}275 sf_paid = {cs: 0.0, cs+1: 0.0} 276 276 sessions = (cs, cs+1) 277 277 try: … … 283 283 else: 284 284 total_sf = getattr(certificate, 'school_fee_2', 0.0) 285 for ticket in self.context.student['payments'].values(): 285 brought_fwd = 0.0 286 for ticket in self.context.values(): 287 amt = ticket.net_amt 288 if not amt: 289 amt = ticket.amount_auth 286 290 if ticket.p_category in SF_PAYMENTS and \ 287 291 ticket.p_state == 'paid' and \ 288 292 ticket.p_session in sessions: 289 sf_paid[ticket.p_session] += ticket.net_amt 290 brought_fwd = 0.0 291 for key in self.context.keys(): 292 ticket = self.context[key] 293 sf_paid[ticket.p_session] += amt 293 294 if ticket.p_state != 'paid' and\ 294 295 ticket.p_category == 'brought_fwd': -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser_templates/paymentsmanagepage.pt
r16631 r16632 44 44 </div> 45 45 <br /><br /> 46 46 <p> 47 <strong>Balance Brought Forward:</strong> <span tal:content ="python: view.schoolfee_payments_made[2]">BROUGHTFORWARD</span> 48 </p> 49 <br /> 47 50 <table class="table" style="width: 50%;"> 48 51 <thead> … … 59 62 <td tal:content ="python: view.schoolfee_payments_made[1]">TOTAL</td> 60 63 <td tal:content ="python: sfpm[1]">AMOUNT</td> 61 <td tal:content ="python: view.schoolfee_payments_made[1] -sfpm[1]">DUE</td>64 <td tal:content ="python: view.schoolfee_payments_made[1]+view.schoolfee_payments_made[2]-sfpm[1]">DUE</td> 62 65 63 66 </tr> 64 67 </tbody> 65 68 </table> 66 <p>67 <strong>Balance Brought Forward:</strong> <span tal:content ="python: view.schoolfee_payments_made[2]">BROUGHTFORWARD</span>68 </p>69 70 69 </form>
Note: See TracChangeset for help on using the changeset viewer.