- Timestamp:
- 4 Dec 2015, 18:10:26 (9 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py
r13482 r13534 50 50 self.app['configuration']['2004'].booking_fee = 150.0 51 51 self.app['configuration']['2004'].maint_fee = 180.0 52 self.app['configuration']['2004'].clearance_fee = 1234.052 self.app['configuration']['2004'].clearance_fee_pg = 1234.0 53 53 self.app['configuration']['2004'].clearance_fee_fp = 3456.0 54 54 self.student['studycourse'].certificate.school_fee_1 = 6666.0 55 55 self.student['studycourse'].certificate.school_fee_2 = 7777.0 56 self.student['studycourse'].certificate.study_mode = 'special_pg_ft' 56 57 self.student.nationality = u'NG' 58 self.student.lga = 'ebonyi_ukaba' 57 59 utils = getUtility(IStudentsUtils) 58 60 … … 69 71 self.assertEqual(payment.p_level, 100) 70 72 self.assertEqual(payment.p_session, 2004) 71 self.assertEqual(payment.amount_auth, 6666.0) 73 # 20000 Naira non-indigenous fee added 74 self.assertEqual(payment.amount_auth, 26666.0) 72 75 self.assertEqual(payment.p_item, u'CERT1') 73 76 self.assertEqual(error, None) 74 77 # Add penalty fee ... 75 78 # ... for cleared 76 self.app['configuration']['2004'].penalty_ ug = 99.079 self.app['configuration']['2004'].penalty_pg = 99.0 77 80 # ... for returning 78 self.app['configuration']['2005'].penalty_ug = 88.0 81 self.app['configuration']['2005'].penalty_pg = 88.0 82 self.student.lga = 'edo_afuze' 79 83 error, payment = utils.setPaymentDetails('schoolfee',self.student) 80 84 self.assertEqual(payment.amount_auth, 6765.0) -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r13526 r13534 217 217 amount += gateway_net_amt(academic_session.welfare_fee) + \ 218 218 gateway_net_amt(academic_session.union_fee) 219 # Add non-indigenous fee and session specific penalty fees 220 if student.is_postgrad: 221 amount += academic_session.penalty_pg 222 if not student.lga.startswith('edo'): 223 amount += 20000.0 224 else: 225 amount += academic_session.penalty_ug 219 226 if amount in (0.0, None): 220 227 return _(u'Amount could not be determined.'), None 221 # Add session specific penalty fee. 222 if category.startswith('schoolfee') and student.is_postgrad: 223 amount += academic_session.penalty_pg 224 elif category.startswith('schoolfee'): 225 amount += academic_session.penalty_ug 228 226 229 # Create ticket. 227 230 for key in student['payments'].keys():
Note: See TracChangeset for help on using the changeset viewer.