Changeset 17935 for main/kofacustom.unidel
- Timestamp:
- 4 Oct 2024, 08:59:10 (5 weeks ago)
- Location:
- main/kofacustom.unidel/trunk/src/kofacustom/unidel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/interswitch/browser.py
r17933 r17935 87 87 provider_amt = 0.0 88 88 tech_fee = 0.0 89 union_due = 0.0 89 90 if self.context.p_category == 'clearance': 90 91 provider_amt = 2000.0 … … 107 108 provider_amt = 6650.0 108 109 tech_fee = 2850.0 110 union_due = 1500.0 109 111 if student.is_fresh: 110 112 provider_amt = 7000.0 … … 113 115 xmldict['tech_acct'] = '0213065415' 114 116 xmldict['tech_bank_id'] = '47' 117 xmldict['union_acct'] = '1011438901' 118 xmldict['union_bank_id'] = '117' 115 119 if student.current_mode.startswith('dp'): 116 120 xmldict['institution_acct'] = '2001627961' … … 165 169 self.context.amount_auth += provider_amt 166 170 self.context.amount_auth += tech_fee 171 self.context.amount_auth += union_due 167 172 xmldict['provider_amt'] = 100 * provider_amt 168 173 xmldict['tech_fee'] = 100 * tech_fee 174 xmldict['union_due'] = 100 * union_due 169 175 xmldict['institution_item_name'] = self.context.category 170 176 xmldict['institution_name'] = INSTITUTION_NAME 171 177 xmldict['institution_amt'] = 100 * self.context.net_amt 172 if provider_amt == 0:173 178 xmldict['item_id'] = 1 179 xmltext = """<payment_item_detail> 174 180 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 175 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 176 </item_details> 177 </payment_item_detail>""" % xmldict 178 elif tech_fee == 0: 179 xmltext = """<payment_item_detail> 180 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 181 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 182 <item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" /> 183 </item_details> 184 </payment_item_detail>""" % xmldict 185 else: 186 xmltext = """<payment_item_detail> 187 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 188 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 189 <item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" /> 190 <item_detail item_id="3" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="%(tech_bank_id)s" acct_num="%(tech_acct)s"/> 181 <item_detail item_id="%(item_id)s" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 182 """ % xmldict 183 if provider_amt: 184 xmldict['item_id'] += 1 185 xmltext += """ 186 <item_detail item_id="%(item_id)s" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" /> 187 """ % xmldict 188 if tech_fee: 189 xmldict['item_id'] += 1 190 xmltext += """<item_detail item_id="%(item_id)s" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="%(tech_bank_id)s" acct_num="%(tech_acct)s"/> 191 """ % xmldict 192 if union_due: 193 xmldict['item_id'] += 1 194 xmltext += """<item_detail item_id="%(item_id)s" item_name="Student Union Due" item_amt="%(union_due)d" bank_id="%(union_bank_id)s" acct_num="%(union_acct)s"/> 191 195 </item_details> 192 196 </payment_item_detail>""" % xmldict -
main/kofacustom.unidel/trunk/src/kofacustom/unidel/interswitch/tests.py
r17931 r17935 78 78 self.assertEqual(self.student.current_mode, 'ug_ft') 79 79 self.assertTrue( 80 '<input type="hidden" name="amount" value="9 025000" />' in80 '<input type="hidden" name="amount" value="9175000" />' in 81 81 self.browser.contents) 82 82 self.assertTrue( 83 83 'item_name="School Fee" item_amt="8000000" bank_id="117" acct_num="1011739172"' in 84 self.browser.contents) 85 self.assertTrue( 86 '<item_detail item_id="4" item_name="Student Union Due" item_amt="150000" bank_id="117" acct_num="1011438901"/>' in 84 87 self.browser.contents) 85 88 -
main/kofacustom.unidel/trunk/src/kofacustom/unidel/utils/utils.py
r17934 r17935 58 58 'transcript_local': 'Transcript Fee Local Copy', 59 59 'transcript_inter': 'Transcript Fee International Copy', 60 'union': 'Student Union Due',60 #'union': 'Student Union Due', 61 61 } 62 62
Note: See TracChangeset for help on using the changeset viewer.