Changeset 14688


Ignore:
Timestamp:
9 Jun 2017, 05:03:42 (8 years ago)
Author:
Henrik Bettermann
Message:

Add more groups for disabling student payments.

Location:
main/waeup.uniben/trunk/src/waeup/uniben
Files:
2 edited

Legend:

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

    r14598 r14688  
    142142    def _isPaymentDisabled(self, p_session, category, student):
    143143        academic_session = self._getSessionConfiguration(p_session)
    144         if category == 'schoolfee' and \
    145             'sf_all' in academic_session.payment_disabled:
    146             return True
     144        if category == 'schoolfee':
     145            if 'sf_all' in academic_session.payment_disabled:
     146                return True
     147            if student.current_mode == 'found' and \
     148                'sf_found' in academic_session.payment_disabled:
     149                return True
     150            if student.is_postgrad:
     151                if 'sf_pg' in academic_session.payment_disabled:
     152                    return True
     153                return False
     154            if student.current_mode.endswith('ft') and \
     155                'sf_ft' in academic_session.payment_disabled:
     156                return True
     157            if student.current_mode.endswith('pt') and \
     158                'sf_pt' in academic_session.payment_disabled:
     159                return True
     160            if student.current_mode.startswith('dp') and \
     161                'sf_dp' in academic_session.payment_disabled:
     162                return True
     163            if student.current_mode.endswith('sw') and \
     164                'sf_sw' in academic_session.payment_disabled:
     165                return True
    147166        if category == 'hostel_maintenance' and \
    148167            'maint_all' in academic_session.payment_disabled:
    149             return True
    150         if category == 'schoolfee' and \
    151             student.current_mode == 'found' and \
    152             'sf_found' in academic_session.payment_disabled:
    153168            return True
    154169        return False
  • main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py

    r14598 r14688  
    106106    DISABLE_PAYMENT_GROUP_DICT = {
    107107        'sf_all': 'School Fee - All Students',
     108        'sf_found': 'School Fee - Foundation Students',
     109        'sf_pg': 'School Fee - Postgraduate Students',
     110        'sf_pt': 'School Fee - UG Part-Time Students',
     111        'sf_ft': 'School Fee - UG Full-Time Students',
     112        'sf_sw': 'School Fee - Sandwich Students',
     113        'sf_dp': 'School Fee - Diploma Students',
    108114        'maint_all': 'Accommodation Fee - All Students',
    109         'sf_found': 'School Fee - Foundation Students',
    110115        }
    111116
Note: See TracChangeset for help on using the changeset viewer.