Ignore:
Timestamp:
30 Nov 2015, 14:56:37 (9 years ago)
Author:
Henrik Bettermann
Message:

Implement school fee payments by instalment.

File:
1 edited

Legend:

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

    r13506 r13512  
    178178            except (AttributeError, TypeError):
    179179                return _('Study course data are incomplete.'), None
    180             if student.state == CLEARED:
     180            if student.state == CLEARED or category == 'schoolfee_2':
    181181                if student.is_foreigner:
    182182                    amount = getattr(certificate, 'school_fee_3', 0.0)
    183183                else:
    184184                    amount = getattr(certificate, 'school_fee_1', 0.0)
     185                # Cut school fee by 50%
     186                if category in ('schoolfee_1', 'schoolfee_2'):
     187                    amount = amount / 2
     188            elif category == 'schoolfee_1':
     189                return _("Wrong state. Only students in state 'cleared' "
     190                         "are allowed to pay by instalments."), None
    185191            elif student.state == RETURNING:
    186192                if not student.father_name:
     
    204210                return _(u'Amount could not be determined.'), None
    205211            # Add Student Union Fee and Welfare Assurance
    206             if category == 'schoolfee_incl':
     212            if category in ('schoolfee_incl', 'schoolfee_1'):
    207213                amount += gateway_net_amt(academic_session.welfare_fee) + \
    208214                    gateway_net_amt(academic_session.union_fee)
Note: See TracChangeset for help on using the changeset viewer.