Changeset 17734


Ignore:
Timestamp:
4 Apr 2024, 12:19:05 (7 months ago)
Author:
Henrik Bettermann
Message:

School fee payments are becoming even more complex.

Location:
main/waeup.fceokene/trunk/src/waeup/fceokene
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py

    r17629 r17734  
    250250        self.certificate.study_mode = 'ug_ft'
    251251        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    252         self.assertEqual(payment.amount_auth,  70700)
     252        self.assertEqual(payment.amount_auth,  96700)
    253253        self.assertEqual(error, None)
    254254        # UG cleared students pay 87200
    255255        IWorkflowState(self.student).setState('cleared')
    256256        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    257         self.assertEqual(payment.amount_auth, 87200)
     257        self.assertEqual(payment.amount_auth, 126200)
    258258        self.assertEqual(error, None)
    259259
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py

    r17706 r17734  
    151151                if student.state != CLEARED:
    152152                        return _('You are not a fresh student.'), None
     153            if category == 'schoolfee_ug_new':
     154                if not student.current_mode.startswith('ug'):
     155                    return _('You are not a UG student.'), None
     156                if student.state != CLEARED:
     157                        return _('You are not a fresh student.'), None
     158            if category == 'schoolfee_ug_ret':
     159                if not student.current_mode.startswith('ug'):
     160                    return _('You are not a UG student.'), None
     161                if student.state != RETURNING:
     162                        return _('You are not a returning student.'), None
    153163            if category == 'schoolfee_third':
    154164                if not student.current_mode == 'nce_ft' \
     
    188198            # UG
    189199            elif student.current_mode == 'ug_ft':
    190                 if student.state == CLEARED:
    191                     amount = 87200
     200                if category == 'schoolfee_ug_new':
     201                    # conditions checked above
     202                    amount = 63200
     203                elif category == 'schoolfee_ug_ret':
     204                    # conditions checked above
     205                    amount = 48700
     206                elif student.state == CLEARED:
     207                    amount = 126200
    192208                # Introducing repeater fee for 'ug_ft' for 1st time
    193209                # on 15/03/2016
    194                 elif student.current_verdict == 'O':
    195                     amount = 70700
     210                #elif student.current_verdict == 'O':
     211                #    amount = 96700
    196212                else:
    197                     amount = 70700
     213                    amount = 96700
    198214            # NCE
    199215            elif not student.current_mode.endswith('_sw'):
  • main/waeup.fceokene/trunk/src/waeup/fceokene/utils/utils.py

    r16899 r17734  
    8787    PAYMENT_CATEGORIES = {
    8888        'schoolfee': 'School Fee',
    89         'schoolfee_pde1': 'School Fee 1st instalment (new PDE students only)',
     89        'schoolfee_pde1': 'New PDE students first instalment',
     90        'schoolfee_ug_new': 'Undergraduate new students first instalment',
     91        'schoolfee_ug_ret': 'Undergraduate returning students first instalment',
    9092        'schoolfee_third': 'NCE Third Semester Fee (6 courses)',
    9193        'clearance': 'Acceptance Fee',
     
    98100    SELECTABLE_PAYMENT_CATEGORIES = {
    99101        'schoolfee': 'School Fee',
    100         'schoolfee_pde1': 'School Fee 1st instalment (new PDE students only)',
     102        'schoolfee_pde1': 'New PDE students first instalment',
     103        'schoolfee_ug_new': 'Undergraduate new students first instalment',
     104        'schoolfee_ug_ret': 'Undergraduate returning students first instalment',
    101105        'schoolfee_third': 'NCE Third Semester Fee (6 courses)',
    102106        'clearance': 'Acceptance Fee',
Note: See TracChangeset for help on using the changeset viewer.