Ignore:
Timestamp:
23 Jun 2023, 04:15:41 (17 months ago)
Author:
Henrik Bettermann
Message:

More old fees.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py

    r17445 r17446  
    104104reader = csv.DictReader(open(schoolfees_path, 'rb'))
    105105SCHOOLFEES_19 = {item['code']:item for item in reader}
     106
     107schoolfees_path = os.path.join(
     108    os.path.dirname(__file__), '../students/schoolfees_14.csv')
     109reader = csv.DictReader(open(schoolfees_path, 'rb'))
     110SCHOOLFEES_14 = {item['code']:item for item in reader}
     111
     112schoolfees_path = os.path.join(
     113    os.path.dirname(__file__), '../students/schoolfees_13.csv')
     114reader = csv.DictReader(open(schoolfees_path, 'rb'))
     115SCHOOLFEES_13 = {item['code']:item for item in reader}
     116
     117schoolfees_path = os.path.join(
     118    os.path.dirname(__file__), '../students/schoolfees_12.csv')
     119reader = csv.DictReader(open(schoolfees_path, 'rb'))
     120SCHOOLFEES_12 = {item['code']:item for item in reader}
    106121
    107122acceptancefees_path = os.path.join(
     
    273288<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">""" % xmldict
    274289                item_id = 1
    275                 if student.entry_session < 2020:
     290
     291                if student.entry_session < 2013:
     292                    sorted_items = SCHOOLFEES_12[student.certcode].items()
     293                elif student.entry_session < 2013:
     294                    sorted_items = SCHOOLFEES_19[student.certcode].items()
     295                elif student.entry_session < 2014:
     296                    sorted_items = SCHOOLFEES_19[student.certcode].items()
     297                elif student.entry_session < 2020:
    276298                    sorted_items = SCHOOLFEES_19[student.certcode].items()
    277299                elif student.entry_session < 2021:
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r17445 r17446  
    5151reader = csv.DictReader(open(schoolfees_path, 'rb'))
    5252SCHOOLFEES_19 = {item['code']:(item['tuition'], item.values()) for item in reader}
     53
     54schoolfees_path = os.path.join(
     55    os.path.dirname(__file__), 'schoolfees_14.csv')
     56reader = csv.DictReader(open(schoolfees_path, 'rb'))
     57SCHOOLFEES_14 = {item['code']:(item['tuition'], item.values()) for item in reader}
     58
     59schoolfees_path = os.path.join(
     60    os.path.dirname(__file__), 'schoolfees_13.csv')
     61reader = csv.DictReader(open(schoolfees_path, 'rb'))
     62SCHOOLFEES_13 = {item['code']:(item['tuition'], item.values()) for item in reader}
     63
     64schoolfees_path = os.path.join(
     65    os.path.dirname(__file__), 'schoolfees_12.csv')
     66reader = csv.DictReader(open(schoolfees_path, 'rb'))
     67SCHOOLFEES_12 = {item['code']:(item['tuition'], item.values()) for item in reader}
    5368
    5469acceptancefees_path = os.path.join(
     
    400415                return _('Study course data are incomplete.'), None
    401416            try:
    402                 if student.entry_session < 2020:
     417                if student.entry_session < 2013:
     418                    schoolfees = SCHOOLFEES_12[student.certcode]
     419                elif student.entry_session < 2014:
     420                    schoolfees = SCHOOLFEES_13[student.certcode]
     421                elif student.entry_session < 2015:
     422                    schoolfees = SCHOOLFEES_14[student.certcode]
     423                elif student.entry_session < 2020:
    403424                    schoolfees = SCHOOLFEES_19[student.certcode]
    404425                elif student.entry_session < 2021:
Note: See TracChangeset for help on using the changeset viewer.