Changeset 10012 for main/waeup.fceokene/trunk/src/waeup/fceokene/students
- Timestamp:
- 5 Mar 2013, 21:39:26 (12 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py
r10010 r10012 96 96 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 97 97 self.browser.getControl("Create ticket").click() 98 self.assertMatches('... Amount could not be determined...',98 self.assertMatches('...Wrong state...', 99 99 self.browser.contents) 100 100 IWorkflowState(self.student).setState('cleared') … … 184 184 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 185 185 self.browser.getControl("Create ticket").click() 186 self.assertMatches('... Amount could not be determined...',186 self.assertMatches('...Wrong state...', 187 187 self.browser.contents) 188 188 … … 223 223 error, payment = utils.setPaymentDetails('schoolfee',self.student) 224 224 self.assertEqual(payment, None) 225 self.assertEqual(error, u' Amount could not be determined.')225 self.assertEqual(error, u'Wrong state.') 226 226 227 227 IWorkflowState(self.student).setState('cleared') 228 self.certificate.study_mode = 'nce_ft' 228 229 error, payment = utils.setPaymentDetails('schoolfee',self.student) 229 230 self.assertEqual(payment.p_level, 100) … … 244 245 self.assertEqual(payment.amount_auth, 11545.0) 245 246 self.assertEqual(payment.p_item, u'CERT1') 247 self.assertEqual(error, None) 248 249 # UG students pay 65150 250 self.certificate.study_mode = 'ug_ft' 251 error, payment = utils.setPaymentDetails('schoolfee',self.student) 252 self.assertEqual(payment.amount_auth, 65150.0) 246 253 self.assertEqual(error, None) 247 254 -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
r10010 r10012 122 122 'NFRE','NARB','NHAU','NIGB','NYOR','NSOS') 123 123 124 if student.state not in (CLEARED, RETURNING): 125 return _('Wrong state.'), None 126 124 127 #PDE 125 128 if student.current_mode == 'pd_ft': 126 129 amount = 35000 127 # NCE/UG 130 # UG 131 elif student.current_mode == 'ug_ft': 132 amount = 65150 133 # NCE 128 134 elif not student.current_mode.endswith('_sw'): 129 135 # PRENCE … … 133 139 else: 134 140 amount = 15400 135 # NCE /UGI fresh141 # NCE I fresh 136 142 elif student.current_level == 100 and student.state == CLEARED: 137 143 if student.depcode in ARTS: … … 139 145 else: 140 146 amount = 12495 141 # NCE /UGII147 # NCE II 142 148 elif student.current_level in (100, 110, 120) and \ 143 149 student.state == RETURNING: … … 146 152 else: 147 153 amount = 11545 148 # NCE /UGIII154 # NCE III 149 155 elif student.current_level in (200, 210, 220): 150 156 if student.depcode in ARTS: … … 152 158 else: 153 159 amount = 11545 154 # NCE /UGIII repeater160 # NCE III repeater 155 161 elif student.current_level in (300, 310, 320) and \ 156 162 student.current_verdict == 'O': … … 159 165 else: 160 166 amount = 6773 161 # NCE /UGIII spillover167 # NCE III spillover 162 168 elif student.current_level in (300, 310, 320) and \ 163 169 student.current_verdict == 'B': … … 166 172 else: 167 173 amount = 9645 168 # NCE /UGIII second spillover174 # NCE III second spillover 169 175 elif student.current_level in (400, 410, 420) and \ 170 176 student.current_verdict == 'B': … … 179 185 else: 180 186 amount = 22400 181 # NCE /UGII sw187 # NCE II sw 182 188 elif student.current_level in (100, 110, 120) and \ 183 189 student.state == RETURNING: … … 186 192 else: 187 193 amount = 18900 188 # NCE /UGIII sw194 # NCE III sw 189 195 elif student.current_level in (200, 210, 220): 190 196 if student.depcode in ARTS: … … 192 198 else: 193 199 amount = 20900 194 # NCE /UGIV sw200 # NCE IV sw 195 201 elif student.current_level in (300, 310, 320): 196 202 if student.depcode in ARTS: … … 198 204 else: 199 205 amount = 18900 200 # NCE /UGV sw206 # NCE V sw 201 207 elif student.current_level in (400, 410, 420): 202 208 if student.depcode in ARTS: … … 204 210 else: 205 211 amount = 18900 206 # NCE /UGV spillover sw212 # NCE V spillover sw 207 213 elif student.current_level in (500, 510, 520) and \ 208 214 student.current_verdict == 'B': … … 211 217 else: 212 218 amount = 17400 213 # NCE /UGV second spillover sw219 # NCE V second spillover sw 214 220 elif student.current_level in (600, 610, 620) and \ 215 221 student.current_verdict == 'B':
Note: See TracChangeset for help on using the changeset viewer.