Changeset 13374 for main/waeup.aaue/trunk/src/waeup/aaue/students
- Timestamp:
- 1 Nov 2015, 14:11:52 (9 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r13359 r13374 124 124 self.assertMatches('...Amount could not be determined...', 125 125 self.browser.contents) 126 self.app['configuration']['2004'].school_fee_1 = 6666.0127 126 #self.browser.getControl(name="form.p_category").value = ['schoolfee'] 128 127 # Accepotance fee must be paid first … … 136 135 cpt_value = ctrl.options[0] 137 136 # School fee payment ticket can be added ... 137 self.student['studycourse'].certificate.school_fee_1 = 6666.0 138 self.student.nationality = u'NG' 138 139 self.browser.open(self.payments_path + '/addop') 139 140 self.browser.getControl(name="form.p_category").value = ['schoolfee'] … … 235 236 236 237 def test_manage_payments_bypass_ac_creation(self): 237 self.app['configuration']['2004'].school_fee_1 = 6666.0 238 self.student['studycourse'].certificate.school_fee_1 = 6666.0 239 self.student.nationality = u'NG' 238 240 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 239 241 self.browser.open(self.payments_path) -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py
r13359 r13374 52 52 self.app['configuration']['2004'].clearance_fee = 1234.0 53 53 self.app['configuration']['2004'].clearance_fee_fp = 3456.0 54 self.app['configuration']['2004'].school_fee_1 = 6666.0 54 self.student['studycourse'].certificate.school_fee_1 = 6666.0 55 self.student['studycourse'].certificate.school_fee_2 = 7777.0 56 self.student.nationality = u'NG' 55 57 utils = getUtility(IStudentsUtils) 56 58 … … 58 60 configuration.academic_session = 2005 59 61 self.app['configuration'].addSessionConfiguration(configuration) 60 self.app['configuration']['2005'].school_fee_2 = 7777.061 62 62 63 error, payment = utils.setPaymentDetails('schoolfee',self.student) -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r13359 r13374 121 121 elif category == 'hostel_maintenance': 122 122 amount = academic_session.maint_fee 123 elif category == 'welfare': 124 amount = academic_session.welfare_fee 125 elif category == 'union': 126 amount = academic_session.union_fee 127 elif category == 'lapel': 128 amount = academic_session.lapel_fee 129 elif category == 'matric_gown': 130 amount = academic_session.matric_gown_fee 131 elif category == 'concessional': 132 amount = academic_session.concession_fee 133 elif category == 'medical': 134 amount = academic_session.medical_fee 123 135 elif category == 'clearance': 124 136 if student.faccode == 'FP': … … 136 148 return _('Study course data are incomplete.'), None 137 149 if student.state == CLEARED: 138 if student. faccode == 'FP':139 amount = academic_session.school_fee_3150 if student.is_foreigner: 151 amount = getattr(certificate, 'school_fee_3', 0.0) 140 152 else: 141 amount = academic_session.school_fee_1 142 elif student.state == RETURNING or\ 143 (student.is_postgrad and student.state == PAID): 144 academic_session = self._getSessionConfiguration(p_session) 145 if academic_session == None: 146 return _(u'Session configuration object is not available.'), None 147 if student.state == RETURNING: 148 p_session, p_level = self.getReturningData(student) 149 else: 150 # Returning postgraduate students also pay for the 151 # next session but their level always remains the same. 152 p_session += 1 153 amount = getattr(certificate, 'school_fee_1', 0.0) 154 elif student.state == RETURNING: 155 # In case of returning school fee payment the payment session 156 # and level contain the values of the session the student 157 # has paid for. 158 p_session, p_level = self.getReturningData(student) 153 159 try: 154 160 academic_session = grok.getSite()[ … … 156 162 except KeyError: 157 163 return _(u'Session configuration object is not available.'), None 158 amount = academic_session.school_fee_2 164 if student.is_foreigner: 165 amount = getattr(certificate, 'school_fee_4', 0.0) 166 else: 167 amount = getattr(certificate, 'school_fee_2', 0.0) 159 168 else: 160 169 return _('Wrong state.'), None
Note: See TracChangeset for help on using the changeset viewer.