Ignore:
Timestamp:
21 Jan 2022, 09:27:55 (3 years ago)
Author:
Henrik Bettermann
Message:

Next try: fix hostel maintenance split payment

File:
1 edited

Legend:

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

    r16750 r16753  
    614614
    615615        if self.context.p_category == 'hostel_maintenance':
    616             #if self.context.p_item != 'Balance':
    617             #    provider_amt = 500.0
     616            provider_amt = 500.0
     617            hostel_due = 2000
    618618            self.pay_item_id = '117'
    619619            xmldict['institution_acct'] = '1012808851'
    620620            xmldict['institution_bank_id'] = '117'
     621            xmldict['provider_amt'] = 100 * provider_amt
     622            xmldict['hostel_due'] = 100 * hostel_due
     623            xmldict['institution_amt'] = institution_amt = 100 * (
     624                self.context.amount_auth - provider_amt - hostel_due - GATEWAY_AMT)
    621625            xmltext = """<payment_item_detail>
    622626<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    623627<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" />
    624628<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" />
    625 <item_detail item_id="3" item_name="Hostel Due" item_amt="2000" bank_id="11" acct_num="0170897506" />
     629<item_detail item_id="3" item_name="Hostel Due" item_amt="%(hostel_due)d" bank_id="11" acct_num="0170897506" />
    626630</item_details>
    627631</payment_item_detail>""" % xmldict
Note: See TracChangeset for help on using the changeset viewer.