Changeset 9888 for main/waeup.futminna
- Timestamp:
- 15 Jan 2013, 14:45:32 (12 years ago)
- Location:
- main/waeup.futminna/trunk/src/waeup/futminna/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna/students/tests/test_browser.py
r9732 r9888 145 145 self.assertEqual(error, None) 146 146 147 self.certificate2.study_mode = 'pg_ft' 148 error, payment = utils.setPaymentDetails('schoolfee',self.student) 149 self.assertEqual(error, u'Amount could not be determined.') 150 self.certificate2.school_fee_1 = 876.55 151 error, payment = utils.setPaymentDetails('schoolfee',self.student) 152 self.assertEqual(payment.amount_auth, 876.55) 153 147 154 self.certificate2.study_mode = 'jm_ft' 148 155 error, payment = utils.setPaymentDetails('schoolfee',self.student) -
main/waeup.futminna/trunk/src/waeup/futminna/students/utils.py
r9732 r9888 78 78 except (AttributeError, TypeError): 79 79 return _('Study course data are incomplete.'), None 80 if student.current_mode.endswith('_ft'): 80 if student.is_postgrad: 81 if student.state == CLEARED: 82 if student.is_foreigner: 83 amount = getattr(certificate, 'school_fee_3', 0.0) 84 else: 85 amount = getattr(certificate, 'school_fee_1', 0.0) 86 elif student.state == RETURNING: 87 if student.is_foreigner: 88 amount = getattr(certificate, 'school_fee_4', 0.0) 89 else: 90 amount = getattr(certificate, 'school_fee_2', 0.0) 91 elif student.current_mode.endswith('_ft'): 81 92 # fresh remedial 82 93 if student.current_level == 10 and student.state == CLEARED: … … 149 160 # Add session specific penalty fee. 150 161 if category == 'schoolfee' and student.is_postgrad: 151 amount += academic_session.penalty_pg 162 if academic_session.penalty_pg == 9999.0: 163 amount = 0.0 164 else: 165 amount += academic_session.penalty_pg 152 166 elif category == 'schoolfee': 153 amount += academic_session.penalty_ug 167 if academic_session.penalty_ug == 9999.0: 168 amount = 0.0 169 else: 170 amount += academic_session.penalty_ug 154 171 payment = createObject(u'waeup.StudentOnlinePayment') 155 172 timestamp = ("%d" % int(time()*10000))[1:]
Note: See TracChangeset for help on using the changeset viewer.