Ignore:
Timestamp:
9 Sep 2013, 06:00:24 (11 years ago)
Author:
Henrik Bettermann
Message:

Configure fee and bank account data for pre-admission applications.

File:
1 edited

Legend:

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

    r10254 r10597  
    226226            xmldict['institution_acct'] = '7000016724'
    227227            xmldict['institution_bank_id'] = '9'
    228         elif self.applicant.is_nd:
     228        elif self.applicant.applicant_id.startswith('nd'):
    229229            xmldict['institution_acct'] = '2014191363'
    230230            xmldict['institution_bank_id'] = '8'
     231        elif self.applicant.applicant_id.startswith('prejambites'):
     232            xmldict['institution_acct'] = '0106259811'
     233            xmldict['institution_bank_id'] = '10'
     234            self.pay_item_id = '104'
     235            provider_amt = 0.0
     236            dalash_amt = 0.0
     237        elif self.applicant.applicant_id.startswith('pre'):
     238            xmldict['institution_acct'] = '2013910271'
     239            xmldict['institution_bank_id'] = '8'
     240            provider_amt = 0.0
     241            dalash_amt = 0.0
    231242        else:
    232243            xmldict['institution_acct'] = '00000000000'
     
    253264
    254265        # Interswitch amount is not part of the xml data
    255         xmltext = """<payment_item_detail>
     266
     267        if not self.applicant.applicant_id.startswith('pre'):
     268            xmltext = """<payment_item_detail>
    256269<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s">
    257270<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" />
     
    260273</item_details>
    261274</payment_item_detail>""" % xmldict
     275
     276        else:
     277            xmltext = """<payment_item_detail>
     278<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s">
     279<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" />
     280</item_details>
     281</payment_item_detail>""" % xmldict
     282
    262283        self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
    263284        self.context.provider_amt = provider_amt
Note: See TracChangeset for help on using the changeset viewer.