Changeset 17083


Ignore:
Timestamp:
2 Sep 2022, 14:32:05 (2 years ago)
Author:
Henrik Bettermann
Message:

Next try.

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

    r17082 r17083  
    403403<item_detail item_id="4" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />
    404404<item_detail item_id="5" item_name="Sports Development Fee" item_amt="%(sports_amt)d" bank_id="123" acct_num="1006407792" />
    405 <item_detail item_id="6" item_name="Library Development Fee" item_amt="%(library_amt)d" bank_id="8" acct_num="2000122995" />""" % xmldict
     405<item_detail item_id="6" item_name="Library Development Fee" item_amt="%(library_amt)d" bank_id="8" acct_num="2000122995" />
     406</item_details>
     407</payment_item_detail>""" % xmldict
    406408                    if contr_agreement_student(student) == 'second':
    407                         xmltext += """"
    408 <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" />
    409 <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" />""" % xmldict
    410409                        xmldict['institution_amt'] = 100 * (
    411410                            gateway_net_amt(self.context.amount_auth)
     
    416415                            - student_welfare_assurance_amt
    417416                            - sports_amt
    418                             - library_amt)                   
     417                            - library_amt)
     418                        xmltext = """<payment_item_detail>
     419<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     420<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" />
     421<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" />
     422<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" />
     423<item_detail item_id="4" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />
     424<item_detail item_id="5" item_name="Sports Development Fee" item_amt="%(sports_amt)d" bank_id="123" acct_num="1006407792" />
     425<item_detail item_id="6" item_name="Library Development Fee" item_amt="%(library_amt)d" bank_id="8" acct_num="2000122995" />
     426<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" />
     427<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" />
     428</item_details>
     429</payment_item_detail>""" % xmldict
     430
    419431                    if student.entry_session >= 2021 and student.current_mode == 'ug_ft':
    420                         xmltext += """"
    421 <item_detail item_id="9" item_name="LMS plus Sundry Fees" item_amt="%(lms_sund_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />""" % xmldict
    422432                        xmldict['institution_amt'] = 100 * (
    423433                            gateway_net_amt(self.context.amount_auth)
     
    429439                            - sports_amt
    430440                            - library_amt
    431                             - lms_sund_amt)                   
    432                     xmltext += """"
    433 </item_details>
    434 </payment_item_detail>"""
     441                            - lms_sund_amt) 
     442                        xmltext = """<payment_item_detail>
     443<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     444<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" />
     445<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" />
     446<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" />
     447<item_detail item_id="4" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />
     448<item_detail item_id="5" item_name="Sports Development Fee" item_amt="%(sports_amt)d" bank_id="123" acct_num="1006407792" />
     449<item_detail item_id="6" item_name="Library Development Fee" item_amt="%(library_amt)d" bank_id="8" acct_num="2000122995" />
     450<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" />
     451<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" />
     452<item_detail item_id="9" item_name="LMS plus Sundry Fees" item_amt="%(lms_sund_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
     453</item_details>
     454</payment_item_detail>""" % xmldict
     455
    435456                else:
    436457                    xmldict['institution_amt'] = 100 * (
     
    444465<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" />
    445466<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" />
    446 <item_detail item_id="4" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />""" % xmldict
     467<item_detail item_id="4" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />
     468</item_details>
     469</payment_item_detail>""" % xmldict
    447470                    if contr_agreement_student(student) == 'second':
    448471                        xmldict['institution_amt'] = 100 * (
     
    453476                            - student_union_due_amt
    454477                            - student_welfare_assurance_amt)                   
    455                         xmltext += """"
     478                        xmltext = """<payment_item_detail>
     479<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     480<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" />
     481<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" />
     482<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" />
     483<item_detail item_id="4" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />
    456484<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" />
    457485<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" />
    458486</item_details>
    459487</payment_item_detail>""" % xmldict
    460                     else:
    461                         xmltext += """"
    462 </item_details>
    463 </payment_item_detail>"""
     488
    464489            elif contr_agreement_student(student) == 'second':
    465490                # Schoolfee without Student Union Fee ands Student Welfare Assurance
     
    487512</item_details>
    488513</payment_item_detail>""" % xmldict
    489 
    490514
    491515        # Clearance
  • main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py

    r17081 r17083  
    279279            in self.browser.contents)
    280280        self.assertTrue(
    281             'item_name="School Fee Plus" item_amt="5005000" bank_id="117" '
     281            'item_name="School Fee Plus" item_amt="4755000" bank_id="117" '
    282282            'acct_num="1010827641"' in self.browser.contents)
    283283
Note: See TracChangeset for help on using the changeset viewer.