Changeset 10682 for main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students
- Timestamp:
- 1 Nov 2013, 09:11:10 (11 years ago)
- Location:
- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py
r10679 r10682 282 282 self.assertEqual(payment.p_level, 100) 283 283 self.assertEqual(payment.p_session, 2004) 284 self.assertEqual(payment.amount_auth, 876.0) 285 self.assertEqual(payment.p_item, u'My bed coordinates') 286 self.assertEqual(error, None) 287 288 self.app['hostels']['hall-1'].maint_fee = 0.0 289 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) 290 self.assertEqual(payment.p_level, 100) 291 self.assertEqual(payment.p_session, 2004) 284 292 self.assertEqual(payment.amount_auth, 180.0) 285 self.assertEqual(payment.p_item, u' ')293 self.assertEqual(payment.p_item, u'My bed coordinates') 286 294 self.assertEqual(error, None) 287 295 -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py
r10679 r10682 178 178 amount = academic_session.booking_fee 179 179 elif category == 'hostel_maintenance': 180 amount = academic_session.maint_fee 180 amount = 0.0 181 bedticket = student['accommodation'].get( 182 str(student.current_session), None) 183 if bedticket: 184 p_item = bedticket.bed_coordinates 185 if bedticket.bed.__parent__.maint_fee > 0: 186 amount = bedticket.bed.__parent__.maint_fee 187 else: 188 # fallback 189 amount = academic_session.maint_fee 190 else: 191 # Should not happen because this is already checked 192 # in the browser module, but anyway ... 193 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 194 p_item = trans(_('no bed allocated'), portal_language) 181 195 elif category == 'clearance': 182 196 amount = academic_session.clearance_fee
Note: See TracChangeset for help on using the changeset viewer.