Changeset 17045 for main


Ignore:
Timestamp:
28 Jul 2022, 21:16:35 (2 years ago)
Author:
Henrik Bettermann
Message:

Configure split payment correctly.

File:
1 edited

Legend:

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

    r17040 r17045  
    159159            self.context.r_company = u'interswitch'
    160160        xmldict = {}
    161         #rovider_amt = 500.0
    162161        provider_amt = 0.0
     162        midwife_amt = 200.0
    163163        xmldict['institution_acct'] = '1489560452'
    164164        xmldict['institution_bank_id'] = '31'
    165165        if self.context.__parent__.__parent__.prefix.startswith('tsc'):
    166166            provider_amt = 2000.0
     167            midwife_amt = 0.0
    167168            xmldict['institution_acct'] = '1000907711'
    168169            xmldict['institution_bank_id'] = '7'
     
    174175        xmldict['institution_item_name'] = self.context.category
    175176        xmldict['institution_name'] = INSTITUTION_NAME
    176         midwife_amt = 200.0
    177177        xmldict['midwife_amt'] = 100 * midwife_amt
    178178        xmldict['institution_amt'] = 100 * (self.context.net_amt - midwife_amt)
     
    180180            self.context.provider_amt = provider_amt
    181181            self.context.amount_auth += provider_amt
    182         if provider_amt:
     182        if provider_amt and midwife_amt:
    183183            xmltext = """<payment_item_detail>
    184184<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s">
    185185<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" />
    186 <item_detail item_id="2" item_name="Nursing and Midwifery Committee" item_amt="%(midwife_amt)d" bank_id="8" acct_num="2004854377" />
    187 <item_detail item_id="3" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
     186<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" />
     187<item_detail item_id="3" item_name="Nursing and Midwifery Committee" item_amt="%(midwife_amt)d" bank_id="8" acct_num="2004854377" />
     188</item_details>
     189</payment_item_detail>""" % xmldict
     190        elif provider_amt and not midwife_amt:
     191            xmltext = """<payment_item_detail>
     192<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s">
     193<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" />
     194<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" />
    188195</item_details>
    189196</payment_item_detail>""" % xmldict
Note: See TracChangeset for help on using the changeset viewer.