Changeset 15387
- Timestamp:
- 4 Apr 2019, 11:04:09 (6 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r15384 r15387 59 59 60 60 def contr_agreement_applicant(applicant): 61 if applicant.__parent__.code[:2] in ('fp', 'pt' ):61 if applicant.__parent__.code[:2] in ('fp', 'pt', 'ds'): 62 62 return 'first' 63 63 return 'second' … … 65 65 def contr_agreement_student(student): 66 66 if student.current_mode in ( 67 'found', 'bridge', 'ug_dsh', 'de_dsh') or student.current_mode.endswith('_pt'): 67 'found', 68 'bridge', 69 'ug_dsh', 70 'de_dsh', 71 'ug_pt', 72 'de_pt', 73 'dp_pt'): 68 74 return 'first' 69 75 return 'second' … … 226 232 # First agreement 227 233 provider_amt = 1900.0 228 joint_venture_amt = 1100.0229 aaue_share_amt = 1000.0234 joint_venture_amt = 0.0 235 aaue_share_amt = 0.0 230 236 student_union_due_amt = gateway_net_amt( 231 237 academic_session.union_fee) … … 310 316 <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" /> 311 317 <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" /> 312 <item_detail item_id="3" item_name="Joint Venture" item_amt="%(joint_venture_amt)d" bank_id="%(joint_venture_bank_id)s" acct_num="%(joint_venture_acct)s" /> 313 <item_detail item_id="4" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" /> 314 <item_detail item_id="5" item_name="Student Union" item_amt="%(student_union_due_amt)d" bank_id="%(student_union_bank_id)s" acct_num="%(student_union_acct)s" /> 315 <item_detail item_id="6" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" /> 316 <item_detail item_id="7" item_name="Sports Development Fee" item_amt="%(sports_amt)d" bank_id="123" acct_num="1006407792" /> 317 <item_detail item_id="8" item_name="Library Development Fee" item_amt="%(library_amt)d" bank_id="8" acct_num="2000122995" /> 318 <item_detail item_id="3" item_name="Student Union" item_amt="%(student_union_due_amt)d" bank_id="%(student_union_bank_id)s" acct_num="%(student_union_acct)s" /> 319 <item_detail item_id="4" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" /> 320 <item_detail item_id="5" item_name="Sports Development Fee" item_amt="%(sports_amt)d" bank_id="123" acct_num="1006407792" /> 321 <item_detail item_id="6" item_name="Library Development Fee" item_amt="%(library_amt)d" bank_id="8" acct_num="2000122995" />""" % xmldict 322 if contr_agreement_student(student) == 'second': 323 xmltext += """" 324 <item_detail item_id="7" item_name="Joint Venture" item_amt="%(joint_venture_amt)d" bank_id="%(joint_venture_bank_id)s" acct_num="%(joint_venture_acct)s" /> 325 <item_detail item_id="8" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" /> 326 </item_details> 327 </payment_item_detail>""" % xmldict 328 else: 329 xmltext += """" 318 330 </item_details> 319 331 </payment_item_detail>""" % xmldict … … 330 342 <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" /> 331 343 <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" /> 332 <item_detail item_id="3" item_name="Joint Venture" item_amt="%(joint_venture_amt)d" bank_id="%(joint_venture_bank_id)s" acct_num="%(joint_venture_acct)s" /> 333 <item_detail item_id="4" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" /> 334 <item_detail item_id="5" item_name="Student Union" item_amt="%(student_union_due_amt)d" bank_id="%(student_union_bank_id)s" acct_num="%(student_union_acct)s" /> 335 <item_detail item_id="6" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" /> 336 </item_details> 337 </payment_item_detail>""" % xmldict 338 339 elif student.current_mode == 'bridge': 340 # Bridge school fee without any additional fee 341 xmldict['institution_amt'] = 100 * ( 342 gateway_net_amt(self.context.amount_auth) 343 - provider_amt) 344 xmltext = """<payment_item_detail> 345 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 346 <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" /> 347 <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" /> 348 </item_details> 349 </payment_item_detail>""" % xmldict 350 else: 344 <item_detail item_id="3" item_name="Student Union" item_amt="%(student_union_due_amt)d" bank_id="%(student_union_bank_id)s" acct_num="%(student_union_acct)s" /> 345 <item_detail item_id="4" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />""" % xmldict 346 if contr_agreement_student(student) == 'second': 347 xmltext += """" 348 <item_detail item_id="5" item_name="Joint Venture" item_amt="%(joint_venture_amt)d" bank_id="%(joint_venture_bank_id)s" acct_num="%(joint_venture_acct)s" /> 349 <item_detail item_id="6" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" /> 350 </item_details> 351 </payment_item_detail>""" % xmldict 352 else: 353 xmltext += """" 354 </item_details> 355 </payment_item_detail>""" % xmldict 356 elif contr_agreement_student(student) == 'second': 351 357 # Schoolfee without Student Union Fee ands Student Welfare Assurance 352 358 xmldict['institution_amt'] = 100 * ( … … 361 367 <item_detail item_id="3" item_name="Joint Venture" item_amt="%(joint_venture_amt)d" bank_id="%(joint_venture_bank_id)s" acct_num="%(joint_venture_acct)s" /> 362 368 <item_detail item_id="4" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" /> 369 </item_details> 370 </payment_item_detail>""" % xmldict 371 else: 372 xmldict['institution_amt'] = 100 * ( 373 gateway_net_amt(self.context.amount_auth) 374 - provider_amt) 375 xmltext = """<payment_item_detail> 376 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 377 <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" /> 378 <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" /> 363 379 </item_details> 364 380 </payment_item_detail>""" % xmldict -
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py
r15384 r15387 236 236 self.assertTrue( 237 237 'item_name="School Fee Plus" ' 238 'item_amt="4 600000" bank_id="7" '238 'item_amt="4810000" bank_id="7" ' 239 239 'acct_num="1014847058"' in self.browser.contents) 240 240 … … 279 279 'item_name="School Fee Plus" item_amt="4750000" bank_id="117" ' 280 280 'acct_num="1010827641"' in self.browser.contents) 281 282 281 283 282 def test_interswitch_form_pt_acceptance_fees(self):
Note: See TracChangeset for help on using the changeset viewer.