Ignore:
Timestamp:
22 Jun 2023, 03:54:31 (17 months ago)
Author:
Henrik Bettermann
Message:

Add old school fees.

File:
1 edited

Legend:

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

    r17444 r17445  
    4141reader = csv.DictReader(open(schoolfees_path, 'rb'))
    4242SCHOOLFEES_21 = {item['code']:(item['tuition'], item.values()) for item in reader}
     43
     44schoolfees_path = os.path.join(
     45    os.path.dirname(__file__), 'schoolfees_20.csv')
     46reader = csv.DictReader(open(schoolfees_path, 'rb'))
     47SCHOOLFEES_20 = {item['code']:(item['tuition'], item.values()) for item in reader}
     48
     49schoolfees_path = os.path.join(
     50    os.path.dirname(__file__), 'schoolfees_19.csv')
     51reader = csv.DictReader(open(schoolfees_path, 'rb'))
     52SCHOOLFEES_19 = {item['code']:(item['tuition'], item.values()) for item in reader}
    4353
    4454acceptancefees_path = os.path.join(
     
    390400                return _('Study course data are incomplete.'), None
    391401            try:
    392                 if student.entry_session < 2022:
     402                if student.entry_session < 2020:
     403                    schoolfees = SCHOOLFEES_19[student.certcode]
     404                elif student.entry_session < 2021:
     405                    schoolfees = SCHOOLFEES_20[student.certcode]
     406                elif student.entry_session < 2022:
    393407                    schoolfees = SCHOOLFEES_21[student.certcode]
    394408                else:
Note: See TracChangeset for help on using the changeset viewer.