- Timestamp:
- 21 Jun 2023, 04:37:43 (18 months ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 1 added
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r17442 r17444 86 86 87 87 schoolfees_path = os.path.join( 88 os.path.dirname(__file__), '../students/schoolfees .csv')88 os.path.dirname(__file__), '../students/schoolfees_22.csv') 89 89 reader = csv.DictReader(open(schoolfees_path, 'rb')) 90 SCHOOLFEES = {item['code']:item for item in reader} 90 SCHOOLFEES_22 = {item['code']:item for item in reader} 91 92 schoolfees_path = os.path.join( 93 os.path.dirname(__file__), '../students/schoolfees_21.csv') 94 reader = csv.DictReader(open(schoolfees_path, 'rb')) 95 SCHOOLFEES_21 = {item['code']:item for item in reader} 91 96 92 97 acceptancefees_path = os.path.join( … … 258 263 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">""" % xmldict 259 264 item_id = 1 260 sorted_items = SCHOOLFEES[student.certcode].items() 265 if student.entry_session < 2022: 266 sorted_items = SCHOOLFEES_21[student.certcode].items() 267 else: 268 sorted_items = SCHOOLFEES_22[student.certcode].items() 261 269 sorted_items.insert(0, sorted_items.pop(4)) 262 270 for item in sorted_items: -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r17431 r17444 33 33 34 34 schoolfees_path = os.path.join( 35 os.path.dirname(__file__), 'schoolfees .csv')35 os.path.dirname(__file__), 'schoolfees_22.csv') 36 36 reader = csv.DictReader(open(schoolfees_path, 'rb')) 37 SCHOOLFEES = {item['code']:(item['tuition'], item.values()) for item in reader} 37 SCHOOLFEES_22 = {item['code']:(item['tuition'], item.values()) for item in reader} 38 39 schoolfees_path = os.path.join( 40 os.path.dirname(__file__), 'schoolfees_21.csv') 41 reader = csv.DictReader(open(schoolfees_path, 'rb')) 42 SCHOOLFEES_21 = {item['code']:(item['tuition'], item.values()) for item in reader} 43 38 44 acceptancefees_path = os.path.join( 39 45 os.path.dirname(__file__), 'acceptancefees.csv') … … 356 362 return _("No additional fees required."), None 357 363 try: 358 acceptancefees _entry= ACCEPTANCEFEES[student.certcode]364 acceptancefees = ACCEPTANCEFEES[student.certcode] 359 365 except KeyError: 360 366 return _('Acceptance fees not yet fixed.'), None 361 367 if category == 'clearance_incl': 362 for item in acceptancefees _entry[1]:368 for item in acceptancefees[1]: 363 369 try: 364 370 amount += int(item) … … 366 372 pass 367 373 else: 368 amount = float(acceptancefees _entry[0])374 amount = float(acceptancefees[0]) 369 375 elif category == 'late_registration': 370 376 if student.is_postgrad: … … 384 390 return _('Study course data are incomplete.'), None 385 391 try: 386 schoolfees_entry = SCHOOLFEES[student.certcode] 392 if student.entry_session < 2022: 393 schoolfees = SCHOOLFEES_21[student.certcode] 394 else: 395 schoolfees = SCHOOLFEES_22[student.certcode] 387 396 except KeyError: 388 397 return _('School fees not yet fixed.'), None … … 404 413 "to pay by instalments."), None 405 414 additional = 0.0 406 for item in schoolfees _entry[1]:415 for item in schoolfees[1]: 407 416 try: 408 417 additional += int(item) 409 418 except: 410 419 pass 411 amount = float(schoolfees _entry[0])420 amount = float(schoolfees[0]) 412 421 additional -= amount 413 422 if previous_session:
Note: See TracChangeset for help on using the changeset viewer.