Changeset 16386 for main/waeup.uniben/trunk/src
- Timestamp:
- 25 Jan 2021, 15:35:20 (4 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/interfaces.py
r15106 r16386 130 130 ) 131 131 132 medical_quest_fee = schema.Float( 133 title = _(u'Medical Questionnaire Fee'), 134 default = 0.0, 135 required = False, 136 ) 137 132 138 remita_enabled = schema.Bool( 133 139 title = _(u'Remita integration enabled'), -
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r16385 r16386 802 802 pnav = 4 803 803 804 def _medicalQuestPaymentMade(self, student, session): 805 if len(student['payments']): 806 for ticket in student['payments'].values(): 807 if ticket.p_state == 'paid' and \ 808 ticket.p_category == 'medical_quest' and \ 809 ticket.p_session == session: 810 return True 811 return False 812 813 def update(self): 814 if not self._medicalQuestPaymentMade( 815 self.context, self.context.current_session): 816 self.flash('Please pay medical questionnaire payment first.', 817 type="warning") 818 self.redirect(self.url(self.context)) 819 return 820 return super(StudentMedicalHistoryEditFormPage, self).update() 821 804 822 @property 805 823 def form_fields(self): -
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r16385 r16386 1170 1170 1171 1171 def test_student_medical_questionnaire(self): 1172 self.app['configuration']['2004'].medical_quest_fee = 1000.0 1172 1173 IWorkflowInfo(self.student).fireTransition('admit') 1173 1174 self.browser.open(self.login_path) … … 1179 1180 self.browser.getLink("Base Data").click() 1180 1181 self.browser.getLink("Medical Questionnaire").click() 1182 self.assertTrue('Please pay medical questionnaire payment first' in 1183 self.browser.contents) 1184 self.assertEqual(self.browser.url, self.student_path) 1185 self.browser.open(self.payments_path) 1186 self.browser.getLink("Add current session payment ticket").click() 1187 self.browser.getControl(name="form.p_category").value = ['medical_quest'] 1188 self.browser.getControl("Create ticket").click() 1189 p_ticket = self.student['payments'].values()[0] 1190 p_ticket.approveStudentPayment() 1191 self.browser.getLink("Base Data").click() 1192 self.browser.getLink("Medical Questionnaire").click() 1181 1193 self.browser.getLink("Download medical questionnaire slip").click() 1182 1194 self.assertEqual(self.browser.headers['Status'], '200 Ok') -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r16382 r16386 275 275 elif category == 'clinexam': 276 276 amount = academic_session.clinexam_fee 277 elif category == 'medical_quest': 278 amount = academic_session.medical_quest_fee 277 279 elif category.startswith('pharmd') \ 278 280 and student.current_mode == 'special_ft': -
main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py
r16374 r16386 92 92 'carryover':'School Fee (carry over from previous sessions)', 93 93 'foreign':'School Fee (paid in foreign currency)', 94 'medical_quest':'Medical Questionnaire Fee', 94 95 } 95 96 … … 112 113 'pharmd_2':'PharmD Module 1 Fee (school fee prepayment)', 113 114 #'develop':'Development Fee', 115 'medical_quest':'Medical Questionnaire Fee', 114 116 } 115 117
Note: See TracChangeset for help on using the changeset viewer.