Changeset 9714 for main/waeup.futminna


Ignore:
Timestamp:
23 Nov 2012, 10:51:00 (12 years ago)
Author:
Henrik Bettermann
Message:

Change acceptance fee calculation. This way penalty fees can be added or payment can be disabled via the UI.

Location:
main/waeup.futminna/trunk/src/waeup/futminna
Files:
4 edited

Legend:

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

    r9318 r9714  
    3939
    4040    application_fee = schema.Float(
    41         title = _(u'Application Fee (fallback)'),
     41        title = _(u'Application Fee'),
     42        description = u'20000 Nairas are automatically added ' + \
     43                       'if student is in faculty <br>' + \
     44                       'EET or ICT or in department ARC.',
    4245        default = 0.0,
    4346        required = False,
  • main/waeup.futminna/trunk/src/waeup/futminna/interswitch/tests.py

    r9712 r9714  
    9595                           self.browser.contents)
    9696        self.assertMatches(
    97             '...<span>20000.0</span>...',
     97            '...<span>3456.0</span>...',
    9898            self.browser.contents)
    9999        # Manager can access InterswitchForm
     
    104104                           self.browser.contents)
    105105        self.assertMatches(
    106             '...<input type="hidden" name="amount" value="2000000.0" />...',
     106            '...<input type="hidden" name="amount" value="345600.0" />...',
    107107            self.browser.contents)
    108108        self.assertMatches(
    109             '...item_name="Acceptance Fee" item_amt="1970000" bank_id="120" acct_num="1750005063"...',
     109            '...item_name="Acceptance Fee" item_amt="315600" bank_id="120" acct_num="1750005063"...',
    110110            self.browser.contents)
    111111        # BT does nor charge a fee for clearance
  • main/waeup.futminna/trunk/src/waeup/futminna/students/tests/test_browser.py

    r9699 r9714  
    171171        self.assertEqual(error, u'Previous session payment not yet implemented.')
    172172
     173        self.app['configuration']['2004'].clearance_fee = 20000.0
    173174        error, payment = utils.setPaymentDetails('clearance',self.student)
    174175        self.assertEqual(payment.p_level, 100)
  • main/waeup.futminna/trunk/src/waeup/futminna/students/utils.py

    r9575 r9714  
    114114            except (AttributeError, TypeError):
    115115                return _('Study course data are incomplete.'), None
    116             if student.faccode in ['EET','ICT'] or student.depcode in ['ARC']:
    117                 amount = 25000.0
    118             else:
    119                 amount = 20000.0
     116            amount = academic_session.clearance_fee
     117            if amount and (student.faccode in [
     118                'EET','ICT'] or student.depcode in ['ARC']):
     119                amount += 5000.0
    120120        elif category == 'hostel_maintenance':
    121121            current_session = student['studycourse'].current_session
Note: See TracChangeset for help on using the changeset viewer.