- Timestamp:
- 7 May 2014, 18:21:58 (11 years ago)
- Location:
- main/waeup.aaue/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/CHANGES.txt
r11625 r11627 5 5 =================== 6 6 7 * Render note on payment slips which indicates charges included. 7 * To guarantee that cleared students pay both acceptance fee and school fees, 8 the eTranzact History can only be queried for school fee payments if 9 acceptance/clearance fee has been successfully queried/paid beforehand. 10 11 * Render note on payment slips which indicates the charges included. 8 12 9 13 * Configure new and returning school fee in session configuration objects. … … 11 15 * Do not create activation code when paying acceptance (= clearance) 12 16 fee payment tickets. 13 14 * Cleared students must pay acceptance fee before paying school fees.15 17 16 18 * applicant_student_mapping extended. -
main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py
r11582 r11627 275 275 placeholder = _('Confirmation Number (PIN)') 276 276 277 def update(self): 278 super(EtranzactEnterPinPageStudent, self).update() 279 if self.context.p_category != 'schoolfee': 280 return 281 student = self.context.student 282 for ticket in student['payments'].values(): 283 if ticket.p_state == 'paid' and \ 284 ticket.p_category == 'clearance': 285 return 286 self.flash(_('Please pay acceptance fee first.'), type="danger") 287 self.redirect(self.url(self.context, '@@index')) 288 return 289 277 290 class EtranzactEnterPinPageApplicant(EtranzactEnterPinPageStudent): 278 291 """ -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r11624 r11627 135 135 self.browser.contents) 136 136 self.app['configuration']['2004'].school_fee_1 = 6666.0 137 self.browser.getControl(name="form.p_category").value = ['schoolfee']137 #self.browser.getControl(name="form.p_category").value = ['schoolfee'] 138 138 # Accepotance fee must be paid first 139 self.browser.getControl("Create ticket").click()140 self.assertMatches('...Please pay acceptance fee first...',141 self.browser.contents)139 #self.browser.getControl("Create ticket").click() 140 #self.assertMatches('...Please pay acceptance fee first...', 141 # self.browser.contents) 142 142 self.app['configuration']['2004'].clearance_fee = 666.0 143 143 self.browser.getControl(name="form.p_category").value = ['clearance'] 144 144 self.browser.getControl("Create ticket").click() 145 145 ctrl = self.browser.getControl(name='val_id') 146 value = ctrl.options[0]147 self.student['payments'][value].approveStudentPayment()146 cpt_value = ctrl.options[0] 147 # School fee payment ticket can be added ... 148 148 self.browser.open(self.payments_path + '/addop') 149 149 self.browser.getControl(name="form.p_category").value = ['schoolfee'] … … 151 151 self.assertMatches('...ticket created...', 152 152 self.browser.contents) 153 # ... but not paid through the query_history page. 153 154 ctrl = self.browser.getControl(name='val_id') 154 value = ctrl.options[1] 155 self.browser.getLink(value).click() 156 self.assertMatches('...Amount Authorized...', 157 self.browser.contents) 155 sfpt_value = ctrl.options[1] 156 self.browser.open(self.payments_path + '/' + sfpt_value) 157 self.browser.getLink("Query eTranzact History").click() 158 self.assertMatches('...alert-danger">Please pay acceptance fee first...', 159 self.browser.contents) 160 # If clearance/acceptance fee is paid ... 161 self.student['payments'][cpt_value].approveStudentPayment() 162 self.browser.getLink("Query eTranzact History").click() 163 # ... query_history page is accessible. 164 self.assertMatches( 165 '...<h1 class="kofa-content-label">Requery eTranzact History</h1>...', 166 self.browser.contents) 158 167 # Managers can open school fee payment slip 168 self.browser.open(self.payments_path + '/' + sfpt_value) 159 169 self.browser.getLink("Download payment slip").click() 160 170 self.assertEqual(self.browser.headers['Status'], '200 Ok') 161 171 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 162 # Set ticket paid 163 ticket = self.student['payments'][value].approveStudentPayment() 172 # If school fee ticket is paid ... 173 ticket = self.student['payments'][sfpt_value].approveStudentPayment() 174 # ... no further school fee ticket can be added. 164 175 self.browser.open(self.payments_path + '/addop') 165 176 self.browser.getControl(name="form.p_category").value = ['schoolfee'] … … 167 178 self.assertMatches('...This type of payment has already been made...', 168 179 self.browser.contents) 169 170 180 171 181 def deactivated_test_for_instalment_payments(self): -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py
r11624 r11627 37 37 return 38 38 39 def test_no_clearance_ac_code_created(self): 40 payment = createObject('waeup.StudentOnlinePayment') 41 payment.p_category = 'clearance' 42 self.student['payments']['any_id'] = payment 43 payment.approveStudentPayment() 44 # No activation code created. 45 self.assertEqual(payment.ac, None) 46 39 47 def test_set_payment_details(self): 40 48 self.app['configuration']['2004'].gown_fee = 150.0 … … 54 62 self.assertEqual(payment, None) 55 63 self.assertEqual(error, u'Wrong state.') 56 57 64 IWorkflowState(self.student).setState('cleared') 58 error, payment = utils.setPaymentDetails('schoolfee',self.student)59 # Acceptance fee must be paid first.60 self.assertEqual(error, 'Please pay acceptance fee first.')61 payment = createObject('waeup.StudentOnlinePayment')62 payment.p_category = 'clearance'63 self.student['payments']['any_id'] = payment64 payment.approveStudentPayment()65 # No activation code created.66 self.assertEqual(payment.ac, None)67 65 # School fee can be set. 68 66 error, payment = utils.setPaymentDetails('schoolfee',self.student) … … 72 70 self.assertEqual(payment.p_item, u'CERT1') 73 71 self.assertEqual(error, None) 74 75 72 # Add penalty fee ... 76 73 # ... for cleared -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r11624 r11627 109 109 new_session = student['studycourse'].current_session + 1 110 110 return new_session, new_level 111 112 def _acceptanceFeePaid(self, student):113 if len(student['payments']):114 for ticket in student['payments'].values():115 if ticket.p_state == 'paid' and \116 ticket.p_category == 'clearance':117 return True118 return False119 111 120 112 def setPaymentDetails(self, category, student, … … 159 151 return _('Study course data are incomplete.'), None 160 152 if student.state == CLEARED: 161 if not self._acceptanceFeePaid(student):162 return _('Please pay acceptance fee first.'), None163 153 if student.faccode == 'FP': 164 154 amount = 84000.0
Note: See TracChangeset for help on using the changeset viewer.