Changeset 17963
- Timestamp:
- 26 Nov 2024, 02:34:19 (7 weeks ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/remita/browser.py
r17955 r17963 153 153 reduced_inst_amt = 0.0 154 154 lab_amt = 0.0 155 if self.context.p_category == 'schoolfee'and \155 if self.context.p_category in ('schoolfee', 'schoolfee_1') and \ 156 156 not self.context.p_item == 'Balance': 157 157 provider_amt = self.dynamic_provider_amt(self.context.student) -
main/waeup.uniben/trunk/src/waeup/uniben/students/payments.py
r17747 r17963 62 62 log = 'successful %s payment: %s' % (self.p_category, self.p_id) 63 63 msg = _('Payment successfully completed') 64 if self.p_category in ('schoolfee', ):64 if self.p_category in ('schoolfee', 'schoolfee_1'): 65 65 msg += _('. Please proceed to library clearance, register your ' 66 66 'courses online and proceed to your ' -
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r17885 r17963 810 810 return 811 811 812 def test_set_payment_details_jupeb(self): 813 # JUPEB students can pay by instalments 814 utils = getUtility(IStudentsUtils) 815 self.certificate.study_mode = 'found' 816 IWorkflowState(self.student).setState('cleared') 817 error, payment = utils.setPaymentDetails( 818 'schoolfee', self.student, None, None, None) 819 self.assertEqual(payment.p_level, 100) 820 self.assertEqual(payment.p_session, 2004) 821 self.assertEqual(payment.amount_auth, 220000.0) 822 self.assertEqual(payment.p_item, u'CERT1') 823 self.assertEqual(error, None) 824 error, payment = utils.setPaymentDetails( 825 'schoolfee_1', self.student, None, None, None) 826 self.assertEqual(payment.p_level, 100) 827 self.assertEqual(payment.p_session, 2004) 828 self.assertEqual(payment.amount_auth, 110000.0) 829 self.assertEqual(payment.p_item, u'CERT1') 830 self.assertEqual(error, None) 831 return 832 error, payment = utils.setPaymentDetails( 833 'secondinstall', self.student, None, None, None) 834 self.assertEqual(payment.p_level, 100) 835 self.assertEqual(payment.p_session, 2004) 836 self.assertEqual(payment.amount_auth, 110000.0) 837 self.assertEqual(payment.p_item, u'CERT1') 838 self.assertEqual(error, None) 839 812 840 def test_edit_level_by_co(self): 813 841 # Create clearance officer -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r17930 r17963 493 493 else: 494 494 amount = 60000.0 495 496 elif student.state == CLEARED \ 497 and student.is_jupeb and category in ('schoolfee', 'schoolfee_1', 498 'secondinstall'): 499 try: 500 certificate = student['studycourse'].certificate 501 p_item = certificate.code 502 except (AttributeError, TypeError): 503 return _('Study course data are incomplete.'), None 504 amount = 220000.0 505 if category in ('schoolfee_1', 'secondinstall'): 506 amount /= 2 507 495 508 elif category == 'schoolfee': 496 509 try: … … 580 593 if student.is_staff: 581 594 amount /= 2 582 583 595 else: 584 596 fee_name = category + '_fee' -
main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py
r17916 r17963 74 74 PAYMENT_CATEGORIES = { 75 75 'schoolfee': 'School Fee', 76 'schoolfee_1': 'School Fee (1st instalment)', 77 'secondinstall':'School Fee (2nd instalment)', 76 78 'clearance': 'Acceptance Fee', 77 79 'bed_allocation': 'Bed Allocation Fee', … … 126 128 REPORTABLE_PAYMENT_CATEGORIES = { 127 129 'schoolfee': 'School Fee', 130 'schoolfee_1': 'School Fee (1st instalment)', 131 'secondinstall':'School Fee (2nd instalment)', 128 132 'clearance': 'Acceptance Fee', 129 133 'bed_allocation': 'Bed Allocation Fee', … … 133 137 134 138 def selectable_payment_categories(self, student): 135 return self.SELECTABLE_PAYMENT_CATEGORIES 139 spc = deepcopy(self.SELECTABLE_PAYMENT_CATEGORIES) 140 if student.is_jupeb: 141 spc[schoolfee_1] = 'School Fee (1st instalment)' 142 spc[secondinstal] = 'School Fee (2nd instalment)' 143 return spc 136 144 137 145 PREVIOUS_PAYMENT_CATEGORIES = deepcopy(SELECTABLE_PAYMENT_CATEGORIES) … … 147 155 'sf_return': 'School Fee - Returning', 148 156 'maint_all': 'Accomm. Fee - All', 149 'cl_all': 'Accept. Fee - All',157 'cl_all': 'Accept. Fee - All', 150 158 'cl_jupeb': 'Accept. Fee - JUPEB', 151 159 'cl_allexj': 'Accept. Fee - All except JUPEB',
Note: See TracChangeset for help on using the changeset viewer.