Changeset 14898
- Timestamp:
- 15 Nov 2017, 13:09:29 (7 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r14897 r14898 665 665 self.assertEqual(error, None) 666 666 667 self.certificate.study_mode = 'ug_ft'668 error, payment = utils.setPaymentDetails('bed_allocation',669 self.student, None, None)670 self.assertTrue(u'Amount could not be determined.' in error)671 self.student['studycourse'].current_session = 2004672 self.student['studycourse'].entry_session = 2004673 self.student['studycourse'].current_level = 100674 error, payment = utils.setPaymentDetails('bed_allocation',675 self.student, None, None)676 self.assertEqual(payment.p_level, 100)677 self.assertEqual(payment.p_session, 2004)678 self.assertEqual(payment.amount_auth, 650.0) # plus 500 student union679 self.assertEqual(payment.p_item, u'regular_male_fr')680 self.assertEqual(error, None)667 #self.certificate.study_mode = 'ug_ft' 668 #error, payment = utils.setPaymentDetails('bed_allocation', 669 # self.student, None, None) 670 #self.assertTrue(u'Amount could not be determined.' in error) 671 #self.student['studycourse'].current_session = 2004 672 #self.student['studycourse'].entry_session = 2004 673 #self.student['studycourse'].current_level = 100 674 #error, payment = utils.setPaymentDetails('bed_allocation', 675 # self.student, None, None) 676 #self.assertEqual(payment.p_level, 100) 677 #self.assertEqual(payment.p_session, 2004) 678 #self.assertEqual(payment.amount_auth, 650.0) # plus 500 student union 679 #self.assertEqual(payment.p_item, u'regular_male_fr') 680 #self.assertEqual(error, None) 681 681 682 682 self.certificate.study_mode = 'pg_ft' -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r14897 r14898 222 222 amount = academic_session.booking_fee 223 223 # Add student union dues 224 if not student.is_postgrad:225 stage = self.getAccommodationDetails(student)['bt']226 stage = stage.split('_')[2]227 if stage == 'fr':228 amount += 500.0229 elif stage in ('fi', 're') and student[230 'studycourse'].previous_verdict in (231 'A', 'B', 'F', 'J', 'M', 'C', 'Z'):232 amount += 300.0233 else:234 amount = 0.0224 #if not student.is_postgrad: 225 # stage = self.getAccommodationDetails(student)['bt'] 226 # stage = stage.split('_')[2] 227 # if stage == 'fr': 228 # amount += 500.0 229 # elif stage in ('fi', 're') and student[ 230 # 'studycourse'].previous_verdict in ( 231 # 'A', 'B', 'F', 'J', 'M', 'C', 'Z'): 232 # amount += 300.0 233 # else: 234 # amount = 0.0 235 235 elif category == 'hostel_maintenance': 236 236 amount = 0.0
Note: See TracChangeset for help on using the changeset viewer.