Ignore:
Timestamp:
27 Oct 2016, 21:07:05 (8 years ago)
Author:
Henrik Bettermann
Message:

Clearance fee and provider amount do increase only for students starting in 2016.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py

    r14233 r14237  
    6161    currency = CURRENCY
    6262    product_id = PRODUCT_ID
     63
     64    def dynamic_provider_amt(self, student):
     65        if student.entry_session >= 2016:
     66            return 2500.0
     67        return 1500.0
    6368
    6469    def update(self):
     
    8388        if self.context.p_category == 'schoolfee':
    8489            if not self.context.p_item == 'Balance':
    85                 provider_amt = 2500.0
     90                provider_amt = self.dynamic_provider_amt(student)
    8691            if student.current_mode.endswith('_ft'):
    8792                self.pay_item_id = '5700'
     
    9297        elif self.context.p_category == 'clearance':
    9398            self.pay_item_id = '5702'
    94             provider_amt = 2500.0
     99            provider_amt = self.dynamic_provider_amt(student)
    95100        elif self.context.p_category == 'gown':
    96101            self.pay_item_id = '5704'
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py

    r14233 r14237  
    9595            in self.browser.contents)
    9696        self.assertTrue(
    97             'item_name="School Fee" item_amt="3735000" bank_id="8" acct_num="2017506430"'
    98             in self.browser.contents)
    99         self.assertTrue(
    100             'item_name="BT Education" item_amt="250000" bank_id="117" acct_num="1014261520"'
     97            'item_name="School Fee" item_amt="3835000" bank_id="8" acct_num="2017506430"'
     98            in self.browser.contents)
     99        self.assertTrue(
     100            'item_name="BT Education" item_amt="150000" bank_id="117" acct_num="1014261520"'
    101101            in self.browser.contents)
    102102
     
    130130        self.browser.getLink("CollegePAY", index=0).click()
    131131        # Split amounts have been set.
    132         self.assertEqual(self.student['payments'][value].provider_amt, 2500.0)
     132        self.assertEqual(self.student['payments'][value].provider_amt, 1500.0)
    133133        self.assertEqual(self.student['payments'][value].gateway_amt, 150.0)
    134134        self.assertTrue('<input type="hidden" name="pay_item_id" value="5701" />'
     
    138138            in self.browser.contents)
    139139        self.assertTrue(
    140             'item_name="School Fee" item_amt="1735000" bank_id="8" acct_num="2017506430"'
    141             in self.browser.contents)
    142         self.assertTrue(
    143             'item_name="BT Education" item_amt="250000" bank_id="117" acct_num="1014261520"'
     140            'item_name="School Fee" item_amt="1835000" bank_id="8" acct_num="2017506430"'
     141            in self.browser.contents)
     142        self.assertTrue(
     143            'item_name="BT Education" item_amt="150000" bank_id="117" acct_num="1014261520"'
    144144            in self.browser.contents)
    145145
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r14233 r14237  
    606606        self.assertEqual(payment.p_level, 100)
    607607        self.assertEqual(payment.p_session, 2004)
    608         self.assertEqual(payment.amount_auth, 50000.0)
     608        self.assertEqual(payment.amount_auth, 45000.0)
    609609        self.assertEqual(payment.p_item, u'CERT1')
    610610        self.assertEqual(error, None)
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r14233 r14237  
    247247            elif p_item in ('BSCANA', 'BSCMBC', 'BMLS', 'BSCNUR', 'BSCPHS', 'BDS',
    248248                'MBBSMED', 'MBBSNDU'):
    249                 amount = 70000.0
    250             else:
    251                 amount = 50000.0
     249                amount = 65000.0
     250            else:
     251                amount = 45000.0
     252            # Clearance fee and provider amount have been increased
     253            # for new students.
     254            if student.entry_session >= 2016:
     255                amount += 5000.0
    252256        elif category == 'schoolfee':
    253257            try:
Note: See TracChangeset for help on using the changeset viewer.