Ignore:
Timestamp:
7 Nov 2015, 22:02:34 (9 years ago)
Author:
Henrik Bettermann
Message:

Use correct p_session value from payment ticket.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r13405 r13408  
    5353    ICustomStudentPersonalEdit,
    5454    ICustomUGStudentClearance)
     55from waeup.aaue.interswitch.browser import dynamic_gateway_amt
    5556from waeup.aaue.interfaces import MessageFactory as _
    5657
     
    136137    @property
    137138    def note(self):
    138         student = self.context.student
    139         current_session = student['studycourse'].current_session
     139        p_session = self.context.p_session
    140140        try:
    141             academic_session = grok.getSite()['configuration'][str(current_session)]
     141            academic_session = grok.getSite()['configuration'][str(p_session)]
    142142        except KeyError:
    143143            academic_session = None
     
    145145        text += '250.0 Naira Transaction Charge'
    146146        if self.context.p_category == 'schoolfee_incl' and academic_session:
     147            welfare_fee = academic_session.welfare_fee - dynamic_gateway_amt(
     148                academic_session.welfare_fee)
     149            union_fee = academic_session.union_fee - dynamic_gateway_amt(
     150                academic_session.union_fee)
    147151            text += (', %s Naira Student Welfare Assurance Fee and %s Naira Students\' Union Dues'
    148                      % (academic_session.welfare_fee, academic_session.union_fee))
     152                     % (welfare_fee, union_fee))
    149153        elif self.context.p_category == 'clearance_incl' and academic_session:
     154            matric_gown_fee = academic_session.matric_gown_fee - dynamic_gateway_amt(
     155                academic_session.matric_gown_fee)
     156            lapel_fee = academic_session.lapel_fee - dynamic_gateway_amt(
     157                academic_session.lapel_fee)
    150158            text += (', %s Naira Matriculation Gown Fee and %s Naira Lapel/File Fee'
    151                      % (academic_session.matric_gown_fee, academic_session.lapel_fee))
     159                     % (matric_gown_fee, lapel_fee))
    152160        return text + '.'
    153161
Note: See TracChangeset for help on using the changeset viewer.