Changeset 17935


Ignore:
Timestamp:
4 Oct 2024, 08:59:10 (5 weeks ago)
Author:
Henrik Bettermann
Message:

Union Due ist part of school fee.

Location:
main/kofacustom.unidel/trunk/src/kofacustom/unidel
Files:
3 edited

Legend:

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

    r17933 r17935  
    8787        provider_amt = 0.0
    8888        tech_fee = 0.0
     89        union_due = 0.0
    8990        if self.context.p_category == 'clearance':
    9091            provider_amt = 2000.0
     
    107108            provider_amt = 6650.0
    108109            tech_fee = 2850.0
     110            union_due = 1500.0
    109111            if student.is_fresh:
    110112                provider_amt = 7000.0
     
    113115            xmldict['tech_acct'] = '0213065415'
    114116            xmldict['tech_bank_id'] = '47'
     117            xmldict['union_acct'] = '1011438901'
     118            xmldict['union_bank_id'] = '117'
    115119            if student.current_mode.startswith('dp'):
    116120                xmldict['institution_acct'] = '2001627961'
     
    165169            self.context.amount_auth += provider_amt
    166170            self.context.amount_auth += tech_fee
     171            self.context.amount_auth += union_due
    167172        xmldict['provider_amt'] = 100 * provider_amt
    168173        xmldict['tech_fee'] = 100 * tech_fee
     174        xmldict['union_due'] = 100 * union_due
    169175        xmldict['institution_item_name'] = self.context.category
    170176        xmldict['institution_name'] = INSTITUTION_NAME
    171177        xmldict['institution_amt'] = 100 * self.context.net_amt
    172         if provider_amt == 0:
    173             xmltext = """<payment_item_detail>
     178        xmldict['item_id'] = 1
     179        xmltext = """<payment_item_detail>
    174180<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    175 <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" />
    176 </item_details>
    177 </payment_item_detail>""" % xmldict
    178         elif tech_fee == 0:
    179             xmltext = """<payment_item_detail>
    180 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    181 <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" />
    182 <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" />
    183 </item_details>
    184 </payment_item_detail>""" % xmldict
    185         else:
    186             xmltext = """<payment_item_detail>
    187 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    188 <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" />
    189 <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" />
    190 <item_detail item_id="3" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="%(tech_bank_id)s" acct_num="%(tech_acct)s"/>
     181<item_detail item_id="%(item_id)s" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
     182""" % xmldict
     183        if provider_amt:
     184            xmldict['item_id'] += 1
     185            xmltext += """
     186<item_detail item_id="%(item_id)s" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
     187""" % xmldict
     188        if tech_fee:
     189            xmldict['item_id'] += 1
     190            xmltext += """<item_detail item_id="%(item_id)s" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="%(tech_bank_id)s" acct_num="%(tech_acct)s"/>
     191""" % xmldict
     192        if union_due:
     193            xmldict['item_id'] += 1
     194            xmltext += """<item_detail item_id="%(item_id)s" item_name="Student Union Due" item_amt="%(union_due)d" bank_id="%(union_bank_id)s" acct_num="%(union_acct)s"/>
    191195</item_details>
    192196</payment_item_detail>""" % xmldict
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/interswitch/tests.py

    r17931 r17935  
    7878        self.assertEqual(self.student.current_mode, 'ug_ft')
    7979        self.assertTrue(
    80             '<input type="hidden" name="amount" value="9025000" />' in
     80            '<input type="hidden" name="amount" value="9175000" />' in
    8181            self.browser.contents)
    8282        self.assertTrue(
    8383            'item_name="School Fee" item_amt="8000000" bank_id="117" acct_num="1011739172"' in
     84            self.browser.contents)
     85        self.assertTrue(
     86            '<item_detail item_id="4" item_name="Student Union Due" item_amt="150000" bank_id="117" acct_num="1011438901"/>' in
    8487            self.browser.contents)
    8588
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/utils/utils.py

    r17934 r17935  
    5858        'transcript_local': 'Transcript Fee Local Copy',
    5959        'transcript_inter': 'Transcript Fee International Copy',
    60         'union': 'Student Union Due',
     60        #'union': 'Student Union Due',
    6161        }
    6262
Note: See TracChangeset for help on using the changeset viewer.