Changeset 17445


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

Add old school fees.

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

Legend:

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

    r17444 r17445  
    9494reader = csv.DictReader(open(schoolfees_path, 'rb'))
    9595SCHOOLFEES_21 = {item['code']:item for item in reader}
     96
     97schoolfees_path = os.path.join(
     98    os.path.dirname(__file__), '../students/schoolfees_20.csv')
     99reader = csv.DictReader(open(schoolfees_path, 'rb'))
     100SCHOOLFEES_20 = {item['code']:item for item in reader}
     101
     102schoolfees_path = os.path.join(
     103    os.path.dirname(__file__), '../students/schoolfees_19.csv')
     104reader = csv.DictReader(open(schoolfees_path, 'rb'))
     105SCHOOLFEES_19 = {item['code']:item for item in reader}
    96106
    97107acceptancefees_path = os.path.join(
     
    263273<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">""" % xmldict
    264274                item_id = 1
    265                 if student.entry_session < 2022:
     275                if student.entry_session < 2020:
     276                    sorted_items = SCHOOLFEES_19[student.certcode].items()
     277                elif student.entry_session < 2021:
     278                    sorted_items = SCHOOLFEES_20[student.certcode].items()
     279                elif student.entry_session < 2022:
    266280                    sorted_items = SCHOOLFEES_21[student.certcode].items()
    267281                else:
  • main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py

    r17440 r17445  
    305305            in self.browser.contents)
    306306        self.assertTrue(
    307             'item_name="LMS Plus Fee" item_amt="2000000" bank_id="7" acct_num="1022438743"' in self.browser.contents)
     307            'item_name="Student Union Dues" item_amt="3000000" bank_id="7" acct_num="1019763348"' in self.browser.contents)
    308308        self.assertTrue(
    309309            'item_name="Tuition" item_amt="9200000" bank_id="7" acct_num="1022438743"' in self.browser.contents)
  • main/waeup.aaue/trunk/src/waeup/aaue/students/schoolfees_21.csv

    r17444 r17445  
    11code,faculty_code,department_code,tuition,edohis,union,access,sport,library,lmsplus,nuga
    2 CERT1,FAG,ANS,184000,16000,1000,4500,3000,1000,20000,10000
    32BAGRANS,FAG,ANS,140500,16000,1000,4500,3000,1000,20000,1000
    43BAGRCRS,FAG,CRS,140500,16000,1000,4500,3000,1000,20000,1000
  • main/waeup.aaue/trunk/src/waeup/aaue/students/schoolfees_22.csv

    r17444 r17445  
    11code,faculty_code,department_code,tuition,edohis,union,access,notebook,sport,library,lmsplus,nuga
    2 CERT1,FAG,ANS,184000,16000,1000,4500,9000,3000,1000,20000,1000
    32BAGRANS,FAG,ANS,184000,16000,1000,4500,9000,3000,1000,20000,1000
    43BAGRCRS,FAG,CRS,184000,16000,1000,4500,9000,3000,1000,20000,1000
  • 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.