Ignore:
Timestamp:
6 Nov 2015, 18:29:20 (9 years ago)
Author:
Henrik Bettermann
Message:

Reconfigure payments according to ticket #129. Some tests are still missing. Do not upgrade!

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

Legend:

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

    r13049 r13400  
    4949    def redeemTicket(self):
    5050        student = self.student
    51         if self.p_category in ('schoolfee', 'schoolfee_1'):
     51        if self.p_category.startswith('schoolfee'):
    5252            # Bypass activation code creation if next session
    5353            # can be started directly.
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r13377 r13400  
    133133        elif category == 'medical':
    134134            amount = academic_session.medical_fee
    135         elif category == 'clearance':
     135        elif category.startswith('clearance'):
    136136            if student.faccode == 'FP':
    137137                amount = academic_session.clearance_fee_fp
     
    143143                amount = academic_session.clearance_fee
    144144            p_item = student['studycourse'].certificate.code
     145            # Add Matric Gown Fee and Lapel Fee
     146            if category == 'clearance_incl':
     147                if amount is None:
     148                    # Otherwise we can't add somtehing
     149                    amount = 0.0
     150                amount += academic_session.matric_gown_fee + academic_session.lapel_fee
    145151        elif category == 'late_registration':
    146152            amount = academic_session.late_registration_fee
    147         elif category == 'schoolfee':
     153        elif category.startswith('schoolfee'):
    148154            try:
    149155                certificate = student['studycourse'].certificate
     
    172178            else:
    173179                return _('Wrong state.'), None
     180            # Add Student Union Fee and Welfare Assurance
     181            if category == 'schoolfee_incl':
     182                if amount is None:
     183                    # Otherwise we can't add somtehing
     184                    amount = 0.0
     185                amount += academic_session.welfare_fee + academic_session.union_fee
    174186        if amount in (0.0, None):
    175187            return _(u'Amount could not be determined.'), None
Note: See TracChangeset for help on using the changeset viewer.