Ignore:
Timestamp:
17 Apr 2023, 07:12:42 (19 months ago)
Author:
Henrik Bettermann
Message:

New instalment ratio

Location:
main/kofacustom.edocons/trunk/src/kofacustom/edocons
Files:
4 edited

Legend:

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

    r17345 r17380  
    1919import hashlib
    2020import grok
     21import decimal
    2122from kofacustom.nigeria.interswitch.browser import (
    2223    module_activated,
     
    9798        xmldict['institution_item_name'] = self.context.category
    9899        xmldict['institution_name'] = INSTITUTION_NAME
    99         xmldict['institution_amt'] = 100 * self.context.net_amt
     100        xmldict['institution_amt'] = 100*int(decimal.Decimal(str(self.context.net_amt)))
    100101        if not self.context.provider_amt:
    101102            self.context.provider_amt = provider_amt
     
    116117        self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
    117118        self.context.provider_amt = provider_amt
    118         self.amount_auth = int(100 * self.context.amount_auth)
     119        self.amount_auth = 100*int(decimal.Decimal(str(self.context.amount_auth)))
    119120        hashargs = (
    120121            self.context.p_id +
    121122            PRODUCT_ID +
    122123            self.pay_item_id +
    123             str(int(self.amount_auth)) +
     124            str(self.amount_auth) +
    124125            self.site_redirect_url +
    125126            self.mac)
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/interswitch/tests.py

    r17031 r17380  
    9494                           self.browser.contents)
    9595        self.assertTrue(
    96             '<span>26400.0</span>' in self.browser.contents)
     96            '<span>27800.0</span>' in self.browser.contents)
    9797        self.payment_url = self.browser.url
    9898        self.browser.getLink("Pay via Interswitch CollegePAY", index=0).click()
     
    101101        self.assertEqual(self.student.current_mode, 'ug_ft')
    102102        self.assertTrue(
    103             '<input type="hidden" name="amount" value="2670000" />' in
    104             self.browser.contents)
    105         self.assertTrue(
    106             'item_name="School Fee (66% - 1st instalment)" item_amt="2640000" bank_id="31" acct_num="1489560452"' in
     103            '<input type="hidden" name="amount" value="2810000" />' in
     104            self.browser.contents)
     105        self.assertTrue(
     106            'item_name="School Fee (69.5% - 1st instalment)" item_amt="2780000" bank_id="31" acct_num="1489560452"' in
    107107            self.browser.contents)
    108108
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/utils.py

    r17208 r17380  
    8585                if category == 'secondinstal':
    8686                    if student.is_fresh:
    87                         amount = 0.34 * getattr(certificate, 'school_fee_1', 0.0)
     87                        amount = 0.305 * getattr(certificate, 'school_fee_1', 0.0)
    8888                    else:
    89                         amount = 0.34 * getattr(certificate, 'school_fee_2', 0.0)
     89                        amount = 0.305 * getattr(certificate, 'school_fee_2', 0.0)
    9090                if student.state == CLEARED:
    9191                    amount = getattr(certificate, 'school_fee_1', 0.0)
     
    114114                            ), None                   
    115115                if category == 'schoolfee_1':
    116                     amount *= 0.66
     116                    amount *= 0.695
    117117        elif category == 'clearance':
    118118            try:
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/utils/utils.py

    r17365 r17380  
    5757    PAYMENT_CATEGORIES = {
    5858        'schoolfee': 'School Fee (total amount)',
    59         'schoolfee_1': 'School Fee (66% - 1st instalment)',
    60         'secondinstal': 'School Fee (34% - 2nd instalment)',
     59        'schoolfee_1': 'School Fee (69.5% - 1st instalment)',
     60        'secondinstal': 'School Fee (30.5% - 2nd instalment)',
    6161        'clearance': 'Acceptance Fee',
    6262        'hostel':'Hostel Fee (1st instalment)',
     
    7676    SELECTABLE_PAYMENT_CATEGORIES = {
    7777        'schoolfee': 'School Fee (total amount)',
    78         'schoolfee_1': 'School Fee (66% - 1st instalment)',
    79         'secondinstal': 'School Fee (34% - 2nd instalment)',
     78        'schoolfee_1': 'School Fee (69.5% - 1st instalment)',
     79        'secondinstal': 'School Fee (30.5% - 2nd instalment)',
    8080        'hostel':'Hostel Fee (1st instalment)',
    8181        'hostel_2':'Hostel Fee (2nd instalment)',
Note: See TracChangeset for help on using the changeset viewer.