Ignore:
Timestamp:
8 Nov 2015, 06:18:44 (9 years ago)
Author:
Henrik Bettermann
Message:

Remove duplicate payment category.

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

    r13408 r13410  
    151151            text += (', %s Naira Student Welfare Assurance Fee and %s Naira Students\' Union Dues'
    152152                     % (welfare_fee, union_fee))
    153         elif self.context.p_category == 'clearance_incl' and academic_session:
     153        elif self.context.p_category in (
     154            'clearance_incl', 'clearance_medical_incl') and academic_session:
    154155            matric_gown_fee = academic_session.matric_gown_fee - dynamic_gateway_amt(
    155156                academic_session.matric_gown_fee)
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r13406 r13410  
    132132        elif category == 'concessional':
    133133            amount = academic_session.concession_fee
    134         elif category == 'medical':
    135             amount = academic_session.medical_fee
    136134        elif category.startswith('clearance'):
    137135            if student.faccode == 'FP':
     
    145143            p_item = student['studycourse'].certificate.code
    146144            # Add Matric Gown Fee and Lapel Fee
    147             if category == 'clearance_incl':
     145            if category.endswith('_incl'):
    148146                if amount is None:
    149147                    # Otherwise we can't add somtehing
    150148                    amount = 0.0
    151149                amount += academic_session.matric_gown_fee + \
    152                           academic_session.lapel_fee - \
    153                           2*(dynamic_gateway_amt(amount))
     150                    academic_session.lapel_fee - \
     151                    dynamic_gateway_amt(academic_session.matric_gown_fee) -\
     152                    dynamic_gateway_amt(academic_session.lapel_fee)
    154153        elif category == 'late_registration':
    155154            amount = academic_session.late_registration_fee
     
    187186                    amount = 0.0
    188187                amount += academic_session.welfare_fee + \
    189                           academic_session.union_fee - \
    190                           2*(dynamic_gateway_amt(amount))
     188                    academic_session.union_fee - \
     189                    dynamic_gateway_amt(academic_session.welfare_fee) -\
     190                    dynamic_gateway_amt(academic_session.union_fee)
    191191        if amount in (0.0, None):
    192192            return _(u'Amount could not be determined.'), None
Note: See TracChangeset for help on using the changeset viewer.