Changeset 14921 for main/kofacustom.dspg/trunk
- Timestamp:
- 7 Dec 2017, 16:58:30 (7 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/browser.py
r14889 r14921 196 196 </payment_item_detail>""" % xmldict 197 197 198 # dep_sug payments are treated completely separately. The following lines 199 # override the configuration above. 200 if self.context.p_category == 'dep_sug': 201 self.pay_item_id = '102' # We use school fee item id 202 # amount_auth is being ignored. However, the sum of all split payments 203 # must coincide with the amount_auth configured in students/utils.py 204 xmldict['amt1'] = 100 * (1000 - GATEWAY_AMT) 205 xmldict['amt2'] = 100 * 500 206 xmldict['amt3'] = 100 * 900 207 xmldict['amt4'] = 100 * 500 208 xmltext = """<payment_item_detail> 209 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 210 <item_detail item_id="1" item_name="SUG" item_amt="%(amt1)d" bank_id="11" acct_num="0038079930" /> 211 <item_detail item_id="2" item_name="Students Welfare" item_amt="%(amt2)d" bank_id="11" acct_num="0037892949" /> 212 <item_detail item_id="3" item_name="Anti-Cult Book" item_amt="%(amt3)d" bank_id="11" acct_num="0037892949" /> 213 <item_detail item_id="4" item_name="NADESSTU " item_amt="%(amt4)d" bank_id="11" acct_num="0036375968" /> 214 </item_details> 215 </payment_item_detail>""" % xmldict 216 198 217 self.xml_data = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 199 218 self.context.provider_amt = provider_amt -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/tests.py
r14889 r14921 182 182 in self.browser.contents) 183 183 184 def test_interswitch_form_dep_sug_payments(self): 185 # Manager can access InterswitchForm 186 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 187 self.browser.open(self.payments_path) 188 IWorkflowState(self.student).setState('cleared') 189 self.browser.open(self.payments_path + '/addop') 190 self.browser.getControl(name="form.p_category").value = ['dep_sug'] 191 self.browser.getControl("Create ticket").click() 192 self.assertMatches('...ticket created...', self.browser.contents) 193 ctrl = self.browser.getControl(name='val_id') 194 self.value = ctrl.options[0] 195 self.browser.getLink(self.value).click() 196 self.assertTrue('<span>2900.0</span>' in self.browser.contents) 197 self.payment_url = self.browser.url 198 self.browser.getLink("CollegePAY", index=0).click() 199 self.assertTrue('<item_detail item_id="1" item_name="SUG" item_amt="75000" bank_id="11" acct_num="0038079930" />' 200 in self.browser.contents) 201 self.assertTrue('<item_detail item_id="2" item_name="Students Welfare" item_amt="50000" bank_id="11" acct_num="0037892949" />' 202 in self.browser.contents) 203 self.assertTrue('<item_detail item_id="3" item_name="Anti-Cult Book" item_amt="90000" bank_id="11" acct_num="0037892949" />' 204 in self.browser.contents) 205 self.assertTrue('<item_detail item_id="4" item_name="NADESSTU " item_amt="50000" bank_id="11" acct_num="0036375968" />' 206 in self.browser.contents) 207 184 208 @external_test 185 209 def test_webservice(self): -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py
r14919 r14921 163 163 elif category == 'carryover4': 164 164 amount = 13000.0 165 elif category == 'dep_sug': 166 amount = 2900.0 165 167 else: 166 168 fee_name = category + '_fee' -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/utils/utils.py
r14903 r14921 38 38 39 39 STUDY_MODES_DICT = { 40 'transfer': 'Transfer', 40 41 'ug_ft': 'Undergraduate Full Time', 41 42 'ug_pt': 'Undergraduate Part Time', … … 55 56 'clearance': 'Acceptance', 56 57 'schoolfee': 'School Fee', 58 'dep_sug':'Departmental and SUG Dues', # is not a special paynent 57 59 'carryover1': '1, 2 or 3 Carry-Over Courses', 58 60 'carryover4': '4 Carry-Over Courses', … … 108 110 'clearance': 'Acceptance', 109 111 'schoolfee': 'School Fee', 112 'dep_sug':'Departmental and SUG Dues', 110 113 #'carryover1': 'One Carry-Over', 111 114 #'carryover2': 'Two Carry-Overs',
Note: See TracChangeset for help on using the changeset viewer.