Ignore:
Timestamp:
7 Nov 2015, 12:05:48 (9 years ago)
Author:
Henrik Bettermann
Message:

Prepare function for computing the gateway amount dynamically (will be modified on next Monday).

Transaction fee is already embedded in each of the fee items and must this be substracted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py

    r13403 r13406  
    4949
    5050
     51def dynamic_gateway_amt(fee):
     52    return GATEWAY_AMT
     53
    5154def contr_agreement(student):
    5255    if student.current_mode == 'found' or student.current_mode.endswith('_pt'):
     
    216219                    - joint_venture_amt
    217220                    - aaue_share_amt
    218                     - student_union_due_amt
    219                     - student_welfare_assurance_amt
     221                    - (student_union_due_amt - GATEWAY_AMT)
     222                    - (student_welfare_assurance_amt - GATEWAY_AMT)
    220223                    - GATEWAY_AMT)
    221224                xmltext = """<payment_item_detail>
     
    271274                xmldict['institution_amt'] = 100 * (
    272275                    self.context.amount_auth
    273                     - gown_fee_amt
    274                     - aaue_fl_fee_amt
     276                    - (gown_fee_amt - GATEWAY_AMT)
     277                    - (aaue_fl_fee_amt - GATEWAY_AMT)
    275278                    - GATEWAY_AMT)
    276279                xmltext = """<payment_item_detail>
     
    299302            xmldict['institution_bank_id'] = '123'
    300303            xmldict['institution_amt'] = 100 * (
    301                 self.context.amount_auth - GATEWAY_AMT)
     304                self.context.amount_auth -
     305                dynamic_gateway_amt(self.context.amount_auth))
    302306            xmltext = """<payment_item_detail>
    303307<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     
    312316            xmldict['institution_bank_id'] = '51'
    313317            xmldict['institution_amt'] = 100 * (
    314                 self.context.amount_auth - GATEWAY_AMT)
     318                self.context.amount_auth -
     319                dynamic_gateway_amt(self.context.amount_auth))
    315320            xmltext = """<payment_item_detail>
    316321<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     
    325330            xmldict['institution_bank_id'] = '123'
    326331            xmldict['institution_amt'] = 100 * (
    327                 self.context.amount_auth - GATEWAY_AMT)
     332                self.context.amount_auth -
     333                dynamic_gateway_amt(self.context.amount_auth))
    328334            xmltext = """<payment_item_detail>
    329335<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     
    338344            xmldict['institution_bank_id'] = '51'
    339345            xmldict['institution_amt'] = 100 * (
    340                 self.context.amount_auth - GATEWAY_AMT)
     346                self.context.amount_auth -
     347                dynamic_gateway_amt(self.context.amount_auth))
    341348            xmltext = """<payment_item_detail>
    342349<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     
    351358            xmldict['institution_bank_id'] = '117'
    352359            xmldict['institution_amt'] = 100 * (
    353                 self.context.amount_auth - GATEWAY_AMT)
     360                self.context.amount_auth -
     361                dynamic_gateway_amt(self.context.amount_auth))
    354362            xmltext = """<payment_item_detail>
    355363<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     
    364372            xmldict['institution_bank_id'] = '117'
    365373            xmldict['institution_amt'] = 100 * (
    366                 self.context.amount_auth - GATEWAY_AMT)
     374                self.context.amount_auth -
     375                dynamic_gateway_amt(self.context.amount_auth))
    367376            xmltext = """<payment_item_detail>
    368377<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     
    377386            xmldict['institution_bank_id'] = '123'
    378387            xmldict['institution_amt'] = 100 * (
    379                 self.context.amount_auth - GATEWAY_AMT)
     388                self.context.amount_auth -
     389                dynamic_gateway_amt(self.context.amount_auth))
    380390            xmltext = """<payment_item_detail>
    381391<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.