Changeset 15997 for main


Ignore:
Timestamp:
10 Feb 2020, 10:53:45 (5 years ago)
Author:
Henrik Bettermann
Message:

Fix IJMBE payments.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r15919 r15997  
    609609    def test_student_schoolfee_payments(self):
    610610        configuration_1 = createObject('waeup.SessionConfiguration')
    611         configuration_1.academic_session = 2016
     611        configuration_1.academic_session = 2018
    612612        self.app['configuration'].addSessionConfiguration(configuration_1)
    613613        self.certificate.study_mode = 'ug_ft'
    614         self.student['studycourse'].entry_session = 2016
    615         self.student['studycourse'].current_session = 2016
     614        self.student['studycourse'].entry_session = 2018
     615        self.student['studycourse'].current_session = 2018
    616616        self.student['studycourse'].entry_mode = 'ug_ft'
    617617        self.student['studycourse'].certificate.school_fee_1 = 50200.0
    618         self.app['configuration']['2016'].union_fee = 1200.0
    619         self.app['configuration']['2016'].welfare_fee = 700.0
    620         self.app['configuration']['2016'].id_card_fee = 300.0
     618        self.app['configuration']['2018'].union_fee = 1200.0
     619        self.app['configuration']['2018'].welfare_fee = 700.0
     620        #self.app['configuration']['2017'].id_card_fee = 300.0
     621        self.app['configuration']['2018'].sports_fee = 300.0
     622        self.app['configuration']['2018'].library_fee = 300.0
    621623        self.student.nationality = u'NG'
    622624        # Login
     
    635637        self.browser.getLink(value).click()
    636638        self.assertTrue('Amount Authorized' in self.browser.contents)
    637         # 50200 + 1200 + 700 + 300 - 600 = 51800
    638         self.assertEqual(self.student['payments'][value].amount_auth, 51800.0)
     639        # 50200 + 1200 + 700 + 300 + 300- 800 = 51900
     640        self.assertEqual(self.student['payments'][value].amount_auth, 51900.0)
    639641        self.student['payments'][value].r_company = u'interswitch'
    640642        self.browser.open(self.browser.url + '/payment_slip.pdf')
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r15992 r15997  
    441441            # Add Student Union Fee, Student Id Card Fee, Sports Dev. Fee,
    442442            # Library Dev. Fee and Welfare Assurance
    443             if category in ('schoolfee_incl', 'schoolfee_1'):
    444                 if student.current_mode != 'ijmbe':
    445                     amount += gateway_net_amt(academic_session.welfare_fee) + \
    446                         gateway_net_amt(academic_session.union_fee)
     443            if category in ('schoolfee_incl', 'schoolfee_1') \
     444                and student.current_mode != 'ijmbe':
     445                amount += gateway_net_amt(academic_session.welfare_fee) + \
     446                    gateway_net_amt(academic_session.union_fee)
    447447                if student.entry_session >= 2018 and student.is_fresh:
    448448                    amount += gateway_net_amt(academic_session.sports_fee)
     
    451451                    else:
    452452                        amount += gateway_net_amt(academic_session.library_fee)
    453                 if student.entry_session == 2016 \
    454                     and student.entry_mode == 'ug_ft' \
    455                     and student.state == CLEARED:
    456                     amount += gateway_net_amt(academic_session.id_card_fee)
    457453            # Add non-indigenous fee and session specific penalty fees
    458454            if student.is_postgrad:
Note: See TracChangeset for help on using the changeset viewer.