Changeset 14566 for main/waeup.fceokene
- Timestamp:
- 21 Feb 2017, 06:46:42 (8 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/interfaces.py
r13890 r14566 63 63 ) 64 64 65 penalty_nce _ft = schema.Float(66 title = _(u'NCE Full-Time Penalty Fee'),65 penalty_nce1_ft = schema.Float( 66 title = _(u'NCE I Full-Time Penalty Fee'), 67 67 default = 0.0, 68 68 required = False, 69 69 ) 70 70 71 penalty_nce_pt = schema.Float( 72 title = _(u'NCE Sandwich and Part-Time Penalty Fee'), 71 penalty_nce2_ft = schema.Float( 72 title = _(u'NCE II Full-Time Penalty Fee'), 73 default = 0.0, 74 required = False, 75 ) 76 77 penalty_nce3_ft = schema.Float( 78 title = _(u'NCE II Full-Time Penalty Fee'), 79 default = 0.0, 80 required = False, 81 ) 82 83 penalty_nce1_pt = schema.Float( 84 title = _(u'NCE I Sandwich and Part-Time Penalty Fee'), 85 default = 0.0, 86 required = False, 87 ) 88 89 penalty_nce2_pt = schema.Float( 90 title = _(u'NCE II Sandwich and Part-Time Penalty Fee'), 91 default = 0.0, 92 required = False, 93 ) 94 95 penalty_nce3_pt = schema.Float( 96 title = _(u'NCE III Sandwich and Part-Time Penalty Fee'), 73 97 default = 0.0, 74 98 required = False, -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_utils.py
r14556 r14566 47 47 self.certificate.end_level = 300 48 48 self.student['studycourse'].current_verdict = 'B' 49 self.student['studycourse'].current_level = 30049 self.student['studycourse'].current_level = 200 50 50 configuration = createObject('waeup.SessionConfiguration') 51 51 configuration.academic_session = 2005 52 52 self.app['configuration'].addSessionConfiguration(configuration) 53 self.app['configuration']['2005'].penalty_nce _ft = 99.053 self.app['configuration']['2005'].penalty_nce3_ft = 99.0 54 54 self.student['studycourse'].certificate.study_mode = 'nce_ft' 55 55 utils = getUtility(IStudentsUtils) … … 57 57 IWorkflowState(self.student).setState('returning') 58 58 error, payment = utils.setPaymentDetails('schoolfee',self.student) 59 self.assertEqual(payment.amount_auth, 1 2224.0) # 11975 + 150 + 9959 self.assertEqual(payment.amount_auth, 14124.0) # 13875 + 150 + 99 60 60 self.student['studycourse'].previous_verdict = 'O' 61 61 error, payment = utils.setPaymentDetails('schoolfee',self.student) 62 self.assertEqual(payment.amount_auth, 1 2125.0) # 11975 + 15062 self.assertEqual(payment.amount_auth, 14025.0) # 13875 + 150 63 63 return -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
r14556 r14566 277 277 if amount in (0.0, None): 278 278 return _(u'Amount could not be determined.'), None 279 # Add session specific penalty fee. 279 280 # Add session and level specific penalty fee. 280 281 if category == 'schoolfee' and student.current_mode in ( 281 282 'ug_ft', 'de_ft'): … … 283 284 elif category == 'schoolfee' and student.current_mode in ( 284 285 'nce_ft',) and student['studycourse'].previous_verdict != 'O': 285 amount += academic_session.penalty_nce_ft 286 # NCE I fresh 287 if student.current_level == 100 and student.state == CLEARED: 288 amount += academic_session.penalty_nce1_ft 289 # NCE II 290 elif student.current_level in (100, 110, 120) and \ 291 student.state == RETURNING: 292 amount += academic_session.penalty_nce2_ft 293 # NCE III (except repeaters and spillovers) 294 elif student.current_level in (200, 210, 220): 295 amount += academic_session.penalty_nce3_ft 286 296 elif category == 'schoolfee' and student.current_mode in ( 287 297 'nce_sw', 'nce_pt'): 288 amount += academic_session.penalty_nce_pt 298 # NCE I fresh 299 if student.current_level == 100 and student.state == CLEARED: 300 amount += academic_session.penalty_nce1_pt 301 # NCE II 302 elif student.current_level in (100, 110, 120) and \ 303 student.state == RETURNING: 304 amount += academic_session.penalty_nce2_pt 305 # NCE III (except repeaters and spillovers) 306 elif student.current_level in (200, 210, 220): 307 amount += academic_session.penalty_nce3_pt 289 308 elif category == 'schoolfee' and student.current_mode in ('prence',): 290 309 amount += academic_session.penalty_prence
Note: See TracChangeset for help on using the changeset viewer.