Ignore:
Timestamp:
4 Oct 2012, 13:58:21 (12 years ago)
Author:
Henrik Bettermann
Message:

Configure acceptance fee.

File:
1 edited

Legend:

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

    r9291 r9292  
    197197        xmldict['institution_acct'] = '000000000000'
    198198        xmldict['institution_bank_id'] = '00'
    199         xmldict['institution_amt'] = 100 * (self.context.amount_auth - provider_amt - 300)
    200 
    201         if self.context.student.current_mode in ('pg_ft'):
    202             self.pay_item_id = "11703"
    203         elif self.context.student.state == CLEARED and \
    204             self.context.student.current_level == 100:
    205             self.pay_item_id = "11700"
    206         elif self.context.student.state == CLEARED and \
    207             self.context.student.current_level == 200:
    208             self.pay_item_id = "11701"
    209         elif self.context.student.state == CLEARED and \
    210             self.context.student.current_level == 300:
    211             self.pay_item_id = "11702"
    212         elif self.context.student.state == RETURNING and \
    213             self.context.student.current_level in (100,110):
    214             self.pay_item_id = "11701"
    215         elif self.context.student.state == RETURNING and \
    216             self.context.student.current_level in (200,210):
    217             self.pay_item_id = "11702"
    218         elif self.context.student.state == RETURNING and \
    219             self.context.student.current_level in (300,310):
    220             self.pay_item_id = "11703"
    221         elif self.context.student.state == RETURNING and \
    222             self.context.student.current_level in (400,410,500,510,600):
    223             self.pay_item_id = "11704"
    224 
    225 
    226         if self.context.student.current_mode == 'jm_ft':
    227             xmldict['institution_acct'] = "000000000000"
    228             xmldict['institution_bank_id'] = '0'
    229         elif self.context.student.current_mode == 'pg_ft':
    230             xmldict['institution_acct'] = "2522040000134"
    231             xmldict['institution_bank_id'] = '8'
    232         elif self.context.student.state == CLEARED and \
    233             self.context.student.current_level == 100:
    234             xmldict['institution_acct'] = "0030001000017110"
    235             xmldict['institution_bank_id'] = '89'
    236         elif self.context.student.state == CLEARED and \
    237             self.context.student.current_level == 200:
    238             xmldict['institution_acct'] = "0591201005146"
    239             xmldict['institution_bank_id'] = '101'
    240         elif self.context.student.state == CLEARED and \
    241             self.context.student.current_level == 300:
    242             xmldict['institution_acct'] = "6013803345"
    243             xmldict['institution_bank_id'] = '117'
    244         elif self.context.student.state == RETURNING and \
    245             self.context.student.current_level in (100,110):
    246             xmldict['institution_acct'] = "0591201005146"
    247             xmldict['institution_bank_id'] = '101'
    248         elif self.context.student.current_level in (200,210):
    249             xmldict['institution_acct'] = "6013803345"
    250             xmldict['institution_bank_id'] = '117'
    251         elif self.context.student.current_level in (300,310):
    252             xmldict['institution_acct'] = "2522040000134"
    253             xmldict['institution_bank_id'] = '8'
    254         #Change of acct from UBA to GTBank
    255         elif self.context.student.current_level in (400,410,500,510,600):
    256             xmldict['institution_acct'] = "3713516838111"
    257             xmldict['institution_bank_id'] = '10'
     199       
     200        if self.context.p_category == 'schoolfee':
     201            xmldict['institution_amt'] = 100 * (
     202                self.context.amount_auth - provider_amt - 300)
     203            if self.context.student.current_mode in ('pg_ft'):
     204                self.pay_item_id = "11703"
     205            elif self.context.student.state == CLEARED and \
     206                self.context.student.current_level == 100:
     207                self.pay_item_id = "11700"
     208            elif self.context.student.state == CLEARED and \
     209                self.context.student.current_level == 200:
     210                self.pay_item_id = "11701"
     211            elif self.context.student.state == CLEARED and \
     212                self.context.student.current_level == 300:
     213                self.pay_item_id = "11702"
     214            elif self.context.student.state == RETURNING and \
     215                self.context.student.current_level in (100,110):
     216                self.pay_item_id = "11701"
     217            elif self.context.student.state == RETURNING and \
     218                self.context.student.current_level in (200,210):
     219                self.pay_item_id = "11702"
     220            elif self.context.student.state == RETURNING and \
     221                self.context.student.current_level in (300,310):
     222                self.pay_item_id = "11703"
     223            elif self.context.student.state == RETURNING and \
     224                self.context.student.current_level in (400,410,500,510,600):
     225                self.pay_item_id = "11704"
     226
     227            if self.context.student.current_mode == 'jm_ft':
     228                xmldict['institution_acct'] = "000000000000"
     229                xmldict['institution_bank_id'] = '0'
     230            elif self.context.student.current_mode == 'pg_ft':
     231                xmldict['institution_acct'] = "2522040000134"
     232                xmldict['institution_bank_id'] = '8'
     233            elif self.context.student.state == CLEARED and \
     234                self.context.student.current_level == 100:
     235                xmldict['institution_acct'] = "0030001000017110"
     236                xmldict['institution_bank_id'] = '89'
     237            elif self.context.student.state == CLEARED and \
     238                self.context.student.current_level == 200:
     239                xmldict['institution_acct'] = "0591201005146"
     240                xmldict['institution_bank_id'] = '101'
     241            elif self.context.student.state == CLEARED and \
     242                self.context.student.current_level == 300:
     243                xmldict['institution_acct'] = "6013803345"
     244                xmldict['institution_bank_id'] = '117'
     245            elif self.context.student.state == RETURNING and \
     246                self.context.student.current_level in (100,110):
     247                xmldict['institution_acct'] = "0591201005146"
     248                xmldict['institution_bank_id'] = '101'
     249            elif self.context.student.current_level in (200,210):
     250                xmldict['institution_acct'] = "6013803345"
     251                xmldict['institution_bank_id'] = '117'
     252            elif self.context.student.current_level in (300,310):
     253                xmldict['institution_acct'] = "2522040000134"
     254                xmldict['institution_bank_id'] = '8'
     255            #Change of acct from UBA to GTBank
     256            elif self.context.student.current_level in (400,410,500,510,600):
     257                xmldict['institution_acct'] = "3713516838111"
     258                xmldict['institution_bank_id'] = '10'
     259
     260        elif self.context.p_category == 'clearance':
     261            xmldict['institution_amt'] = 100 * (
     262                self.context.amount_auth - 300)
     263            xmldict['institution_acct'] = "1750005063"
     264            xmldict['institution_bank_id'] = '120'
     265            self.pay_item_id = "11706"
    258266
    259267        xmldict['institution_item_name'] = self.context.p_category
    260268        xmldict['institution_name'] = INSTITUTION_NAME
    261269        # Interswitch amount is not part of the xml data
    262         xmltext = """<payment_item_detail>
     270
     271        if self.context.p_category == 'schoolfee':
     272            xmltext = """<payment_item_detail>
    263273<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    264274<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" />
    265275<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" />
     276</item_details>
     277</payment_item_detail>""" % xmldict
     278        elif self.context.p_category == 'clearance':
     279            xmltext = """<payment_item_detail>
     280<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     281<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" />
    266282</item_details>
    267283</payment_item_detail>""" % xmldict
Note: See TracChangeset for help on using the changeset viewer.