Ignore:
Timestamp:
9 Nov 2015, 07:08:21 (9 years ago)
Author:
Henrik Bettermann
Message:

Determine net amount instead of gateway reduction. This is much easier to handle.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
2 edited

Legend:

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

    r13410 r13414  
    5353    ICustomStudentPersonalEdit,
    5454    ICustomUGStudentClearance)
    55 from waeup.aaue.interswitch.browser import dynamic_gateway_amt
     55from waeup.aaue.interswitch.browser import gateway_net_amt
    5656from waeup.aaue.interfaces import MessageFactory as _
    5757
     
    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)
     147            welfare_fee = gateway_net_amt(academic_session.welfare_fee)
     148            union_fee = gateway_net_amt(academic_session.union_fee)
    151149            text += (', %s Naira Student Welfare Assurance Fee and %s Naira Students\' Union Dues'
    152150                     % (welfare_fee, union_fee))
    153151        elif self.context.p_category in (
    154152            'clearance_incl', 'clearance_medical_incl') and academic_session:
    155             matric_gown_fee = academic_session.matric_gown_fee - dynamic_gateway_amt(
    156                 academic_session.matric_gown_fee)
    157             lapel_fee = academic_session.lapel_fee - dynamic_gateway_amt(
    158                 academic_session.lapel_fee)
     153            matric_gown_fee = gateway_net_amt(academic_session.matric_gown_fee)
     154            lapel_fee = gateway_net_amt(academic_session.lapel_fee)
    159155            text += (', %s Naira Matriculation Gown Fee and %s Naira Lapel/File Fee'
    160156                     % (matric_gown_fee, lapel_fee))
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r13413 r13414  
    2424from waeup.kofa.accesscodes import create_accesscode
    2525from waeup.kofa.students.utils import trans
    26 from waeup.aaue.interswitch.browser import dynamic_gateway_amt
     26from waeup.aaue.interswitch.browser import gateway_net_amt
    2727from waeup.aaue.interfaces import MessageFactory as _
    2828
     
    145145                    # Otherwise we can't add somtehing
    146146                    amount = 0.0
    147                 amount += academic_session.matric_gown_fee + \
    148                     academic_session.lapel_fee - \
    149                     dynamic_gateway_amt(academic_session.matric_gown_fee) -\
    150                     dynamic_gateway_amt(academic_session.lapel_fee)
     147                amount += gateway_net_amt(academic_session.matric_gown_fee) + \
     148                    gateway_net_amt(academic_session.lapel_fee)
    151149        elif category == 'late_registration':
    152150            amount = academic_session.late_registration_fee
     
    183181                    # Otherwise we can't add somtehing
    184182                    amount = 0.0
    185                 amount += academic_session.welfare_fee + \
    186                     academic_session.union_fee - \
    187                     dynamic_gateway_amt(academic_session.welfare_fee) -\
    188                     dynamic_gateway_amt(academic_session.union_fee)
     183                amount += gateway_net_amt(academic_session.welfare_fee) + \
     184                    gateway_net_amt(academic_session.union_fee)
    189185        if amount in (0.0, None):
    190186            return _(u'Amount could not be determined.'), None
Note: See TracChangeset for help on using the changeset viewer.