Changeset 17444 for main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
- Timestamp:
- 21 Jun 2023, 04:37:43 (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.