Changeset 14875 for main/kofacustom.dspg/trunk/src/kofacustom/dspg/students
- Timestamp:
- 24 Oct 2017, 08:43:15 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py
r14861 r14875 23 23 from kofacustom.dspg.interfaces import MessageFactory as _ 24 24 25 26 def local(student): 27 lga = getattr(student, 'lga') 28 if lga and lga.startswith('delta'): 29 return True 30 return False 31 25 32 class CustomStudentsUtils(NigeriaStudentsUtils): 26 33 """A collection of customized methods. 27 28 34 """ 29 35 … … 71 77 # update method of the PreviousPaymentAddFormPage. 72 78 if previous_level == 100: 73 amount = getattr(certificate, 'school_fee_1', 0.0) 79 if local(student): 80 amount = getattr(certificate, 'school_fee_1', 0.0) 81 else: 82 amount = getattr(certificate, 'school_fee_3', 0.0) 74 83 else: 75 amount = getattr(certificate, 'school_fee_2', 0.0) 84 if local(student): 85 amount = getattr(certificate, 'school_fee_2', 0.0) 86 else: 87 amount = getattr(certificate, 'school_fee_4', 0.0) 76 88 else: 77 89 if student.state == CLEARED: 78 amount = getattr(certificate, 'school_fee_1', 0.0) 90 if local(student): 91 amount = getattr(certificate, 'school_fee_1', 0.0) 92 else: 93 amount = getattr(certificate, 'school_fee_3', 0.0) 79 94 elif student.state == RETURNING: 80 95 # In case of returning school fee payment the … … 88 103 u'Session configuration object is not available.' 89 104 ), None 90 amount = getattr(certificate, 'school_fee_2', 0.0) 105 if local(student): 106 amount = getattr(certificate, 'school_fee_2', 0.0) 107 else: 108 amount = getattr(certificate, 'school_fee_4', 0.0) 91 109 elif student.is_postgrad and student.state == PAID: 92 110 # Returning postgraduate students also pay for the … … 99 117 u'Session configuration object is not available.' 100 118 ), None 101 amount = getattr(certificate, 'school_fee_2', 0.0) 119 if local(student): 120 amount = getattr(certificate, 'school_fee_2', 0.0) 121 else: 122 amount = getattr(certificate, 'school_fee_4', 0.0) 102 123 elif category == 'clearance': 103 124 try: … … 106 127 return _('Study course data are incomplete.'), None 107 128 amount = academic_session.clearance_fee 129 if student.current_mode == 'nd_ft' and local(student): 130 amount /= 2 131 if student.current_mode == 'hnd_ft': 132 amount = 0.0 108 133 elif category == 'bed_allocation': 109 134 p_item = self.getAccommodationDetails(student)['bt']
Note: See TracChangeset for help on using the changeset viewer.