Ignore:
Timestamp:
11 Nov 2012, 06:07:51 (12 years ago)
Author:
Henrik Bettermann
Message:

Calculate hostel maintenance fee.

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

Legend:

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

    r9611 r9612  
    262262        self.assertEqual(payment.p_level, 100)
    263263        self.assertEqual(payment.p_session, 2004)
    264         self.assertEqual(payment.amount_auth, 180.0)
     264        self.assertEqual(payment.amount_auth, 4000.0)
     265        self.assertEqual(payment.p_item, u'My bed coordinates')
     266        self.assertEqual(error, None)
     267
     268        self.certificate.study_mode = u'ug_sw'
     269        error, payment = utils.setPaymentDetails('hostel_maintenance',self.student)
     270        self.assertEqual(payment.p_level, 100)
     271        self.assertEqual(payment.p_session, 2004)
     272        self.assertEqual(payment.amount_auth, 2500.0)
    265273        self.assertEqual(payment.p_item, u'My bed coordinates')
    266274        self.assertEqual(error, None)
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py

    r9611 r9612  
    9191            if current_session != acc_details['booking_session']:
    9292                return _(u'Current session does not match accommodation session.'), None
    93             amount = academic_session.maint_fee
     93            if student.current_mode.endswith('_sw') or student.current_mode == 'pd_ft':
     94                amount = 2500.0
     95            else:
     96                amount = 4000.0
    9497        elif category == 'clearance':
    9598            amount = academic_session.clearance_fee
Note: See TracChangeset for help on using the changeset viewer.