Ignore:
Timestamp:
16 Mar 2022, 21:17:42 (3 years ago)
Author:
Henrik Bettermann
Message:

Make third_semester payment conditional on number registered at p_level.

File:
1 edited

Legend:

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

    r16887 r16891  
    126126            if student.state not in (ADMITTED, CLEARANCE, REQUESTED, CLEARED):
    127127                return _(u'Acceptance Fee payments not allowed.'), None
    128         elif category.startswith('third_semester') and student.current_mode == 'nce_ft' \
     128        elif category == 'third_semester' and student.current_mode == 'nce_ft' \
    129129            and p_level in (300, 310, 320, 400, 410, 420):
    130130            if not self._nce3PaymentMade(student, p_level):
     
    135135                amount = 7938.0
    136136            no_additional_courses = 0
    137             if len(category.split('_')) == 3:
    138                 no_additional_courses = int(category.split('_')[2])
     137            courses_level = student['studycourse'].get(str(p_level))
     138            if courses_level and len(courses_level)> 6:
     139                no_additional_courses = len(courses_level)-6
    139140                amount += 2000.0 * no_additional_courses
    140141        elif category.startswith('schoolfee'):
Note: See TracChangeset for help on using the changeset viewer.