Changeset 7152 for main/waeup.custom/trunk
- Timestamp:
- 20 Nov 2011, 10:26:54 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.custom/trunk/src/waeup/custom/students/utils.py
r7151 r7152 4 4 from waeup.sirp.students.utils import StudentsUtils 5 5 from waeup.sirp.students.interfaces import IStudentsUtils 6 7 def get_school_fee(student, surcharge): 8 study_mode = student['studycourse'].certificate.study_mode 9 entry_mode = student['studycourse'].entry_mode 10 state = student.state 11 #lga = student.lga 12 lga = 'nothing' 13 current_level = student['studycourse'].current_level 14 15 if study_mode.endswith('_ft'): 16 # fresh 17 if state == CLEARED: 18 return 40000 - surcharge 19 # returning 20 elif state == RETURNING: 21 return 20000 - surcharge 22 else: 23 return 0 24 else: 25 return 0 6 26 7 27 class StudentsUtils(StudentsUtils): … … 38 58 d['surcharge_1'] = academic_session.surcharge_1 39 59 d['surcharge_2'] = academic_session.surcharge_2 40 d['amount'] = self.getSchoolFee(student, d['surcharge_1'] + d['surcharge_2'])60 d['amount'] = get_school_fee(student, d['surcharge_1'] + d['surcharge_2']) 41 61 code = student['studycourse'].certificate.code 42 62 #session_string = academic_sessions_vocab.by_value[p_session + 1].title … … 46 66 d['error'] = u'Amount could not be determined.' 47 67 return d 48 49 def getSchoolFee(self, student, surcharge):50 study_mode = student['studycourse'].certificate.study_mode51 entry_mode = student['studycourse'].entry_mode52 state = student.state53 #lga = student.lga54 lga = 'nothing'55 current_level = student['studycourse'].current_level56 57 if study_mode.endswith('_ft'):58 # fresh59 if state == CLEARED:60 return 40000 - surcharge61 # returning62 elif state == RETURNING:63 return 20000 - surcharge64 else:65 return 066 else:67 return 0
Note: See TracChangeset for help on using the changeset viewer.