Changeset 14246 for main/waeup.aaue/trunk/src/waeup/aaue
- Timestamp:
- 1 Nov 2016, 07:22:54 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r14244 r14246 437 437 print "Sample PDF transcript.pdf written to %s" % path 438 438 439 def test_payment_disabled(self): 440 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 441 self.browser.open(self.payments_path) 442 IWorkflowState(self.student).setState('cleared') 443 self.browser.getLink("Add current session payment ticket").click() 444 self.browser.getControl(name="form.p_category").value = ['schoolfee_incl'] 445 self.browser.getControl("Create ticket").click() 446 self.assertMatches('...ticket created...', self.browser.contents) 447 self.app['configuration']['2004'].payment_disabled = ['sf_all'] 448 self.browser.getLink("Add current session payment ticket").click() 449 self.browser.getControl(name="form.p_category").value = ['schoolfee_incl'] 450 self.browser.getControl("Create ticket").click() 451 self.assertMatches('...This category of payments has been disabled...', 452 self.browser.contents) 453 454 self.app['configuration']['2004'].payment_disabled = ['sf_pt'] 455 self.browser.getControl(name="form.p_category").value = ['schoolfee_incl'] 456 self.browser.getControl("Create ticket").click() 457 self.assertMatches('...ticket created...', self.browser.contents) 458 self.certificate.study_mode = 'ug_pt' 459 self.browser.getLink("Add current session payment ticket").click() 460 self.browser.getControl(name="form.p_category").value = ['schoolfee_incl'] 461 self.browser.getControl("Create ticket").click() 462 self.assertMatches('...This category of payments has been disabled...', 463 self.browser.contents) 464 465 self.app['configuration']['2004'].payment_disabled = ['sf_pg'] 466 self.browser.getControl(name="form.p_category").value = ['schoolfee_incl'] 467 self.browser.getControl("Create ticket").click() 468 self.assertMatches('...ticket created...', self.browser.contents) 469 self.certificate.study_mode = 'special_pg_ft' 470 self.browser.getLink("Add current session payment ticket").click() 471 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 472 self.browser.getControl("Create ticket").click() 473 self.assertMatches('...This category of payments has been disabled...', 474 self.browser.contents) 475 return 476 439 477 class StudentUITests(StudentsFullSetup): 440 478 """Tests for customized student class views and pages -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r14244 r14246 141 141 def _isPaymentDisabled(self, p_session, category, student): 142 142 academic_session = self._getSessionConfiguration(p_session) 143 if category.startswith('schoolfee') and \ 144 'sf_all' in academic_session.payment_disabled: 145 return True 143 if category.startswith('schoolfee'): 144 if 'sf_all' in academic_session.payment_disabled: 145 return True 146 if 'sf_pg' in academic_session.payment_disabled and \ 147 student.is_postgrad: 148 return True 149 if 'sf_pt' in academic_session.payment_disabled and \ 150 student.current_mode.endswith('_pt'): 151 return True 152 if 'sf_found' in academic_session.payment_disabled and \ 153 student.current_mode == 'found': 154 return True 146 155 if category.startswith('clearance') and \ 147 156 'cl_regular' in academic_session.payment_disabled and \ … … 314 323 if student.is_postgrad: 315 324 amount += academic_session.penalty_pg 316 if not student.lga.startswith('edo'):325 if student.lga and not student.lga.startswith('edo'): 317 326 amount += 20000.0 318 327 else: -
main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py
r14243 r14246 154 154 DISABLE_PAYMENT_GROUP_DICT = { 155 155 'sf_all': 'School Fee - All Students', 156 'sf_pg': 'School Fee - Postgraduate Students', 157 'sf_pt': 'School Fee - Part-Time Students', 158 'sf_found': 'School Fee - Foundation Students', 156 159 'maint_all': 'Accommodation Fee - All Students', 157 160 'cl_regular': 'Acceptance Fee - Regular Students',
Note: See TracChangeset for help on using the changeset viewer.