Changeset 14544 for main/waeup.aaue/trunk/src/waeup/aaue
- Timestamp:
- 14 Feb 2017, 08:52:06 (8 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py
r14487 r14544 128 128 self.assertEqual(error, None) 129 129 130 error, payment = utils.setPaymentDetails('clearance',self.student, 2004, 100) 131 self.assertEqual(error, 'This is not a previous session.') 130 132 error, payment = utils.setPaymentDetails('schoolfee',self.student, 2004, 100) 131 self.assertEqual(error, u'Previous session payment not yet implemented.') 133 self.assertEqual(payment.p_level, 100) 134 self.assertEqual(payment.p_session, 2004) 135 self.assertEqual(payment.amount_auth, 6666.0) 136 self.assertEqual(payment.p_item, u'CERT1') 137 self.assertEqual(error, None) 132 138 return 133 139 -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r14538 r14544 220 220 error = u'' 221 221 if previous_session: 222 return _('Previous session payment not yet implemented.'), None 223 p_session = student['studycourse'].current_session 224 p_level = student['studycourse'].current_level 225 p_current = True 222 if previous_session < student['studycourse'].entry_session: 223 return _('The previous session must not fall below ' 224 'your entry session.'), None 225 if category == 'schoolfee': 226 # School fee is always paid for the following session 227 if previous_session > student['studycourse'].current_session: 228 return _('This is not a previous session.'), None 229 else: 230 if previous_session > student['studycourse'].current_session - 1: 231 return _('This is not a previous session.'), None 232 p_session = previous_session 233 p_level = previous_level 234 p_current = False 235 else: 236 p_session = student['studycourse'].current_session 237 p_level = student['studycourse'].current_level 238 p_current = True 226 239 academic_session = self._getSessionConfiguration(p_session) 227 240 if academic_session == None: … … 305 318 if student.is_postgrad and category != 'schoolfee': 306 319 return _("No additional fees required."), None 307 if student.current_mode in (320 if not previous_session and student.current_mode in ( 308 321 'ug_ft', 'ug_pt', 'de_ft', 'de_pt', 309 322 'transfer', 'mug_ft', 'mde_ft') \ … … 319 332 return _("You are not allowed " 320 333 "to pay by instalments."), None 321 if student.state == CLEARED and category != 'schoolfee_2': 334 if previous_session: 335 # Students can pay for previous sessions in all 336 # workflow states. Fresh students are excluded by the 337 # update method of the PreviousPaymentAddFormPage. 338 if previous_level == 100: 339 amount = getattr(certificate, 'school_fee_1', 0.0) 340 else: 341 if student.entry_session >= 2015: 342 amount = getattr(certificate, 'school_fee_2', 0.0) 343 else: 344 amount = getattr(certificate, 'school_fee_3', 0.0) 345 elif student.state == CLEARED and category != 'schoolfee_2': 322 346 amount = getattr(certificate, 'school_fee_1', 0.0) 323 347 # Cut school fee by 50% -
main/waeup.aaue/trunk/src/waeup/aaue/students/viewlets.py
r14315 r14544 37 37 from waeup.aaue.interfaces import MessageFactory as _ 38 38 39 class AddPreviousPaymentActionButton(AddPreviousPaymentActionButton):39 #class AddPreviousPaymentActionButton(AddPreviousPaymentActionButton): 40 40 41 @property42 def target_url(self):43 return ''41 # @property 42 # def target_url(self): 43 # return '' 44 44 45 45 #class AddBalancePaymentActionButton(AddBalancePaymentActionButton): -
main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py
r14501 r14544 122 122 'fac_dep': 'Faculty and Departmental Dues', 123 123 'restitution': 'Restitution Fee', 124 } 125 126 PREVIOUS_PAYMENT_CATEGORIES = { 127 'schoolfee': 'School Fee', 128 'clearance': 'Acceptance Fee', 124 129 } 125 130
Note: See TracChangeset for help on using the changeset viewer.