Ignore:
Timestamp:
15 Jan 2013, 15:25:06 (12 years ago)
Author:
Henrik Bettermann
Message:

Improve test and code accordingly.

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

Legend:

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

    r9890 r9891  
    177177        # Penalty fee is taken into consideration
    178178        self.app['configuration']['2005'].penalty_ug = 9999.0
     179        self.app['configuration']['2005'].penalty_pg = 9999.0
    179180        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    180181        self.assertEqual(error, u'School fee payment is disabled.')
  • main/waeup.futminna/trunk/src/waeup/futminna/students/utils.py

    r9890 r9891  
    149149            p_item = self.getAccommodationDetails(student)['bt']
    150150            amount = academic_session.booking_fee
    151         if 9999.0 in (academic_session.penalty_pg, academic_session.penalty_ug):
     151        if category == 'schoolfee' and student.is_postgrad and \
     152            9999.0 == academic_session.penalty_pg:
     153            return _('School fee payment is disabled.'), None
     154        elif category == 'schoolfee' and 9999.0 == academic_session.penalty_ug:
    152155            return _('School fee payment is disabled.'), None
    153156        if amount in (0.0, None):
Note: See TracChangeset for help on using the changeset viewer.