Changeset 13414 for main/waeup.aaue/trunk/src/waeup/aaue/interswitch
- Timestamp:
- 9 Nov 2015, 07:08:21 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r13410 r13414 49 49 50 50 51 def dynamic_gateway_amt(fee): 52 return GATEWAY_AMT 51 def gateway_net_amt(fee): 52 if fee > GATEWAY_AMT: 53 return fee - GATEWAY_AMT 54 return 0.0 53 55 54 56 def contr_agreement(student): … … 87 89 xmldict['provider_bank_id'] = PROVIDER_BANK_ID 88 90 xmldict['provider_item_name'] = PROVIDER_ITEM_NAME 89 xmldict['institution_amt'] = 100 * (self.context.amount_auth - provider_amt - GATEWAY_AMT) 91 xmldict['institution_amt'] = 100 * ( 92 self.context.amount_auth - provider_amt - GATEWAY_AMT) 90 93 xmldict['institution_item_name'] = self.context.p_category 91 94 xmldict['institution_name'] = INSTITUTION_NAME … … 189 192 joint_venture_amt = 1100.0 190 193 aaue_share_amt = 1000.0 191 student_union_due_amt = academic_session.union_fee - \192 dynamic_gateway_amt(academic_session.union_fee)193 student_welfare_assurance_amt = academic_session.welfare_fee - \194 dynamic_gateway_amt(academic_session.welfare_fee)194 student_union_due_amt = gateway_net_amt( 195 academic_session.union_fee) 196 student_welfare_assurance_amt = gateway_net_amt( 197 academic_session.welfare_fee) 195 198 xmldict['institution_bank_id'] = '7' 196 199 xmldict['institution_acct'] = '1014847058' … … 204 207 joint_venture_amt = 1000.0 205 208 aaue_share_amt = 1500.0 206 student_union_due_amt = academic_session.union_fee - \207 dynamic_gateway_amt(academic_session.union_fee)208 student_welfare_assurance_amt = academic_session.welfare_fee - \209 dynamic_gateway_amt(academic_session.welfare_fee)209 student_union_due_amt = gateway_net_amt( 210 academic_session.union_fee) 211 student_welfare_assurance_amt = gateway_net_amt( 212 academic_session.welfare_fee) 210 213 xmldict['institution_bank_id'] = '117' 211 214 xmldict['institution_acct'] = '1010827641' … … 220 223 xmldict['student_welfare_assurance_amt'] = 100 * student_welfare_assurance_amt 221 224 xmldict['institution_amt'] = 100 * ( 222 self.context.amount_auth225 gateway_net_amt(self.context.amount_auth) 223 226 - provider_amt 224 227 - joint_venture_amt 225 228 - aaue_share_amt 226 229 - student_union_due_amt 227 - student_welfare_assurance_amt 228 - dynamic_gateway_amt(self.context.amount_auth)) 230 - student_welfare_assurance_amt) 229 231 xmltext = """<payment_item_detail> 230 232 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 240 242 # Schoolfee without additional fees 241 243 xmldict['institution_amt'] = 100 * ( 242 self.context.amount_auth244 gateway_net_amt(self.context.amount_auth) 243 245 - provider_amt 244 246 - joint_venture_amt 245 - aaue_share_amt 246 - dynamic_gateway_amt(self.context.amount_auth)) 247 - aaue_share_amt) 247 248 xmltext = """<payment_item_detail> 248 249 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 273 274 if self.context.p_category.endswith('_incl'): 274 275 # Clearance including additional fees 275 gown_fee_amt = academic_session.matric_gown_fee - \ 276 dynamic_gateway_amt(academic_session.matric_gown_fee) 277 aaue_fl_fee_amt = academic_session.lapel_fee - \ 278 dynamic_gateway_amt(academic_session.lapel_fee) 276 gown_fee_amt = gateway_net_amt(academic_session.matric_gown_fee) 277 aaue_lf_fee_amt = gateway_net_amt(academic_session.lapel_fee) 279 278 xmldict['gown_fee_amt'] = 100 * gown_fee_amt 280 xmldict['aaue_ fl_fee_amt'] = 100 * aaue_fl_fee_amt279 xmldict['aaue_lf_fee_amt'] = 100 * aaue_lf_fee_amt 281 280 xmldict['institution_amt'] = 100 * ( 282 self.context.amount_auth281 gateway_net_amt(self.context.amount_auth) 283 282 - gown_fee_amt 284 - aaue_fl_fee_amt 285 - dynamic_gateway_amt(self.context.amount_auth)) 283 - aaue_lf_fee_amt) 286 284 xmltext = """<payment_item_detail> 287 285 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 288 286 <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" /> 289 287 <item_detail item_id="2" item_name="Matriculation Gown Fee" item_amt="%(gown_fee_amt)d" bank_id="51" acct_num="5060020947" /> 290 <item_detail item_id="3" item_name="AAU File-Lapel Fee" item_amt="%(aaue_ fl_fee_amt)d" bank_id="51" acct_num="4010660109" />288 <item_detail item_id="3" item_name="AAU File-Lapel Fee" item_amt="%(aaue_lf_fee_amt)d" bank_id="51" acct_num="4010660109" /> 291 289 </item_details> 292 290 </payment_item_detail>""" % xmldict … … 295 293 # Clearance without additional fees 296 294 xmldict['institution_amt'] = 100 * ( 297 self.context.amount_auth 298 - dynamic_gateway_amt(self.context.amount_auth)) 295 gateway_net_amt(self.context.amount_auth)) 299 296 xmltext = """<payment_item_detail> 300 297 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 309 306 xmldict['institution_bank_id'] = '123' 310 307 xmldict['institution_amt'] = 100 * ( 311 self.context.amount_auth - 312 dynamic_gateway_amt(self.context.amount_auth)) 308 gateway_net_amt(self.context.amount_auth)) 313 309 xmltext = """<payment_item_detail> 314 310 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 323 319 xmldict['institution_bank_id'] = '51' 324 320 xmldict['institution_amt'] = 100 * ( 325 self.context.amount_auth - 326 dynamic_gateway_amt(self.context.amount_auth)) 321 gateway_net_amt(self.context.amount_auth)) 327 322 xmltext = """<payment_item_detail> 328 323 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 337 332 xmldict['institution_bank_id'] = '123' 338 333 xmldict['institution_amt'] = 100 * ( 339 self.context.amount_auth - 340 dynamic_gateway_amt(self.context.amount_auth)) 334 gateway_net_amt(self.context.amount_auth)) 341 335 xmltext = """<payment_item_detail> 342 336 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 351 345 xmldict['institution_bank_id'] = '51' 352 346 xmldict['institution_amt'] = 100 * ( 353 self.context.amount_auth - 354 dynamic_gateway_amt(self.context.amount_auth)) 347 gateway_net_amt(self.context.amount_auth)) 355 348 xmltext = """<payment_item_detail> 356 349 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 365 358 xmldict['institution_bank_id'] = '117' 366 359 xmldict['institution_amt'] = 100 * ( 367 self.context.amount_auth - 368 dynamic_gateway_amt(self.context.amount_auth)) 360 gateway_net_amt(self.context.amount_auth)) 369 361 xmltext = """<payment_item_detail> 370 362 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 379 371 xmldict['institution_bank_id'] = '123' 380 372 xmldict['institution_amt'] = 100 * ( 381 self.context.amount_auth - 382 dynamic_gateway_amt(self.context.amount_auth)) 373 gateway_net_amt(self.context.amount_auth)) 383 374 xmltext = """<payment_item_detail> 384 375 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
Note: See TracChangeset for help on using the changeset viewer.