Ignore:
Timestamp:
20 Mar 2021, 21:25:26 (4 years ago)
Author:
Henrik Bettermann
Message:

Add Microsoft Academy Fee split to ND2 and HND2 schoolfee payments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/browser.py

    r16411 r16418  
    1919import hashlib
    2020import grok
     21from waeup.kofa.interfaces import CLEARED, RETURNING
    2122from kofacustom.nigeria.interswitch.browser import (
    2223    InterswitchPaymentRequestWebservicePageApplicant,
     
    137138        provider_amt = 0.0
    138139        tech_fee = 0.0
     140        microsoft_fee = 0.0
    139141        if self.context.p_category.startswith('schoolfee'):
    140142            self.pay_item_id = '102'
     
    142144                provider_amt = 2800.0
    143145                tech_fee = 1200.0
     146                if student.state == RETURNING:
     147                    microsoft_fee = 7000.0
    144148            if student.faccode == 'SPAT':
    145149                xmldict['institution_acct'] = '1015220292'
     
    249253</item_details>
    250254</payment_item_detail>""" % xmldict
    251         else:
     255        elif microsoft_fee == 0:
    252256            xmltext = """<payment_item_detail>
    253257<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     
    255259<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" />
    256260<item_detail item_id="3" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="10" acct_num="0032256360" />
     261</item_details>
     262</payment_item_detail>""" % xmldict
     263        else:
     264            xmltext = """<payment_item_detail>
     265<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     266<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" />
     267<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" />
     268<item_detail item_id="3" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="10" acct_num="0032256360" />
     269<item_detail item_id="4" item_name="Microsoft Academy Fee" item_amt="%(microsoft_fee)d" bank_id="8" acct_num="2011810360" />
    257270</item_details>
    258271</payment_item_detail>""" % xmldict
Note: See TracChangeset for help on using the changeset viewer.