Changeset 15178
- Timestamp:
- 26 Sep 2018, 14:15:21 (6 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/studylevel.py
r15090 r15178 139 139 140 140 restitution_paid = True 141 if self.student.entry_session < 2016 \ 142 and self.student.current_mode in ('ug_ft', 'dp_ft'): 141 if self.student.current_session == 2016 \ 142 and self.student.current_mode in ('ug_ft', 'dp_ft') \ 143 and not self.student.is_fresh: 143 144 restitution_paid = False 144 145 for ticket in self.student['payments'].values(): -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r14944 r15178 617 617 618 618 def test_late_registration(self): 619 self.app['configuration']['2004'].restitution_fee = 9999.0620 619 delta = timedelta(days=10) 621 620 self.app['configuration'][ … … 625 624 # returning students. 626 625 self.student['studycourse'].entry_session = 2003 626 self.student['studycourse'].current_session = 2016 627 627 # Login 628 628 self.browser.open(self.login_path) … … 631 631 self.browser.getControl("Login").click() 632 632 # Make restitution fee payment 633 # Ivie: The restitution was only for returning students of 2016/2017. 634 # Hence, it is only valid for 2016 payment session returning students. 635 configuration = createObject('waeup.SessionConfiguration') 636 configuration.academic_session = 2016 637 self.app['configuration'].addSessionConfiguration(configuration) 638 self.app['configuration']['2016'].restitution_fee = 9999.0 633 639 self.browser.open(self.payments_path + '/addop') 634 640 self.browser.getControl(name="form.p_category").value = ['restitution'] … … 636 642 self.student['payments'].values()[0].approveStudentPayment() 637 643 # Make late registration fee fee payment 644 self.student['studycourse'].current_session = 2004 638 645 self.browser.open(self.payments_path + '/addop') 639 646 self.browser.getControl(name="form.p_category").value = ['late_registration'] … … 1011 1018 IWorkflowState(self.student).setState('school fee paid') 1012 1019 self.student['studycourse'].entry_session = 2004 1013 self.student['studycourse'].current_session = 20 041020 self.student['studycourse'].current_session = 2016 1014 1021 self.browser.open(self.login_path) 1015 1022 self.browser.getControl(name="form.login").value = self.student_id … … 1031 1038 self.assertTrue('Please pay restitution fee first' 1032 1039 in self.browser.contents) 1033 self.app['configuration']['2004'].restitution_fee = 9999.0 1040 configuration = createObject('waeup.SessionConfiguration') 1041 configuration.academic_session = 2016 1042 self.app['configuration'].addSessionConfiguration(configuration) 1043 self.app['configuration']['2016'].restitution_fee = 9999.0 1034 1044 self.browser.open(self.payments_path + '/addop') 1035 1045 self.browser.getControl(name="form.p_category").value = ['restitution'] -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py
r15095 r15178 149 149 self.assertEqual(error, 'Restitution fee payment not required.') 150 150 self.student['studycourse'].certificate.study_mode = 'ug_ft' 151 self.app['configuration']['2004'].restitution_fee = 1111.0 151 configuration = createObject('waeup.SessionConfiguration') 152 self.app['configuration']['2016'].restitution_fee = 1111.0 153 self.student['studycourse'].current_session = 2016 152 154 error, payment = utils.setPaymentDetails('restitution',self.student) 153 155 self.assertEqual(payment.p_level, 100) 154 self.assertEqual(payment.p_session, 20 04)156 self.assertEqual(payment.p_session, 2016) 155 157 self.assertEqual(payment.amount_auth, 1111.0) 156 158 self.assertEqual(payment.p_item, u'') 157 159 self.assertEqual(error, None) 158 160 161 self.student['studycourse'].current_session = 2004 159 162 error, payment = utils.setPaymentDetails('clearance',self.student, 2004, 100) 160 163 self.assertEqual(error, 'This is not a previous session.') -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r15096 r15178 299 299 amount = academic_session.booking_fee 300 300 elif category == 'restitution': 301 if student.entry_session >= 2016 \ 302 or student.current_mode not in ('ug_ft', 'dp_ft'): 301 if student.current_session != 2016 \ 302 or student.current_mode not in ('ug_ft', 'dp_ft') \ 303 or student.is_fresh: 303 304 return _(u'Restitution fee payment not required.'), None 304 305 amount = academic_session.restitution_fee
Note: See TracChangeset for help on using the changeset viewer.