Changeset 14940
- Timestamp:
- 18 Jan 2018, 08:56:55 (7 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/browser.py
r14938 r14940 207 207 xmldict['amt4'] = 100 * 500 208 208 209 if student.faccode == 'SPAT': 210 xmltext = """<payment_item_detail> 211 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 212 <item_detail item_id="1" item_name="Students Welfare" item_amt="%(amt2)d" bank_id="11" acct_num="0037892949" /> 213 <item_detail item_id="2" item_name="Anti-Cult Book" item_amt="%(amt3)d" bank_id="11" acct_num="0037892949" /> 214 </item_details> 215 </payment_item_detail>""" % xmldict 216 else: 217 xmltext = """<payment_item_detail> 209 xmltext = """<payment_item_detail> 218 210 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 219 211 <item_detail item_id="1" item_name="SUG" item_amt="%(amt1)d" bank_id="11" acct_num="0038079930" /> … … 223 215 </item_details> 224 216 </payment_item_detail>""" % xmldict 217 218 # if student.faccode == 'SPAT': 219 # xmltext = """<payment_item_detail> 220 #<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 221 #<item_detail item_id="1" item_name="Students Welfare" item_amt="%(amt2)d" bank_id="11" acct_num="0037892949" /> 222 #<item_detail item_id="2" item_name="Anti-Cult Book" item_amt="%(amt3)d" bank_id="11" acct_num="0037892949" /> 223 #</item_details> 224 #</payment_item_detail>""" % xmldict 225 225 226 self.xml_data = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 226 227 self.context.provider_amt = provider_amt -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/tests.py
r14938 r14940 172 172 self.certificate.study_mode = 'nd_ft' 173 173 self.certificate.school_fee_3 = 30000.0 174 # Add dep_sug ticket174 # dep_sug tickets cannot be created 175 175 self.browser.open(self.payments_path + '/addop') 176 176 self.browser.getControl(name="form.p_category").value = ['dep_sug'] 177 177 self.browser.getControl("Create ticket").click() 178 self.assertTrue('Amount could not be determined' in self.browser.contents) 179 #self.assertTrue('ticket created' in self.browser.contents) 180 #ctrl = self.browser.getControl(name='val_id') 181 #dep_sug_pid = ctrl.options[0] 182 #self.assertTrue(self.student['payments'][dep_sug_pid].amount_auth == 1650) 183 #self.browser.getLink(dep_sug_pid).click() 184 #self.browser.getLink("CollegePAY", index=0).click() 185 #self.student['payments'][dep_sug_pid].p_state = 'paid' 186 #self.assertTrue( 187 # '<item_detail item_id="1" item_name="Students Welfare" ' 188 # 'item_amt="50000" bank_id="11" acct_num="0037892949" />' 189 # in self.browser.contents) 190 # Add school fee ticket 191 self.browser.open(self.payments_path + '/addop') 192 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 193 self.browser.getControl("Create ticket").click() 178 194 self.assertMatches('...ticket created...', self.browser.contents) 179 195 ctrl = self.browser.getControl(name='val_id') 180 dep_sug_pid = ctrl.options[0] 181 self.assertTrue(self.student['payments'][dep_sug_pid].amount_auth == 1650) 182 183 self.browser.getLink(dep_sug_pid).click() 184 self.browser.getLink("CollegePAY", index=0).click() 185 self.student['payments'][dep_sug_pid].p_state = 'paid' 186 self.assertTrue( 187 '<item_detail item_id="1" item_name="Students Welfare" ' 188 'item_amt="50000" bank_id="11" acct_num="0037892949" />' 189 in self.browser.contents) 190 # Add school fee ticket 191 self.browser.open(self.payments_path + '/addop') 192 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 193 self.browser.getControl("Create ticket").click() 194 self.assertMatches('...ticket created...', self.browser.contents) 195 ctrl = self.browser.getControl(name='val_id') 196 self.value = ctrl.options[1] 196 self.value = ctrl.options[0] 197 197 self.browser.getLink(self.value).click() 198 198 self.assertTrue('<span>30000.0</span>' in self.browser.contents) -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py
r14938 r14940 98 98 # Students are only allowed to pay school fee 99 99 # if current session dep_sug payment has been made. 100 if not self._dep_sug_paymentMade(student,101 student .current_session):100 if student.faccode != 'SPAT' and not self._dep_sug_paymentMade( 101 student, student.current_session): 102 102 return _('You have to pay NADESU/SA/SUG Dues first.'), None 103 103 if student.state == CLEARED: … … 180 180 amount = 3150.0 # includes GATEWAY_AMT 181 181 if student.faccode == 'SPAT': 182 amount = 1650.0 # includes GATEWAY_AMT 182 # amount = 1650.0 # includes GATEWAY_AMT 183 amount = 0.0 183 184 else: 184 185 fee_name = category + '_fee'
Note: See TracChangeset for help on using the changeset viewer.