Changeset 13780 for main/waeup.aaue/trunk/src
- Timestamp:
- 17 Mar 2016, 07:07:58 (9 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r13770 r13780 183 183 184 184 def test_for_instalment_payments(self): 185 self.student['studycourse'].certificate.study_mode = 'ug_pt' 185 186 self.student['studycourse'].certificate.school_fee_1 = 6666.0 186 187 self.app['configuration']['2004'].union_fee = 1250.0 … … 188 189 self.student.nationality = u'NG' 189 190 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 191 self.browser.open(self.payments_path + '/addop') 192 self.browser.getControl(name="form.p_category").value = ['schoolfee_1'] 193 self.browser.getControl("Create ticket").click() 194 self.assertTrue( 195 'Part-time students are not allowed' in self.browser.contents) 196 self.student['studycourse'].certificate.study_mode = 'ug_ft' 190 197 self.browser.open(self.payments_path + '/addop') 191 198 self.browser.getControl(name="form.p_category").value = ['schoolfee_1'] -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r13755 r13780 212 212 except (AttributeError, TypeError): 213 213 return _('Study course data are incomplete.'), None 214 if category in ('schoolfee_1', 'schoolfee_2'): 215 if student.current_mode == 'ug_pt': 216 return _("Part-time students are not allowed " 217 "to pay by instalments."), None 218 if category == 'schoolfee_1' and student.state != CLEARED: 219 return _("Wrong state. Only students in state 'cleared' " 220 "are allowed to pay by instalments."), None 214 221 if student.state == CLEARED or category == 'schoolfee_2': 215 222 if student.is_foreigner: … … 221 228 if amount: 222 229 amount = gateway_net_amt(amount) / 2 + GATEWAY_AMT 223 elif category == 'schoolfee_1':224 return _("Wrong state. Only students in state 'cleared' "225 "are allowed to pay by instalments."), None226 230 elif student.state == RETURNING: 227 231 if student.is_postgrad and category == 'schoolfee_incl':
Note: See TracChangeset for help on using the changeset viewer.